@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,13 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
S3Resource
|
|
3
|
-
} from "./chunk-G7O6DAWU.js";
|
|
4
1
|
import {
|
|
5
2
|
ociToS3Config,
|
|
6
3
|
redactOciConfig
|
|
7
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RQK5UPMP.js";
|
|
5
|
+
import {
|
|
6
|
+
S3Resource
|
|
7
|
+
} from "./chunk-MHCMHKM6.js";
|
|
8
8
|
|
|
9
9
|
// src/resource/oci/oci.ts
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
remapCommandsResource,
|
|
12
|
+
remapOpsResource,
|
|
13
|
+
ResourceName
|
|
14
|
+
} from "@struktoai/mirage-core";
|
|
11
15
|
|
|
12
16
|
// src/resource/oci/prompt.ts
|
|
13
17
|
var OCI_PROMPT = `{prefix}
|
|
@@ -16,18 +20,6 @@ var OCI_PROMPT = `{prefix}
|
|
|
16
20
|
Supports: ls, cat, head, tail, grep, rg, wc, find, tree, jq, stat.`;
|
|
17
21
|
|
|
18
22
|
// src/resource/oci/oci.ts
|
|
19
|
-
function remapOpsResource(ops, to) {
|
|
20
|
-
return ops.map((op) => op.resource === ResourceName.S3 ? { ...op, resource: to } : op);
|
|
21
|
-
}
|
|
22
|
-
function remapCommandsResource(commands, to) {
|
|
23
|
-
return commands.map((cmd) => {
|
|
24
|
-
if (cmd.resource !== ResourceName.S3) return cmd;
|
|
25
|
-
const proto = Object.getPrototypeOf(cmd);
|
|
26
|
-
const copy = Object.assign(Object.create(proto), cmd);
|
|
27
|
-
Object.assign(copy, { resource: to });
|
|
28
|
-
return copy;
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
23
|
var OCIResource = class extends S3Resource {
|
|
32
24
|
kind = ResourceName.OCI;
|
|
33
25
|
prompt = OCI_PROMPT;
|
|
@@ -49,8 +41,6 @@ var OCIResource = class extends S3Resource {
|
|
|
49
41
|
getState() {
|
|
50
42
|
return Promise.resolve({
|
|
51
43
|
type: this.kind,
|
|
52
|
-
needsOverride: true,
|
|
53
|
-
redactedFields: ["accessKeyId", "secretAccessKey"],
|
|
54
44
|
config: redactOciConfig(this.ociConfig)
|
|
55
45
|
});
|
|
56
46
|
}
|
|
@@ -63,4 +53,4 @@ export {
|
|
|
63
53
|
OCI_PROMPT,
|
|
64
54
|
OCIResource
|
|
65
55
|
};
|
|
66
|
-
//# sourceMappingURL=chunk-
|
|
56
|
+
//# sourceMappingURL=chunk-PJBQKMCD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/oci/oci.ts","../src/resource/oci/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 { ociToS3Config, redactOciConfig, type OCIConfig, type OCIConfigRedacted } from './config.ts'\nimport { OCI_PROMPT } from './prompt.ts'\n\nexport interface OCIResourceState {\n type: string\n config: OCIConfigRedacted\n}\n\nexport class OCIResource extends S3Resource {\n override readonly kind: string = ResourceName.OCI\n override readonly prompt: string = OCI_PROMPT\n readonly ociConfig: OCIConfig\n private readonly ociOps: readonly RegisteredOp[]\n private readonly ociCommands: readonly RegisteredCommand[]\n\n constructor(config: OCIConfig) {\n super(ociToS3Config(config))\n this.ociConfig = config\n this.ociOps = remapOpsResource(super.ops(), ResourceName.OCI)\n this.ociCommands = remapCommandsResource(super.commands(), ResourceName.OCI)\n }\n\n override ops(): readonly RegisteredOp[] {\n return this.ociOps\n }\n\n override commands(): readonly RegisteredCommand[] {\n return this.ociCommands\n }\n\n override getState(): Promise<OCIResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactOciConfig(this.ociConfig),\n })\n }\n\n override loadState(_state: OCIResourceState): 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 OCI_PROMPT = `\\\n{prefix}\n Remote Oracle Cloud Object Storage.\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"],"mappings":";;;;;;;;;AAcA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;;;ACNA,IAAM,aAAa;AAAA;AAAA;AAAA;;;ADgBnB,IAAM,cAAN,cAA0B,WAAW;AAAA,EACxB,OAAe,aAAa;AAAA,EAC5B,SAAiB;AAAA,EAC1B;AAAA,EACQ;AAAA,EACA;AAAA,EAEjB,YAAY,QAAmB;AAC7B,UAAM,cAAc,MAAM,CAAC;AAC3B,SAAK,YAAY;AACjB,SAAK,SAAS,iBAAiB,MAAM,IAAI,GAAG,aAAa,GAAG;AAC5D,SAAK,cAAc,sBAAsB,MAAM,SAAS,GAAG,aAAa,GAAG;AAAA,EAC7E;AAAA,EAES,MAA+B;AACtC,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAAyC;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAAsC;AAC7C,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,gBAAgB,KAAK,SAAS;AAAA,IACxC,CAAC;AAAA,EACH;AAAA,EAES,UAAU,QAAyC;AAC1D,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// src/resource/dropbox/config.ts
|
|
2
|
+
import { normalizeFields, redactConfigWithSchema, secretStr, z } from "@struktoai/mirage-core";
|
|
3
|
+
var DropboxConfigSchema = z.object({
|
|
4
|
+
clientId: z.string(),
|
|
5
|
+
clientSecret: secretStr(),
|
|
6
|
+
refreshToken: secretStr()
|
|
7
|
+
});
|
|
8
|
+
function redactDropboxConfig(config) {
|
|
9
|
+
return redactConfigWithSchema(DropboxConfigSchema, config);
|
|
10
|
+
}
|
|
11
|
+
function normalizeDropboxConfig(input) {
|
|
12
|
+
return normalizeFields(input, {
|
|
13
|
+
rename: {
|
|
14
|
+
client_id: "clientId",
|
|
15
|
+
client_secret: "clientSecret",
|
|
16
|
+
refresh_token: "refreshToken"
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
DropboxConfigSchema,
|
|
23
|
+
redactDropboxConfig,
|
|
24
|
+
normalizeDropboxConfig
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=chunk-Q2IAILVC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/dropbox/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 DropboxConfig {\n clientId: string\n clientSecret: string\n refreshToken: string\n refreshFn?: (refreshToken: string) => Promise<{ accessToken: string; expiresIn: number }>\n}\n\nexport interface DropboxConfigRedacted {\n clientId: string\n clientSecret: '<REDACTED>'\n refreshToken: '<REDACTED>'\n}\n\nexport const DropboxConfigSchema = z.object({\n clientId: z.string(),\n clientSecret: secretStr(),\n refreshToken: secretStr(),\n})\n\nexport function redactDropboxConfig(config: DropboxConfig): DropboxConfigRedacted {\n return redactConfigWithSchema(DropboxConfigSchema, config) as unknown as DropboxConfigRedacted\n}\n\nexport function normalizeDropboxConfig(input: Record<string, unknown>): DropboxConfig {\n return normalizeFields(input, {\n rename: {\n client_id: 'clientId',\n client_secret: 'clientSecret',\n refresh_token: 'refreshToken',\n },\n }) as unknown as DropboxConfig\n}\n"],"mappings":";AAcA,SAAS,iBAAiB,wBAAwB,WAAW,SAAS;AAe/D,IAAM,sBAAsB,EAAE,OAAO;AAAA,EAC1C,UAAU,EAAE,OAAO;AAAA,EACnB,cAAc,UAAU;AAAA,EACxB,cAAc,UAAU;AAC1B,CAAC;AAEM,SAAS,oBAAoB,QAA8C;AAChF,SAAO,uBAAuB,qBAAqB,MAAM;AAC3D;AAEO,SAAS,uBAAuB,OAA+C;AACpF,SAAO,gBAAgB,OAAO;AAAA,IAC5B,QAAQ;AAAA,MACN,WAAW;AAAA,MACX,eAAe;AAAA,MACf,eAAe;AAAA,IACjB;AAAA,EACF,CAAC;AACH;","names":[]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {
|
|
2
|
+
minioToS3Config,
|
|
3
|
+
redactMinIOConfig
|
|
4
|
+
} from "./chunk-DYXEITK3.js";
|
|
5
|
+
import {
|
|
6
|
+
S3Resource
|
|
7
|
+
} from "./chunk-MHCMHKM6.js";
|
|
8
|
+
|
|
9
|
+
// src/resource/minio/minio.ts
|
|
10
|
+
import {
|
|
11
|
+
remapCommandsResource,
|
|
12
|
+
remapOpsResource,
|
|
13
|
+
ResourceName
|
|
14
|
+
} from "@struktoai/mirage-core";
|
|
15
|
+
|
|
16
|
+
// src/resource/minio/prompt.ts
|
|
17
|
+
var MINIO_PROMPT = `{prefix}
|
|
18
|
+
Remote MinIO 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/minio/minio.ts
|
|
24
|
+
var MinIOResource = class extends S3Resource {
|
|
25
|
+
kind = ResourceName.MINIO;
|
|
26
|
+
prompt = MINIO_PROMPT;
|
|
27
|
+
minioConfig;
|
|
28
|
+
minioOps;
|
|
29
|
+
minioCommands;
|
|
30
|
+
constructor(config) {
|
|
31
|
+
super(minioToS3Config(config));
|
|
32
|
+
this.minioConfig = config;
|
|
33
|
+
this.minioOps = remapOpsResource(super.ops(), ResourceName.MINIO);
|
|
34
|
+
this.minioCommands = remapCommandsResource(super.commands(), ResourceName.MINIO);
|
|
35
|
+
}
|
|
36
|
+
ops() {
|
|
37
|
+
return this.minioOps;
|
|
38
|
+
}
|
|
39
|
+
commands() {
|
|
40
|
+
return this.minioCommands;
|
|
41
|
+
}
|
|
42
|
+
getState() {
|
|
43
|
+
return Promise.resolve({
|
|
44
|
+
type: this.kind,
|
|
45
|
+
config: redactMinIOConfig(this.minioConfig)
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
loadState(_state) {
|
|
49
|
+
return Promise.resolve();
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export {
|
|
54
|
+
MINIO_PROMPT,
|
|
55
|
+
MinIOResource
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=chunk-Q6CDMOM6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/minio/minio.ts","../src/resource/minio/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 minioToS3Config,\n redactMinIOConfig,\n type MinIOConfig,\n type MinIOConfigRedacted,\n} from './config.ts'\nimport { MINIO_PROMPT } from './prompt.ts'\n\nexport interface MinIOResourceState {\n type: string\n config: MinIOConfigRedacted\n}\n\nexport class MinIOResource extends S3Resource {\n override readonly kind: string = ResourceName.MINIO\n override readonly prompt: string = MINIO_PROMPT\n readonly minioConfig: MinIOConfig\n private readonly minioOps: readonly RegisteredOp[]\n private readonly minioCommands: readonly RegisteredCommand[]\n\n constructor(config: MinIOConfig) {\n super(minioToS3Config(config))\n this.minioConfig = config\n this.minioOps = remapOpsResource(super.ops(), ResourceName.MINIO)\n this.minioCommands = remapCommandsResource(super.commands(), ResourceName.MINIO)\n }\n\n override ops(): readonly RegisteredOp[] {\n return this.minioOps\n }\n\n override commands(): readonly RegisteredCommand[] {\n return this.minioCommands\n }\n\n override getState(): Promise<MinIOResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactMinIOConfig(this.minioConfig),\n })\n }\n\n override loadState(_state: MinIOResourceState): 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 MINIO_PROMPT = `\\\n{prefix}\n Remote MinIO 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,eAAe;AAAA;AAAA;AAAA;AAAA;;;ADqBrB,IAAM,gBAAN,cAA4B,WAAW;AAAA,EAC1B,OAAe,aAAa;AAAA,EAC5B,SAAiB;AAAA,EAC1B;AAAA,EACQ;AAAA,EACA;AAAA,EAEjB,YAAY,QAAqB;AAC/B,UAAM,gBAAgB,MAAM,CAAC;AAC7B,SAAK,cAAc;AACnB,SAAK,WAAW,iBAAiB,MAAM,IAAI,GAAG,aAAa,KAAK;AAChE,SAAK,gBAAgB,sBAAsB,MAAM,SAAS,GAAG,aAAa,KAAK;AAAA,EACjF;AAAA,EAES,MAA+B;AACtC,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAAyC;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAAwC;AAC/C,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,kBAAkB,KAAK,WAAW;AAAA,IAC5C,CAAC;AAAA,EACH;AAAA,EAES,UAAU,QAA2C;AAC5D,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
// src/resource/supabase/config.ts
|
|
2
|
-
import { normalizeFields } from "@struktoai/mirage-core";
|
|
2
|
+
import { normalizeFields, redactConfigWithSchema, secretStr, z } from "@struktoai/mirage-core";
|
|
3
|
+
var SupabaseConfigSchema = z.object({
|
|
4
|
+
bucket: z.string(),
|
|
5
|
+
region: z.string(),
|
|
6
|
+
projectRef: z.string().optional(),
|
|
7
|
+
endpoint: z.string(),
|
|
8
|
+
accessKeyId: secretStr(),
|
|
9
|
+
secretAccessKey: secretStr(),
|
|
10
|
+
sessionToken: secretStr().optional(),
|
|
11
|
+
timeoutMs: z.number().optional()
|
|
12
|
+
});
|
|
3
13
|
function resolvedSupabaseEndpoint(config) {
|
|
4
14
|
if (config.endpoint !== void 0 && config.endpoint !== "") return config.endpoint;
|
|
5
15
|
if (config.projectRef !== void 0 && config.projectRef !== "") {
|
|
@@ -20,16 +30,10 @@ function supabaseToS3Config(config) {
|
|
|
20
30
|
};
|
|
21
31
|
}
|
|
22
32
|
function redactSupabaseConfig(config) {
|
|
23
|
-
return {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
endpoint: resolvedSupabaseEndpoint(config),
|
|
28
|
-
accessKeyId: "<REDACTED>",
|
|
29
|
-
secretAccessKey: "<REDACTED>",
|
|
30
|
-
...config.sessionToken !== void 0 ? { sessionToken: "<REDACTED>" } : {},
|
|
31
|
-
...config.timeoutMs !== void 0 ? { timeoutMs: config.timeoutMs } : {}
|
|
32
|
-
};
|
|
33
|
+
return redactConfigWithSchema(SupabaseConfigSchema, {
|
|
34
|
+
...config,
|
|
35
|
+
endpoint: resolvedSupabaseEndpoint(config)
|
|
36
|
+
});
|
|
33
37
|
}
|
|
34
38
|
function normalizeSupabaseConfig(input) {
|
|
35
39
|
return normalizeFields(input, {
|
|
@@ -49,9 +53,10 @@ function normalizeSupabaseConfig(input) {
|
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
export {
|
|
56
|
+
SupabaseConfigSchema,
|
|
52
57
|
resolvedSupabaseEndpoint,
|
|
53
58
|
supabaseToS3Config,
|
|
54
59
|
redactSupabaseConfig,
|
|
55
60
|
normalizeSupabaseConfig
|
|
56
61
|
};
|
|
57
|
-
//# sourceMappingURL=chunk-
|
|
62
|
+
//# sourceMappingURL=chunk-QGRDPSAH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/supabase/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { normalizeFields, redactConfigWithSchema, secretStr, z } from '@struktoai/mirage-core'\nimport type { S3Config } from '../s3/config.ts'\n\nexport interface SupabaseConfig {\n bucket: string\n region: string\n accessKeyId: string\n secretAccessKey: string\n projectRef?: string\n endpoint?: string\n sessionToken?: string\n timeoutMs?: number\n}\n\nexport interface SupabaseConfigRedacted {\n bucket: string\n region: string\n projectRef?: string\n endpoint: string\n accessKeyId: string\n secretAccessKey: string\n sessionToken?: string\n timeoutMs?: number\n}\n\nexport const SupabaseConfigSchema = z.object({\n bucket: z.string(),\n region: z.string(),\n projectRef: z.string().optional(),\n endpoint: z.string(),\n accessKeyId: secretStr(),\n secretAccessKey: secretStr(),\n sessionToken: secretStr().optional(),\n timeoutMs: z.number().optional(),\n})\n\nexport function resolvedSupabaseEndpoint(config: SupabaseConfig): string {\n if (config.endpoint !== undefined && config.endpoint !== '') return config.endpoint\n if (config.projectRef !== undefined && config.projectRef !== '') {\n return `https://${config.projectRef}.storage.supabase.co/storage/v1/s3`\n }\n throw new Error('SupabaseConfig requires projectRef or endpoint')\n}\n\nexport function supabaseToS3Config(config: SupabaseConfig): S3Config {\n return {\n bucket: config.bucket,\n region: config.region,\n endpoint: resolvedSupabaseEndpoint(config),\n accessKeyId: config.accessKeyId,\n secretAccessKey: config.secretAccessKey,\n forcePathStyle: true,\n ...(config.sessionToken !== undefined ? { sessionToken: config.sessionToken } : {}),\n ...(config.timeoutMs !== undefined ? { timeoutMs: config.timeoutMs } : {}),\n }\n}\n\nexport function redactSupabaseConfig(config: SupabaseConfig): SupabaseConfigRedacted {\n return redactConfigWithSchema(SupabaseConfigSchema, {\n ...config,\n endpoint: resolvedSupabaseEndpoint(config),\n }) as unknown as SupabaseConfigRedacted\n}\n\nexport function normalizeSupabaseConfig(input: Record<string, unknown>): SupabaseConfig {\n return normalizeFields(input, {\n rename: {\n project_ref: 'projectRef',\n access_key_id: 'accessKeyId',\n secret_access_key: 'secretAccessKey',\n session_token: 'sessionToken',\n 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 SupabaseConfig\n}\n"],"mappings":";AAcA,SAAS,iBAAiB,wBAAwB,WAAW,SAAS;AAyB/D,IAAM,uBAAuB,EAAE,OAAO;AAAA,EAC3C,QAAQ,EAAE,OAAO;AAAA,EACjB,QAAQ,EAAE,OAAO;AAAA,EACjB,YAAY,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,UAAU,EAAE,OAAO;AAAA,E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odb.ts
|
|
2
2
|
import {
|
|
3
|
+
BaseResource,
|
|
3
4
|
detectMongoScope,
|
|
4
5
|
MONGODB_COMMANDS,
|
|
5
6
|
MONGODB_OPS,
|
|
@@ -9,14 +10,15 @@ import {
|
|
|
9
10
|
mongoReaddir,
|
|
10
11
|
mongoStat,
|
|
11
12
|
PathSpec,
|
|
12
|
-
RAMIndexCacheStore,
|
|
13
13
|
resolveMongoGlob,
|
|
14
14
|
ResourceName,
|
|
15
15
|
resolveMongoDBConfig
|
|
16
16
|
} from "@struktoai/mirage-core";
|
|
17
17
|
|
|
18
18
|
// src/resource/mongodb/store.ts
|
|
19
|
-
import {
|
|
19
|
+
import {
|
|
20
|
+
loadOptionalPeer
|
|
21
|
+
} from "@struktoai/mirage-core";
|
|
20
22
|
var MongoDBStore = class {
|
|
21
23
|
uri;
|
|
22
24
|
clientPromise = null;
|
|
@@ -28,10 +30,22 @@ var MongoDBStore = class {
|
|
|
28
30
|
const r = await c.db().admin().listDatabases();
|
|
29
31
|
return r.databases.map((d) => d.name);
|
|
30
32
|
}
|
|
31
|
-
async listCollections(database) {
|
|
33
|
+
async listCollections(database, kind = null) {
|
|
32
34
|
const c = await this._client();
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
+
const filter = kind === null ? void 0 : { type: kind };
|
|
36
|
+
const cols = await c.db(database).listCollections(filter).toArray();
|
|
37
|
+
return cols.map((col) => col.name).sort();
|
|
38
|
+
}
|
|
39
|
+
async listCollectionsDetailed(database, filter = {}) {
|
|
40
|
+
const c = await this._client();
|
|
41
|
+
const cols = await c.db(database).listCollections(filter).toArray();
|
|
42
|
+
return cols.map((col) => {
|
|
43
|
+
const spec = { name: col.name };
|
|
44
|
+
if (col.type !== void 0) spec.type = col.type;
|
|
45
|
+
if (col.options !== void 0)
|
|
46
|
+
spec.options = col.options;
|
|
47
|
+
return spec;
|
|
48
|
+
});
|
|
35
49
|
}
|
|
36
50
|
async findDocuments(database, collection, filter = {}, options = {}) {
|
|
37
51
|
const c = await this._client();
|
|
@@ -43,6 +57,35 @@ var MongoDBStore = class {
|
|
|
43
57
|
if (options.limit !== void 0) cursor = cursor.limit(options.limit);
|
|
44
58
|
return await cursor.toArray();
|
|
45
59
|
}
|
|
60
|
+
async *iterDocuments(database, collection, options = {}) {
|
|
61
|
+
const c = await this._client();
|
|
62
|
+
const filter = options.filter ?? {};
|
|
63
|
+
let cursor = c.db(database).collection(collection).find(filter, {
|
|
64
|
+
...options.projection !== void 0 ? { projection: options.projection } : {}
|
|
65
|
+
});
|
|
66
|
+
if (options.sort !== void 0) cursor = cursor.sort(options.sort);
|
|
67
|
+
if (options.batchSize !== void 0) cursor = cursor.batchSize(options.batchSize);
|
|
68
|
+
if (cursor[Symbol.asyncIterator] === void 0) {
|
|
69
|
+
const all = await cursor.toArray();
|
|
70
|
+
for (const doc of all) yield doc;
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
for await (const doc of cursor) {
|
|
74
|
+
yield doc;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
async *iterInserts(database, collection) {
|
|
78
|
+
const c = await this._client();
|
|
79
|
+
const stream = c.db(database).collection(collection).watch([{ $match: { operationType: "insert" } }]);
|
|
80
|
+
try {
|
|
81
|
+
for await (const change of stream) {
|
|
82
|
+
const doc = change.fullDocument;
|
|
83
|
+
if (doc !== void 0 && doc !== null) yield doc;
|
|
84
|
+
}
|
|
85
|
+
} finally {
|
|
86
|
+
await stream.close();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
46
89
|
async countDocuments(database, collection, filter = {}) {
|
|
47
90
|
const c = await this._client();
|
|
48
91
|
return c.db(database).collection(collection).countDocuments(filter);
|
|
@@ -51,6 +94,18 @@ var MongoDBStore = class {
|
|
|
51
94
|
const c = await this._client();
|
|
52
95
|
return c.db(database).collection(collection).listIndexes().toArray();
|
|
53
96
|
}
|
|
97
|
+
async getIndexStats(database, collection) {
|
|
98
|
+
const c = await this._client();
|
|
99
|
+
const docs = await c.db(database).collection(collection).aggregate([{ $indexStats: {} }]).toArray();
|
|
100
|
+
const out = {};
|
|
101
|
+
for (const d of docs) {
|
|
102
|
+
const name = d.name;
|
|
103
|
+
if (name !== void 0) {
|
|
104
|
+
out[name] = d.accesses ?? {};
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return out;
|
|
108
|
+
}
|
|
54
109
|
async close() {
|
|
55
110
|
if (this.clientPromise === null) return;
|
|
56
111
|
const c = await this.clientPromise;
|
|
@@ -73,7 +128,7 @@ var MongoDBStore = class {
|
|
|
73
128
|
};
|
|
74
129
|
|
|
75
130
|
// src/resource/mongodb/mongodb.ts
|
|
76
|
-
var MongoDBResource = class {
|
|
131
|
+
var MongoDBResource = class extends BaseResource {
|
|
77
132
|
kind = ResourceName.MONGODB;
|
|
78
133
|
isRemote = true;
|
|
79
134
|
indexTtl = 0;
|
|
@@ -81,13 +136,12 @@ var MongoDBResource = class {
|
|
|
81
136
|
config;
|
|
82
137
|
store;
|
|
83
138
|
accessor;
|
|
84
|
-
index;
|
|
85
139
|
constructor(options) {
|
|
140
|
+
super();
|
|
86
141
|
const { config, prefix } = "config" in options ? options : { config: options, prefix: void 0 };
|
|
87
142
|
this.config = resolveMongoDBConfig(config);
|
|
88
143
|
this.store = new MongoDBStore(this.config.uri);
|
|
89
144
|
this.accessor = new MongoDBAccessor(this.store, this.config);
|
|
90
|
-
this.index = new RAMIndexCacheStore({ ttl: this.indexTtl });
|
|
91
145
|
this.prompt = MONGODB_PROMPT.replace("{prefix}", prefix ?? "");
|
|
92
146
|
}
|
|
93
147
|
open() {
|
|
@@ -129,4 +183,4 @@ export {
|
|
|
129
183
|
MongoDBStore,
|
|
130
184
|
MongoDBResource
|
|
131
185
|
};
|
|
132
|
-
//# sourceMappingURL=chunk-
|
|
186
|
+
//# sourceMappingURL=chunk-RLGWMJD3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/mongodb/mongodb.ts","../src/resource/mongodb/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 detectMongoScope,\n type FileStat,\n MONGODB_COMMANDS,\n MONGODB_OPS,\n MONGODB_PROMPT,\n MongoDBAccessor,\n type MongoDBConfig,\n type MongoDBConfigResolved,\n mongoRead,\n mongoReaddir,\n mongoStat,\n PathSpec,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n resolveMongoGlob,\n ResourceName,\n resolveMongoDBConfig,\n} from '@struktoai/mirage-core'\nimport { MongoDBStore } from './store.ts'\n\nvoid detectMongoScope\n\nexport interface MongoDBResourceOptions {\n config: MongoDBConfig\n prefix?: string\n}\n\nexport class MongoDBResource extends BaseResource implements Resource {\n readonly kind: string = ResourceName.MONGODB\n readonly isRemote: boolean = true\n readonly indexTtl: number = 0\n readonly prompt: string\n readonly config: MongoDBConfigResolved\n readonly store: MongoDBStore\n readonly accessor: MongoDBAccessor\n\n constructor(options: MongoDBResourceOptions | MongoDBConfig) {\n super()\n const { config, prefix } =\n 'config' in options ? options : { config: options, prefix: undefined }\n this.config = resolveMongoDBConfig(config)\n this.store = new MongoDBStore(this.config.uri)\n this.accessor = new MongoDBAccessor(this.store, this.config)\n this.prompt = MONGODB_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 MONGODB_OPS\n }\n\n commands(): readonly RegisteredCommand[] {\n return MONGODB_COMMANDS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return mongoRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return mongoReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return mongoStat(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 resolveMongoGlob(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 {\n loadOptionalPeer,\n type EntityKind,\n type MongoCollectionSpec,\n type MongoDriver,\n type MongoFindOptions,\n type MongoIndexAccess,\n type MongoIterOptions,\n} from '@struktoai/mirage-core'\n\ninterface MongoCollectionLike {\n find: (\n filter: Record<string, unknown>,\n options?: { projection?: Record<string, unknown> },\n ) => {\n sort: (sort: Record<string, 1 | -1>) => MongoCursorLike\n skip: (n: number) => MongoCursorLike\n limit: (n: number) => MongoCursorLike\n batchSize: (n: number) => MongoCursorLike\n toArray: () => Promise<Record<string, unknown>[]>\n [Symbol.asyncIterator]?: () => AsyncIterableIterator<Record<string, unknown>>\n }\n countDocuments: (filter?: Record<string, unknown>) => Promise<number>\n listIndexes: () => { toArray: () => Promise<Record<string, unknown>[]> }\n aggregate: (pipeline: unknown[]) => { toArray: () => Promise<Record<string, unknown>[]> }\n watch: (\n pipeline?: unknown[],\n ) => AsyncIterableIterator<Record<string, unknown>> & { close: () => Promise<void> }\n}\n\ninterface MongoCursorLike {\n sort: (sort: Record<string, 1 | -1>) => MongoCursorLike\n skip: (n: number) => MongoCursorLike\n limit: (n: number) => MongoCursorLike\n batchSize: (n: number) => MongoCursorLike\n toArray: () => Promise<Record<string, unknown>[]>\n [Symbol.asyncIterator]?: () => AsyncIterableIterator<Record<string, unknown>>\n}\n\ninterface MongoDbLike {\n listCollections: (filter?: Record<string, unknown>) => {\n toArray: () => Promise<Record<string, unknown>[]>\n }\n collection: (name: string) => MongoCollectionLike\n admin: () => { listDatabases: () => Promise<{ databases: { name: string }[] }> }\n}\n\ninterface MongoClientLike {\n connect: () => Promise<MongoClientLike>\n db: (name?: string) => MongoDbLike\n close: () => Promise<void>\n}\n\ninterface MongoModule {\n MongoClient: new (uri: string) => MongoClientLike\n}\n\nexport class MongoDBStore implements MongoDriver {\n readonly uri: string\n private clientPromise: Promise<MongoClientLike> | null = null\n\n constructor(uri: string) {\n this.uri = uri\n }\n\n async listDatabases(): Promise<string[]> {\n const c = await this._client()\n const r = await c.db().admin().listDatabases()\n return r.databases.map((d) => d.name)\n }\n\n async listCollections(database: string, kind: EntityKind | null = null): Promise<string[]> {\n const c = await this._client()\n const filter = kind === null ? undefined : { type: kind }\n const cols = await c.db(database).listCollections(filter).toArray()\n return cols.map((col) => col.name as string).sort()\n }\n\n async listCollectionsDetailed(\n database: string,\n filter: { name?: string } = {},\n ): Promise<MongoCollectionSpec[]> {\n const c = await this._client()\n const cols = await c.db(database).listCollections(filter).toArray()\n return cols.map((col) => {\n const spec: MongoCollectionSpec = { name: col.name as string }\n if (col.type !== undefined) spec.type = col.type as string\n if (col.options !== undefined)\n spec.options = col.options as NonNullable<MongoCollectionSpec['options']>\n return spec\n })\n }\n\n async findDocuments<T = Record<string, unknown>>(\n database: string,\n collection: string,\n filter: Record<string, unknown> = {},\n options: MongoFindOptions = {},\n ): Promise<T[]> {\n const c = await this._client()\n let cursor = c\n .db(database)\n .collection(collection)\n .find(filter, {\n ...(options.projection !== undefined ? { projection: options.projection } : {}),\n }) as MongoCursorLike\n if (options.sort !== undefined) cursor = cursor.sort(options.sort)\n if (options.skip !== undefined) cursor = cursor.skip(options.skip)\n if (options.limit !== undefined) cursor = cursor.limit(options.limit)\n return (await cursor.toArray()) as T[]\n }\n\n async *iterDocuments<T = Record<string, unknown>>(\n database: string,\n collection: string,\n options: MongoIterOptions = {},\n ): AsyncIterableIterator<T> {\n const c = await this._client()\n const filter = options.filter ?? {}\n let cursor = c\n .db(database)\n .collection(collection)\n .find(filter, {\n ...(options.projection !== undefined ? { projection: options.projection } : {}),\n }) as MongoCursorLike\n if (options.sort !== undefined) cursor = cursor.sort(options.sort)\n if (options.batchSize !== undefined) cursor = cursor.batchSize(options.batchSize)\n if (cursor[Symbol.asyncIterator] === undefined) {\n const all = (await cursor.toArray()) as T[]\n for (const doc of all) yield doc\n return\n }\n for await (const doc of cursor as unknown as AsyncIterableIterator<T>) {\n yield doc\n }\n }\n\n async *iterInserts<T = Record<string, unknown>>(\n database: string,\n collection: string,\n ): AsyncIterableIterator<T> {\n const c = await this._client()\n const stream = c\n .db(database)\n .collection(collection)\n .watch([{ $match: { operationType: 'insert' } }])\n try {\n for await (const change of stream as AsyncIterableIterator<Record<string, unknown>>) {\n const doc = change.fullDocument\n if (doc !== undefined && doc !== null) yield doc as T\n }\n } finally {\n await stream.close()\n }\n }\n\n async countDocuments(\n database: string,\n collection: string,\n filter: Record<string, unknown> = {},\n ): Promise<number> {\n const c = await this._client()\n return c.db(database).collection(collection).countDocuments(filter)\n }\n\n async listIndexes(database: string, collection: string): Promise<Record<string, unknown>[]> {\n const c = await this._client()\n return c.db(database).collection(collection).listIndexes().toArray()\n }\n\n async getIndexStats(\n database: string,\n collection: string,\n ): Promise<Record<string, MongoIndexAccess>> {\n const c = await this._client()\n const docs = await c\n .db(database)\n .collection(collection)\n .aggregate([{ $indexStats: {} }])\n .toArray()\n const out: Record<string, MongoIndexAccess> = {}\n for (const d of docs) {\n const name = d.name as string | undefined\n if (name !== undefined) {\n out[name] = (d.accesses as MongoIndexAccess | undefined) ?? {}\n }\n }\n return out\n }\n\n async close(): Promise<void> {\n if (this.clientPromise === null) return\n const c = await this.clientPromise\n this.clientPromise = null\n await c.close()\n }\n\n private async _client(): Promise<MongoClientLike> {\n this.clientPromise ??= this._connect()\n return this.clientPromise\n }\n\n protected async _connect(): Promise<MongoClientLike> {\n const mod = await loadOptionalPeer(() => import('mongodb') as unknown as Promise<MongoModule>, {\n feature: 'MongoDBResource',\n packageName: 'mongodb',\n })\n const c = new mod.MongoClient(this.uri)\n await c.connect()\n return c\n }\n}\n"],"mappings":";AAcA;AAAA,EACE;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACpBP;AAAA,EACE;AAAA,OAOK;AAiDA,IAAM,eAAN,MAA0C;AAAA,EACtC;AAAA,EACD,gBAAiD;AAAA,EAEzD,YAAY,KAAa;AACvB,SAAK,MAAM;AAAA,EACb;AAAA,EAEA,MAAM,gBAAmC;AACvC,UAAM,IAAI,MAAM,KAAK,QAAQ;AAC7B,UAAM,IAAI,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,cAAc;AAC7C,WAAO,EAAE,UAAU,IAAI,CAAC,MAAM,EAAE,IAAI;AAAA,EACtC;AAAA,EAEA,MAAM,gBAAgB,UAAkB,OAA0B,MAAyB;AACzF,UAAM,IAAI,MAAM,KAAK,QAAQ;AAC7B,UAAM,SAAS,SAAS,OAAO,SAAY,EAAE,MAAM,KAAK;AACxD,UAAM,OAAO,MAAM,EAAE,GAAG,QAAQ,EAAE,gBAAgB,MAAM,E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EA,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,UAAU,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAC/C;AAAA,EAEA,QAAQ,GAAgC;AACtC,WAAO,aAAa,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAClD;AAAA,EAEA,KAAK,GAAgC;AACnC,WAAO,UAAU,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAC/C;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,iBAAiB,KAAK,UAAU,WAAW,KAAK,KAAK;AAAA,EAC9D;AACF;","names":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// src/resource/trello/config.ts
|
|
2
|
+
import { normalizeFields, redactConfigWithSchema, secretStr, z } from "@struktoai/mirage-core";
|
|
3
|
+
var TrelloConfigSchema = z.object({
|
|
4
|
+
apiKey: secretStr(),
|
|
5
|
+
apiToken: secretStr(),
|
|
6
|
+
workspaceId: z.string().optional(),
|
|
7
|
+
boardIds: z.array(z.string()).optional(),
|
|
8
|
+
baseUrl: z.string().optional()
|
|
9
|
+
});
|
|
10
|
+
function redactTrelloConfig(config) {
|
|
11
|
+
return redactConfigWithSchema(TrelloConfigSchema, config);
|
|
12
|
+
}
|
|
13
|
+
function normalizeTrelloConfig(input) {
|
|
14
|
+
return normalizeFields(input, {
|
|
15
|
+
rename: {
|
|
16
|
+
api_key: "apiKey",
|
|
17
|
+
api_token: "apiToken",
|
|
18
|
+
workspace_id: "workspaceId",
|
|
19
|
+
board_ids: "boardIds",
|
|
20
|
+
base_url: "baseUrl"
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
TrelloConfigSchema,
|
|
27
|
+
redactTrelloConfig,
|
|
28
|
+
normalizeTrelloConfig
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=chunk-RO5IQEDQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/trello/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 TrelloConfig {\n apiKey: string\n apiToken: string\n workspaceId?: string\n boardIds?: readonly string[]\n baseUrl?: string\n}\n\nexport interface TrelloConfigRedacted {\n apiKey: '<REDACTED>'\n apiToken: '<REDACTED>'\n workspaceId?: string\n boardIds?: readonly string[]\n baseUrl?: string\n}\n\nexport const TrelloConfigSchema = z.object({\n apiKey: secretStr(),\n apiToken: secretStr(),\n workspaceId: z.string().optional(),\n boardIds: z.array(z.string()).optional(),\n baseUrl: z.string().optional(),\n})\n\nexport function redactTrelloConfig(config: TrelloConfig): TrelloConfigRedacted {\n return redactConfigWithSchema(TrelloConfigSchema, config) as unknown as TrelloConfigRedacted\n}\n\nexport function normalizeTrelloConfig(input: Record<string, unknown>): TrelloConfig {\n return normalizeFields(input, {\n rename: {\n api_key: 'apiKey',\n api_token: 'apiToken',\n workspace_id: 'workspaceId',\n board_ids: 'boardIds',\n base_url: 'baseUrl',\n },\n }) as unknown as TrelloConfig\n}\n"],"mappings":";AAcA,SAAS,iBAAiB,wBAAwB,WAAW,SAAS;AAkB/D,IAAM,qBAAqB,EAAE,OAAO;AAAA,EACzC,QAAQ,UAAU;AAAA,EAClB,UAAU,UAAU;AAAA,EACpB,aAAa,EAAE,OAAO,EAAE,SAAS;AAAA,EACjC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS;AAAA,EACvC,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;AAAA,MACN,SAAS;AAAA,MACT,WAAW;AAAA,MACX,cAAc;AAAA,MACd,WAAW;AAAA,MACX,UAAU;AAAA,IACZ;AAAA,EACF,CAAC;AACH;","names":[]}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
// src/resource/oci/config.ts
|
|
2
|
-
import { normalizeFields } from "@struktoai/mirage-core";
|
|
2
|
+
import { normalizeFields, redactConfigWithSchema, secretStr, z } from "@struktoai/mirage-core";
|
|
3
|
+
var OCIConfigSchema = z.object({
|
|
4
|
+
bucket: z.string(),
|
|
5
|
+
namespace: z.string(),
|
|
6
|
+
region: z.string(),
|
|
7
|
+
accessKeyId: secretStr(),
|
|
8
|
+
secretAccessKey: secretStr(),
|
|
9
|
+
endpoint: z.string(),
|
|
10
|
+
timeoutMs: z.number().optional()
|
|
11
|
+
});
|
|
3
12
|
function resolvedOciEndpoint(config) {
|
|
4
13
|
if (config.endpoint !== void 0 && config.endpoint !== "") return config.endpoint;
|
|
5
14
|
return `https://${config.namespace}.compat.objectstorage.${config.region}.oci.customer-oci.com`;
|
|
@@ -16,15 +25,10 @@ function ociToS3Config(config) {
|
|
|
16
25
|
};
|
|
17
26
|
}
|
|
18
27
|
function redactOciConfig(config) {
|
|
19
|
-
return {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
accessKeyId: "<REDACTED>",
|
|
24
|
-
secretAccessKey: "<REDACTED>",
|
|
25
|
-
endpoint: resolvedOciEndpoint(config),
|
|
26
|
-
...config.timeoutMs !== void 0 ? { timeoutMs: config.timeoutMs } : {}
|
|
27
|
-
};
|
|
28
|
+
return redactConfigWithSchema(OCIConfigSchema, {
|
|
29
|
+
...config,
|
|
30
|
+
endpoint: resolvedOciEndpoint(config)
|
|
31
|
+
});
|
|
28
32
|
}
|
|
29
33
|
function normalizeOciConfig(input) {
|
|
30
34
|
return normalizeFields(input, {
|
|
@@ -42,9 +46,10 @@ function normalizeOciConfig(input) {
|
|
|
42
46
|
}
|
|
43
47
|
|
|
44
48
|
export {
|
|
49
|
+
OCIConfigSchema,
|
|
45
50
|
resolvedOciEndpoint,
|
|
46
51
|
ociToS3Config,
|
|
47
52
|
redactOciConfig,
|
|
48
53
|
normalizeOciConfig
|
|
49
54
|
};
|
|
50
|
-
//# sourceMappingURL=chunk-
|
|
55
|
+
//# sourceMappingURL=chunk-RQK5UPMP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/oci/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 OCIConfig {\n bucket: string\n namespace: string\n region: string\n accessKeyId: string\n secretAccessKey: string\n endpoint?: string\n timeoutMs?: number\n}\n\nexport interface OCIConfigRedacted {\n bucket: string\n namespace: string\n region: string\n accessKeyId: string\n secretAccessKey: string\n endpoint: string\n timeoutMs?: number\n}\n\nexport const OCIConfigSchema = z.object({\n bucket: z.string(),\n namespace: z.string(),\n region: z.string(),\n accessKeyId: secretStr(),\n secretAccessKey: secretStr(),\n endpoint: z.string(),\n timeoutMs: z.number().optional(),\n})\n\nexport function resolvedOciEndpoint(config: OCIConfig): string {\n if (config.endpoint !== undefined && config.endpoint !== '') return config.endpoint\n return `https://${config.namespace}.compat.objectstorage.${config.region}.oci.customer-oci.com`\n}\n\nexport function ociToS3Config(config: OCIConfig): S3Config {\n return {\n bucket: config.bucket,\n region: config.region,\n endpoint: resolvedOciEndpoint(config),\n accessKeyId: config.accessKeyId,\n secretAccessKey: config.secretAccessKey,\n forcePathStyle: true,\n ...(config.timeoutMs !== undefined ? { timeoutMs: config.timeoutMs } : {}),\n }\n}\n\nexport function redactOciConfig(config: OCIConfig): OCIConfigRedacted {\n return redactConfigWithSchema(OCIConfigSchema, {\n ...config,\n endpoint: resolvedOciEndpoint(config),\n }) as unknown as OCIConfigRedacted\n}\n\nexport function normalizeOciConfig(input: Record<string, unknown>): OCIConfig {\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 OCIConfig\n}\n"],"mappings":";AAcA,SAAS,iBAAiB,wBAAwB,WAAW,SAA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"./chunk-WSGEIVY3.js";
|
|
5
|
+
import {
|
|
6
|
+
assertHfRepoId,
|
|
7
|
+
redactHfRepoConfig
|
|
8
|
+
} from "./chunk-EGB7V74Z.js";
|
|
9
|
+
|
|
10
|
+
// src/resource/hf_datasets/hf_datasets.ts
|
|
11
|
+
import { normalizeKeyPrefix, ResourceName } from "@struktoai/mirage-core";
|
|
12
|
+
|
|
13
|
+
// src/resource/hf_datasets/prompt.ts
|
|
14
|
+
var HF_DATASETS_PROMPT = `{prefix}
|
|
15
|
+
Remote Hugging Face Dataset. Maps dataset repo files to virtual paths.
|
|
16
|
+
IMPORTANT: This is a remote mount. Prefer targeted reads (grep, head) over full scans. Large parquet/safetensors files stream lazily via byte-range reads.
|
|
17
|
+
Supports: ls, cat, head, tail, grep, rg, wc, find, tree, jq, stat.`;
|
|
18
|
+
|
|
19
|
+
// src/resource/hf_datasets/hf_datasets.ts
|
|
20
|
+
var HfDatasetsResource = class extends HfResource {
|
|
21
|
+
kind = ResourceName.HF_DATASETS;
|
|
22
|
+
prompt = HF_DATASETS_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 HfDatasetsAccessor(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_DATASETS_PROMPT,
|
|
48
|
+
HfDatasetsResource
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=chunk-RQYEEA2O.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/hf_datasets/hf_datasets.ts","../src/resource/hf_datasets/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 { HfDatasetsAccessor } 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_DATASETS_PROMPT } from './prompt.ts'\n\nexport interface HfDatasetsResourceState {\n type: string\n config: HfRepoConfigRedacted\n}\n\nexport class HfDatasetsResource extends HfResource {\n readonly kind: string = ResourceName.HF_DATASETS\n readonly prompt: string = HF_DATASETS_PROMPT\n readonly config: HfRepoConfig\n readonly accessor: HfDatasetsAccessor\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 HfDatasetsAccessor(this.config)\n }\n\n getState(): Promise<HfDatasetsResourceState> {\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_DATASETS_PROMPT = `{prefix}\n Remote Hugging Face Dataset. Maps dataset repo files to virtual paths.\n IMPORTANT: This is a remote mount. Prefer targeted reads (grep, head) over full scans. Large parquet/safetensors files stream lazily via byte-range reads.\n Supports: ls, cat, head, tail, grep, rg, wc, find, tree, jq, stat.`\n"],"mappings":";;;;;;;;;;AAcA,SAAS,oBAAoB,oBAAoB;;;ACA1C,IAAM,qBAAqB;AAAA;AAAA;AAAA;;;ADgB3B,IAAM,qBAAN,cAAiC,WAAW;AAAA,EACxC,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,mBAAmB,KAAK,MAAM;AAAA,EACpD;AAAA,EAEA,WAA6C;AAC3C,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,mBAAmB,KAAK,MAAM;AAAA,IACxC,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/resource/slack/config.ts
|
|
2
|
+
import { normalizeFields, redactConfigWithSchema, secretStr, z } from "@struktoai/mirage-core";
|
|
3
|
+
var SlackConfigSchema = z.object({
|
|
4
|
+
token: secretStr(),
|
|
5
|
+
searchToken: secretStr().optional()
|
|
6
|
+
});
|
|
7
|
+
function redactSlackConfig(config) {
|
|
8
|
+
return redactConfigWithSchema(SlackConfigSchema, config);
|
|
9
|
+
}
|
|
10
|
+
function normalizeSlackConfig(input) {
|
|
11
|
+
return normalizeFields(input, {
|
|
12
|
+
rename: { search_token: "searchToken" }
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
SlackConfigSchema,
|
|
18
|
+
redactSlackConfig,
|
|
19
|
+
normalizeSlackConfig
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=chunk-SFUCUARB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/slack/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 SlackConfig {\n token: string\n searchToken?: string\n}\n\nexport interface SlackConfigRedacted {\n token: '<REDACTED>'\n searchToken?: '<REDACTED>'\n}\n\nexport const SlackConfigSchema = z.object({\n token: secretStr(),\n searchToken: secretStr().optional(),\n})\n\nexport function redactSlackConfig(config: SlackConfig): SlackConfigRedacted {\n return redactConfigWithSchema(SlackConfigSchema, config) as unknown as SlackConfigRedacted\n}\n\nexport function normalizeSlackConfig(input: Record<string, unknown>): SlackConfig {\n return normalizeFields(input, {\n rename: { search_token: 'searchToken' },\n }) as unknown as SlackConfig\n}\n"],"mappings":";AAcA,SAAS,iBAAiB,wBAAwB,WAAW,SAAS;AAY/D,IAAM,oBAAoB,EAAE,OAAO;AAAA,EACxC,OAAO,UAAU;AAAA,EACjB,aAAa,UAAU,EAAE,SAAS;AACpC,CAAC;AAEM,SAAS,kBAAkB,QAA0C;AAC1E,SAAO,uBAAuB,mBAAmB,MAAM;AACzD;AAEO,SAAS,qBAAqB,OAA6C;AAChF,SAAO,gBAAgB,OAAO;AAAA,IAC5B,QAAQ,EAAE,cAAc,cAAc;AAAA,EACxC,CAAC;AACH;","names":[]}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
redactGDriveConfig
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DP2PP5V2.js";
|
|
4
4
|
|
|
5
5
|
// src/resource/gdrive/gdrive.ts
|
|
6
6
|
import {
|
|
7
|
+
BaseResource,
|
|
7
8
|
GDRIVE_COMMANDS,
|
|
8
9
|
GDRIVE_PROMPT,
|
|
9
10
|
GDRIVE_VFS_OPS,
|
|
10
11
|
GDriveAccessor,
|
|
11
12
|
PathSpec,
|
|
12
|
-
RAMIndexCacheStore,
|
|
13
13
|
ResourceName,
|
|
14
14
|
TokenManager,
|
|
15
15
|
gdriveRead,
|
|
@@ -17,15 +17,15 @@ import {
|
|
|
17
17
|
gdriveResolveGlob,
|
|
18
18
|
gdriveStat
|
|
19
19
|
} from "@struktoai/mirage-core";
|
|
20
|
-
var GDriveResource = class {
|
|
20
|
+
var GDriveResource = class extends BaseResource {
|
|
21
21
|
kind = ResourceName.GDRIVE;
|
|
22
22
|
isRemote = true;
|
|
23
23
|
indexTtl = 86400;
|
|
24
24
|
prompt = GDRIVE_PROMPT;
|
|
25
25
|
config;
|
|
26
26
|
accessor;
|
|
27
|
-
index;
|
|
28
27
|
constructor(config) {
|
|
28
|
+
super();
|
|
29
29
|
this.config = config;
|
|
30
30
|
const tm = new TokenManager({
|
|
31
31
|
clientId: config.clientId,
|
|
@@ -33,7 +33,6 @@ var GDriveResource = class {
|
|
|
33
33
|
refreshToken: config.refreshToken
|
|
34
34
|
});
|
|
35
35
|
this.accessor = new GDriveAccessor({ tokenManager: tm });
|
|
36
|
-
this.index = new RAMIndexCacheStore({ ttl: 86400 });
|
|
37
36
|
}
|
|
38
37
|
open() {
|
|
39
38
|
return Promise.resolve();
|
|
@@ -75,8 +74,6 @@ var GDriveResource = class {
|
|
|
75
74
|
getState() {
|
|
76
75
|
return Promise.resolve({
|
|
77
76
|
type: this.kind,
|
|
78
|
-
needsOverride: true,
|
|
79
|
-
redactedFields: ["clientSecret", "refreshToken"],
|
|
80
77
|
config: redactGDriveConfig(this.config)
|
|
81
78
|
});
|
|
82
79
|
}
|
|
@@ -88,4 +85,4 @@ var GDriveResource = class {
|
|
|
88
85
|
export {
|
|
89
86
|
GDriveResource
|
|
90
87
|
};
|
|
91
|
-
//# sourceMappingURL=chunk-
|
|
88
|
+
//# sourceMappingURL=chunk-TRTUHCS4.js.map
|