@struktoai/mirage-node 0.0.2-alpha.0 → 0.0.3-alpha.0
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 +61 -127
- 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
package/dist/index.js
CHANGED
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DropboxResource
|
|
3
|
-
} from "./chunk-5E6BULAK.js";
|
|
4
|
-
import {
|
|
5
|
-
BoxResource
|
|
6
|
-
} from "./chunk-6M2NL363.js";
|
|
7
|
-
import {
|
|
8
|
-
normalizeBoxConfig,
|
|
9
|
-
redactBoxConfig
|
|
10
|
-
} from "./chunk-EKPH4MMD.js";
|
|
11
1
|
import {
|
|
12
2
|
GmailResource
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import {
|
|
15
|
-
normalizeGmailConfig,
|
|
16
|
-
redactGmailConfig
|
|
17
|
-
} from "./chunk-GO67AOYK.js";
|
|
3
|
+
} from "./chunk-HEHERHQ5.js";
|
|
18
4
|
import {
|
|
19
5
|
EMAIL_COMMANDS,
|
|
20
6
|
EMAIL_OPS,
|
|
@@ -22,139 +8,272 @@ import {
|
|
|
22
8
|
EMAIL_WRITE_PROMPT,
|
|
23
9
|
EmailAccessor,
|
|
24
10
|
EmailResource
|
|
25
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-DTAY7LPC.js";
|
|
26
12
|
import {
|
|
27
13
|
buildEmailConfig,
|
|
28
14
|
normalizeEmailConfig,
|
|
29
15
|
redactEmailConfig
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import {
|
|
32
|
-
GDocsResource
|
|
33
|
-
} from "./chunk-NOZZFJEB.js";
|
|
34
|
-
import {
|
|
35
|
-
GSheetsResource
|
|
36
|
-
} from "./chunk-3PBSL7BS.js";
|
|
37
|
-
import {
|
|
38
|
-
normalizeGSheetsConfig,
|
|
39
|
-
redactGSheetsConfig
|
|
40
|
-
} from "./chunk-I4RRGZGB.js";
|
|
16
|
+
} from "./chunk-B2ZOKNN4.js";
|
|
41
17
|
import {
|
|
42
18
|
GSlidesResource
|
|
43
|
-
} from "./chunk-
|
|
44
|
-
import {
|
|
45
|
-
normalizeGSlidesConfig,
|
|
46
|
-
redactGSlidesConfig
|
|
47
|
-
} from "./chunk-5ITBZN55.js";
|
|
19
|
+
} from "./chunk-E7RW3SBV.js";
|
|
48
20
|
import {
|
|
49
21
|
GDriveResource
|
|
50
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-TRTUHCS4.js";
|
|
51
23
|
import {
|
|
52
24
|
normalizeGDriveConfig,
|
|
53
25
|
redactGDriveConfig
|
|
54
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-DP2PP5V2.js";
|
|
27
|
+
import {
|
|
28
|
+
DropboxResource
|
|
29
|
+
} from "./chunk-5YOCVEUB.js";
|
|
55
30
|
import {
|
|
56
31
|
normalizeDropboxConfig,
|
|
57
32
|
redactDropboxConfig
|
|
58
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-Q2IAILVC.js";
|
|
59
34
|
import {
|
|
60
|
-
|
|
61
|
-
} from "./chunk-
|
|
35
|
+
BoxResource
|
|
36
|
+
} from "./chunk-A4Z6DZ22.js";
|
|
62
37
|
import {
|
|
63
|
-
|
|
64
|
-
|
|
38
|
+
normalizeBoxConfig,
|
|
39
|
+
redactBoxConfig
|
|
40
|
+
} from "./chunk-OZAEWZZ3.js";
|
|
65
41
|
import {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
} from "./chunk-
|
|
42
|
+
normalizeGoogleConfig,
|
|
43
|
+
redactGoogleConfig
|
|
44
|
+
} from "./chunk-54NTYJEO.js";
|
|
69
45
|
import {
|
|
70
46
|
GitHubResource
|
|
71
|
-
} from "./chunk-
|
|
72
|
-
import {
|
|
73
|
-
normalizeGitHubConfig,
|
|
74
|
-
redactGitHubConfig
|
|
75
|
-
} from "./chunk-VCLMTMSO.js";
|
|
47
|
+
} from "./chunk-YPT4JBUY.js";
|
|
76
48
|
import {
|
|
77
49
|
GitHubCIResource
|
|
78
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-ABTEGAFB.js";
|
|
79
51
|
import {
|
|
80
52
|
normalizeGitHubCIConfig,
|
|
81
53
|
redactGitHubCIConfig
|
|
82
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-H3I2KZIY.js";
|
|
55
|
+
import {
|
|
56
|
+
GDocsResource
|
|
57
|
+
} from "./chunk-A7X4L4JM.js";
|
|
83
58
|
import {
|
|
84
59
|
normalizeGDocsConfig,
|
|
85
60
|
redactGDocsConfig
|
|
86
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-H3BST2LI.js";
|
|
62
|
+
import {
|
|
63
|
+
GSheetsResource
|
|
64
|
+
} from "./chunk-XRU5WXZX.js";
|
|
65
|
+
import {
|
|
66
|
+
normalizeGSheetsConfig,
|
|
67
|
+
redactGSheetsConfig
|
|
68
|
+
} from "./chunk-LW25LMIH.js";
|
|
69
|
+
import {
|
|
70
|
+
normalizeGSlidesConfig,
|
|
71
|
+
redactGSlidesConfig
|
|
72
|
+
} from "./chunk-W7FLHT65.js";
|
|
73
|
+
import {
|
|
74
|
+
TrelloResource
|
|
75
|
+
} from "./chunk-ERELJ7BS.js";
|
|
76
|
+
import {
|
|
77
|
+
LinearResource
|
|
78
|
+
} from "./chunk-YAVGCQUP.js";
|
|
79
|
+
import {
|
|
80
|
+
normalizeLinearConfig,
|
|
81
|
+
redactLinearConfig
|
|
82
|
+
} from "./chunk-YUK3X3B4.js";
|
|
83
|
+
import {
|
|
84
|
+
NotionResource
|
|
85
|
+
} from "./chunk-CASCUFK2.js";
|
|
86
|
+
import {
|
|
87
|
+
normalizeNotionConfig,
|
|
88
|
+
redactNotionConfig
|
|
89
|
+
} from "./chunk-JZT4QGIP.js";
|
|
90
|
+
import {
|
|
91
|
+
LangfuseResource
|
|
92
|
+
} from "./chunk-5DLOHQJ2.js";
|
|
93
|
+
import {
|
|
94
|
+
normalizeLangfuseConfig,
|
|
95
|
+
redactLangfuseConfig
|
|
96
|
+
} from "./chunk-VGLHY6BK.js";
|
|
97
|
+
import {
|
|
98
|
+
normalizeGitHubConfig,
|
|
99
|
+
redactGitHubConfig
|
|
100
|
+
} from "./chunk-TWGVQLG2.js";
|
|
101
|
+
import {
|
|
102
|
+
MongoDBResource,
|
|
103
|
+
MongoDBStore
|
|
104
|
+
} from "./chunk-RLGWMJD3.js";
|
|
87
105
|
import {
|
|
88
106
|
SlackResource
|
|
89
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-C6NHEDHY.js";
|
|
108
|
+
import {
|
|
109
|
+
normalizeSlackConfig,
|
|
110
|
+
redactSlackConfig
|
|
111
|
+
} from "./chunk-SFUCUARB.js";
|
|
90
112
|
import {
|
|
91
113
|
SSHAccessor,
|
|
92
114
|
SSHResource,
|
|
93
115
|
SSH_COMMANDS,
|
|
94
116
|
SSH_OPS,
|
|
95
117
|
SSH_PROMPT
|
|
96
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-5HCVKTP3.js";
|
|
97
119
|
import {
|
|
98
120
|
normalizeSshConfig,
|
|
99
121
|
redactSshConfig
|
|
100
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-UGK4TAVK.js";
|
|
101
123
|
import {
|
|
102
124
|
DiscordResource
|
|
103
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-LYDMMNL2.js";
|
|
104
126
|
import {
|
|
105
127
|
normalizeDiscordConfig,
|
|
106
128
|
redactDiscordConfig
|
|
107
|
-
} from "./chunk-
|
|
108
|
-
import {
|
|
109
|
-
TrelloResource
|
|
110
|
-
} from "./chunk-LBBM3LKK.js";
|
|
129
|
+
} from "./chunk-DNBAMB5J.js";
|
|
111
130
|
import {
|
|
112
131
|
normalizeTrelloConfig,
|
|
113
132
|
redactTrelloConfig
|
|
114
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-RO5IQEDQ.js";
|
|
115
134
|
import {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
} from "./chunk-
|
|
135
|
+
TENCENT_PROMPT,
|
|
136
|
+
TencentResource
|
|
137
|
+
} from "./chunk-L6JPBJAS.js";
|
|
138
|
+
import {
|
|
139
|
+
ALIYUN_PROMPT,
|
|
140
|
+
AliyunResource
|
|
141
|
+
} from "./chunk-KTNDT45N.js";
|
|
142
|
+
import {
|
|
143
|
+
redactAliyunConfig,
|
|
144
|
+
resolvedAliyunEndpoint
|
|
145
|
+
} from "./chunk-NJMGCT63.js";
|
|
146
|
+
import {
|
|
147
|
+
SCALEWAY_PROMPT,
|
|
148
|
+
ScalewayResource
|
|
149
|
+
} from "./chunk-FXFDBF3P.js";
|
|
150
|
+
import {
|
|
151
|
+
redactScalewayConfig,
|
|
152
|
+
resolvedScalewayEndpoint
|
|
153
|
+
} from "./chunk-XLQI4IT2.js";
|
|
154
|
+
import {
|
|
155
|
+
QINGSTOR_PROMPT,
|
|
156
|
+
QingStorResource
|
|
157
|
+
} from "./chunk-3IJSIVKT.js";
|
|
158
|
+
import {
|
|
159
|
+
redactQingStorConfig,
|
|
160
|
+
resolvedQingStorEndpoint
|
|
161
|
+
} from "./chunk-OHROA3FQ.js";
|
|
162
|
+
import {
|
|
163
|
+
PostgresResource,
|
|
164
|
+
PostgresStore
|
|
165
|
+
} from "./chunk-NHS7WLEQ.js";
|
|
166
|
+
import {
|
|
167
|
+
CEPH_PROMPT,
|
|
168
|
+
CephResource
|
|
169
|
+
} from "./chunk-C6NHFMIP.js";
|
|
170
|
+
import {
|
|
171
|
+
WASABI_PROMPT,
|
|
172
|
+
WasabiResource
|
|
173
|
+
} from "./chunk-O7ODGJYL.js";
|
|
174
|
+
import {
|
|
175
|
+
redactWasabiConfig,
|
|
176
|
+
resolvedWasabiEndpoint
|
|
177
|
+
} from "./chunk-JALIYI6M.js";
|
|
178
|
+
import {
|
|
179
|
+
BACKBLAZE_PROMPT,
|
|
180
|
+
BackblazeResource
|
|
181
|
+
} from "./chunk-HQ4KWN76.js";
|
|
182
|
+
import {
|
|
183
|
+
redactBackblazeConfig,
|
|
184
|
+
resolvedBackblazeEndpoint
|
|
185
|
+
} from "./chunk-XHCBHYN4.js";
|
|
186
|
+
import {
|
|
187
|
+
DIGITALOCEAN_PROMPT,
|
|
188
|
+
DigitalOceanResource
|
|
189
|
+
} from "./chunk-AJICZLHT.js";
|
|
190
|
+
import {
|
|
191
|
+
redactDigitalOceanConfig,
|
|
192
|
+
resolvedDigitalOceanEndpoint
|
|
193
|
+
} from "./chunk-ZNWVJ6UW.js";
|
|
194
|
+
import {
|
|
195
|
+
redactTencentConfig,
|
|
196
|
+
resolvedTencentEndpoint
|
|
197
|
+
} from "./chunk-YGZMVNN5.js";
|
|
198
|
+
import {
|
|
199
|
+
HF_DATASETS_PROMPT,
|
|
200
|
+
HfDatasetsResource
|
|
201
|
+
} from "./chunk-RQYEEA2O.js";
|
|
202
|
+
import {
|
|
203
|
+
HF_MODELS_PROMPT,
|
|
204
|
+
HfModelsResource
|
|
205
|
+
} from "./chunk-WL7HS7EM.js";
|
|
206
|
+
import {
|
|
207
|
+
HF_SPACES_PROMPT,
|
|
208
|
+
HfSpacesResource
|
|
209
|
+
} from "./chunk-OYV2DN66.js";
|
|
210
|
+
import {
|
|
211
|
+
MINIO_PROMPT,
|
|
212
|
+
MinIOResource
|
|
213
|
+
} from "./chunk-Q6CDMOM6.js";
|
|
214
|
+
import {
|
|
215
|
+
redactMinIOConfig
|
|
216
|
+
} from "./chunk-DYXEITK3.js";
|
|
217
|
+
import {
|
|
218
|
+
SEAWEEDFS_PROMPT,
|
|
219
|
+
SeaweedFSResource
|
|
220
|
+
} from "./chunk-3T3RMDNX.js";
|
|
221
|
+
import {
|
|
222
|
+
redactSeaweedFSConfig
|
|
223
|
+
} from "./chunk-2CC5VW7K.js";
|
|
224
|
+
import {
|
|
225
|
+
redactCephConfig
|
|
226
|
+
} from "./chunk-OPYQ5KIO.js";
|
|
119
227
|
import {
|
|
120
228
|
OCIResource,
|
|
121
229
|
OCI_PROMPT
|
|
122
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-PJBQKMCD.js";
|
|
231
|
+
import {
|
|
232
|
+
redactOciConfig
|
|
233
|
+
} from "./chunk-RQK5UPMP.js";
|
|
123
234
|
import {
|
|
124
235
|
R2Resource,
|
|
125
236
|
R2_PROMPT
|
|
126
|
-
} from "./chunk-
|
|
237
|
+
} from "./chunk-B6SXRCBO.js";
|
|
127
238
|
import {
|
|
128
239
|
redactR2Config
|
|
129
|
-
} from "./chunk-
|
|
240
|
+
} from "./chunk-LAJJPLEV.js";
|
|
130
241
|
import {
|
|
131
242
|
SUPABASE_PROMPT,
|
|
132
243
|
SupabaseResource
|
|
133
|
-
} from "./chunk-
|
|
244
|
+
} from "./chunk-BYTU2YC3.js";
|
|
134
245
|
import {
|
|
135
246
|
redactSupabaseConfig,
|
|
136
247
|
resolvedSupabaseEndpoint
|
|
137
|
-
} from "./chunk-
|
|
138
|
-
import {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
} from "./chunk-
|
|
142
|
-
import {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
248
|
+
} from "./chunk-QGRDPSAH.js";
|
|
249
|
+
import {
|
|
250
|
+
HF_BUCKETS_PROMPT,
|
|
251
|
+
HfBucketsResource
|
|
252
|
+
} from "./chunk-G5BZE7UA.js";
|
|
253
|
+
import {
|
|
254
|
+
HF_COMMANDS,
|
|
255
|
+
HF_OPS,
|
|
256
|
+
HF_RESOURCES,
|
|
257
|
+
HfAccessor,
|
|
258
|
+
HfBucketsAccessor,
|
|
259
|
+
HfDatasetsAccessor,
|
|
260
|
+
HfModelsAccessor,
|
|
261
|
+
HfSpacesAccessor
|
|
262
|
+
} from "./chunk-WSGEIVY3.js";
|
|
263
|
+
import {
|
|
264
|
+
HF_ENDPOINT,
|
|
265
|
+
assertHfRepoId,
|
|
266
|
+
normalizeHfBucketsConfig,
|
|
267
|
+
normalizeHfRepoConfig,
|
|
268
|
+
redactHfBucketsConfig,
|
|
269
|
+
redactHfRepoConfig
|
|
270
|
+
} from "./chunk-EGB7V74Z.js";
|
|
150
271
|
import {
|
|
151
272
|
DISK_COMMANDS,
|
|
152
273
|
DISK_OPS,
|
|
153
274
|
DISK_PROMPT,
|
|
154
|
-
DiskResource
|
|
155
|
-
|
|
156
|
-
stream
|
|
157
|
-
} from "./chunk-GKQNMLQU.js";
|
|
275
|
+
DiskResource
|
|
276
|
+
} from "./chunk-PBBG7VFT.js";
|
|
158
277
|
import "./chunk-U6QSXTUS.js";
|
|
159
278
|
import {
|
|
160
279
|
REDIS_COMMANDS,
|
|
@@ -163,26 +282,30 @@ import {
|
|
|
163
282
|
RedisAccessor,
|
|
164
283
|
RedisResource,
|
|
165
284
|
RedisStore,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
285
|
+
stat
|
|
286
|
+
} from "./chunk-N72CAZEH.js";
|
|
287
|
+
import {
|
|
288
|
+
loadOptionalPeer
|
|
289
|
+
} from "./chunk-E2ISWXLB.js";
|
|
290
|
+
import {
|
|
291
|
+
DatabricksVolumeResource,
|
|
292
|
+
loadDatabricksProfile,
|
|
293
|
+
parseDatabricksCfg
|
|
294
|
+
} from "./chunk-JZQHKDSY.js";
|
|
169
295
|
import {
|
|
170
296
|
GCSResource,
|
|
171
297
|
GCS_PROMPT
|
|
172
|
-
} from "./chunk-
|
|
298
|
+
} from "./chunk-IQVNVTOP.js";
|
|
173
299
|
import {
|
|
174
300
|
S3Resource
|
|
175
|
-
} from "./chunk-
|
|
301
|
+
} from "./chunk-MHCMHKM6.js";
|
|
176
302
|
import {
|
|
177
303
|
redactConfig
|
|
178
|
-
} from "./chunk-
|
|
304
|
+
} from "./chunk-UT2OPSN4.js";
|
|
179
305
|
import {
|
|
180
306
|
GCS_ENDPOINT,
|
|
181
307
|
redactGcsConfig
|
|
182
|
-
} from "./chunk-
|
|
183
|
-
import {
|
|
184
|
-
redactOciConfig
|
|
185
|
-
} from "./chunk-ZC4KNEOQ.js";
|
|
308
|
+
} from "./chunk-XGJ2QERC.js";
|
|
186
309
|
|
|
187
310
|
// src/index.ts
|
|
188
311
|
export * from "@struktoai/mirage-core";
|
|
@@ -192,107 +315,20 @@ import { readFileSync } from "fs";
|
|
|
192
315
|
import { createRequire } from "module";
|
|
193
316
|
import {
|
|
194
317
|
createShellParser,
|
|
195
|
-
ExecuteResult as ExecuteResult2,
|
|
196
318
|
Workspace as CoreWorkspace
|
|
197
319
|
} from "@struktoai/mirage-core";
|
|
198
320
|
|
|
199
|
-
// src/native.ts
|
|
200
|
-
import { spawn } from "child_process";
|
|
201
|
-
import { ExecuteResult } from "@struktoai/mirage-core";
|
|
202
|
-
function concatChunks(chunks) {
|
|
203
|
-
let total = 0;
|
|
204
|
-
for (const c of chunks) total += c.byteLength;
|
|
205
|
-
const out = new Uint8Array(total);
|
|
206
|
-
let offset = 0;
|
|
207
|
-
for (const c of chunks) {
|
|
208
|
-
out.set(c, offset);
|
|
209
|
-
offset += c.byteLength;
|
|
210
|
-
}
|
|
211
|
-
return out;
|
|
212
|
-
}
|
|
213
|
-
function nativeExec(command31, options) {
|
|
214
|
-
return new Promise((resolve, reject) => {
|
|
215
|
-
const env = options.env ?? process.env;
|
|
216
|
-
const spawnOpts = {
|
|
217
|
-
cwd: options.cwd,
|
|
218
|
-
env
|
|
219
|
-
};
|
|
220
|
-
if (options.signal !== void 0) spawnOpts.signal = options.signal;
|
|
221
|
-
const proc = spawn("sh", ["-c", command31], spawnOpts);
|
|
222
|
-
const stdoutChunks = [];
|
|
223
|
-
const stderrChunks = [];
|
|
224
|
-
let killed = false;
|
|
225
|
-
const timeoutMs = options.timeoutMs ?? null;
|
|
226
|
-
const timer = timeoutMs !== null ? setTimeout(() => {
|
|
227
|
-
killed = true;
|
|
228
|
-
proc.kill("SIGKILL");
|
|
229
|
-
proc.stdout.destroy();
|
|
230
|
-
proc.stderr.destroy();
|
|
231
|
-
}, timeoutMs) : null;
|
|
232
|
-
proc.stdout.on("data", (chunk) => {
|
|
233
|
-
stdoutChunks.push(new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength));
|
|
234
|
-
});
|
|
235
|
-
proc.stderr.on("data", (chunk) => {
|
|
236
|
-
stderrChunks.push(new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength));
|
|
237
|
-
});
|
|
238
|
-
proc.on("error", (err) => {
|
|
239
|
-
if (timer !== null) clearTimeout(timer);
|
|
240
|
-
if (err.name === "AbortError" || options.signal?.aborted === true) {
|
|
241
|
-
reject(new DOMException("execute aborted", "AbortError"));
|
|
242
|
-
return;
|
|
243
|
-
}
|
|
244
|
-
reject(err);
|
|
245
|
-
});
|
|
246
|
-
proc.on("close", (code) => {
|
|
247
|
-
if (timer !== null) clearTimeout(timer);
|
|
248
|
-
if (options.signal?.aborted === true) {
|
|
249
|
-
reject(new DOMException("execute aborted", "AbortError"));
|
|
250
|
-
return;
|
|
251
|
-
}
|
|
252
|
-
if (killed) {
|
|
253
|
-
resolve(new ExecuteResult(new Uint8Array(), new TextEncoder().encode("timeout\n"), 124));
|
|
254
|
-
return;
|
|
255
|
-
}
|
|
256
|
-
resolve(new ExecuteResult(concatChunks(stdoutChunks), concatChunks(stderrChunks), code ?? 0));
|
|
257
|
-
});
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
function nativeExecStream(command31, options) {
|
|
261
|
-
const env = options.env ?? process.env;
|
|
262
|
-
const spawnOpts = {
|
|
263
|
-
cwd: options.cwd,
|
|
264
|
-
env
|
|
265
|
-
};
|
|
266
|
-
const proc = spawn("sh", ["-c", command31], spawnOpts);
|
|
267
|
-
return {
|
|
268
|
-
raw: proc,
|
|
269
|
-
stdoutStream() {
|
|
270
|
-
return proc.stdout;
|
|
271
|
-
},
|
|
272
|
-
stderrStream() {
|
|
273
|
-
return proc.stderr;
|
|
274
|
-
},
|
|
275
|
-
wait() {
|
|
276
|
-
return new Promise((resolve) => {
|
|
277
|
-
proc.on("close", (code) => {
|
|
278
|
-
resolve(code ?? 0);
|
|
279
|
-
});
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
};
|
|
283
|
-
}
|
|
284
|
-
|
|
285
321
|
// src/workspace/fuse.ts
|
|
286
322
|
import { rmSync } from "fs";
|
|
287
323
|
|
|
288
324
|
// src/fuse/mount.ts
|
|
289
325
|
import { execSync } from "child_process";
|
|
290
|
-
import { mkdtempSync } from "fs";
|
|
326
|
+
import { mkdirSync, mkdtempSync } from "fs";
|
|
291
327
|
import { tmpdir } from "os";
|
|
292
328
|
import { join } from "path";
|
|
293
329
|
|
|
294
330
|
// src/fuse/fs.ts
|
|
295
|
-
import { FileType } from "@struktoai/mirage-core";
|
|
331
|
+
import { FileType, rstripSlash } from "@struktoai/mirage-core";
|
|
296
332
|
|
|
297
333
|
// src/fuse/platform/macos.ts
|
|
298
334
|
var MACOS_METADATA = /* @__PURE__ */ new Set([
|
|
@@ -318,6 +354,12 @@ var EIO = -5;
|
|
|
318
354
|
var PREFETCH_TTL_MS = 3e4;
|
|
319
355
|
var UNKNOWN_SIZE_SENTINEL = 100 * 1024 * 1024;
|
|
320
356
|
function classifyError(err) {
|
|
357
|
+
const code = err.code;
|
|
358
|
+
if (code === "ENOTEMPTY") return ENOTEMPTY;
|
|
359
|
+
if (code === "ENOTDIR") return ENOTDIR;
|
|
360
|
+
if (code === "EACCES") return EACCES;
|
|
361
|
+
if (code === "EEXIST") return EEXIST;
|
|
362
|
+
if (code === "ENOENT") return ENOENT;
|
|
321
363
|
const msg = (err instanceof Error ? err.message : String(err)).toLowerCase();
|
|
322
364
|
if (msg.includes("not empty") || msg.includes("enotempty")) return ENOTEMPTY;
|
|
323
365
|
if (msg.includes("not a directory") || msg.includes("enotdir")) return ENOTDIR;
|
|
@@ -332,6 +374,7 @@ var MirageFS = class {
|
|
|
332
374
|
ws;
|
|
333
375
|
agentId;
|
|
334
376
|
now;
|
|
377
|
+
root;
|
|
335
378
|
prefixes;
|
|
336
379
|
handles = /* @__PURE__ */ new Map();
|
|
337
380
|
prefetchCache = /* @__PURE__ */ new Map();
|
|
@@ -343,11 +386,16 @@ var MirageFS = class {
|
|
|
343
386
|
this.ws = ws;
|
|
344
387
|
this.agentId = options.agentId ?? process.env[ENV_AGENT_ID] ?? `agent-${Math.random().toString(36).slice(2, 10)}`;
|
|
345
388
|
this.now = /* @__PURE__ */ new Date();
|
|
346
|
-
this.
|
|
389
|
+
this.root = options.rootPrefix !== void 0 ? rstripSlash(options.rootPrefix) : "";
|
|
390
|
+
this.prefixes = this.root === "" ? ws.mounts().map((m) => m.prefix) : [];
|
|
347
391
|
this.uid = typeof process.getuid === "function" ? process.getuid() : 0;
|
|
348
392
|
this.gid = typeof process.getgid === "function" ? process.getgid() : 0;
|
|
349
393
|
}
|
|
350
394
|
// ── helpers ──────────────────────────────────────────────────────
|
|
395
|
+
resolve(path) {
|
|
396
|
+
if (this.root === "") return path;
|
|
397
|
+
return path === "/" ? this.root : this.root + path;
|
|
398
|
+
}
|
|
351
399
|
whoamiContent() {
|
|
352
400
|
const lines = [`agent: ${this.agentId}`, "cwd: /", `mounts: ${this.prefixes.join(", ")}`];
|
|
353
401
|
return new TextEncoder().encode(lines.join("\n") + "\n");
|
|
@@ -377,16 +425,16 @@ var MirageFS = class {
|
|
|
377
425
|
};
|
|
378
426
|
}
|
|
379
427
|
isVirtualDir(path) {
|
|
380
|
-
const bare = path
|
|
428
|
+
const bare = rstripSlash(path);
|
|
381
429
|
const normalized = bare + "/";
|
|
382
430
|
for (const p of this.prefixes) {
|
|
383
|
-
const pBare = p
|
|
431
|
+
const pBare = rstripSlash(p);
|
|
384
432
|
if (p.startsWith(normalized) || pBare === bare) return true;
|
|
385
433
|
}
|
|
386
434
|
return false;
|
|
387
435
|
}
|
|
388
436
|
virtualChildren(path) {
|
|
389
|
-
const normalized = path === "/" ? "/" : path
|
|
437
|
+
const normalized = path === "/" ? "/" : rstripSlash(path) + "/";
|
|
390
438
|
const children = /* @__PURE__ */ new Set();
|
|
391
439
|
for (const p of this.prefixes) {
|
|
392
440
|
if (p.startsWith(normalized) && p !== normalized) {
|
|
@@ -428,7 +476,7 @@ var MirageFS = class {
|
|
|
428
476
|
if (inflight !== void 0) return inflight;
|
|
429
477
|
const promise = (async () => {
|
|
430
478
|
try {
|
|
431
|
-
const data = await this.ws.fs.readFile(path);
|
|
479
|
+
const data = await this.ws.fs.readFile(this.resolve(path));
|
|
432
480
|
this.prefetchCache.set(path, { data, expires: Date.now() + PREFETCH_TTL_MS });
|
|
433
481
|
return data;
|
|
434
482
|
} catch {
|
|
@@ -446,11 +494,15 @@ var MirageFS = class {
|
|
|
446
494
|
this.ws.records.length = 0;
|
|
447
495
|
return records;
|
|
448
496
|
}
|
|
497
|
+
async writeFile(path, data) {
|
|
498
|
+
await this.ws.dispatch("write", this.resolve(path), [data]);
|
|
499
|
+
}
|
|
449
500
|
// ── FUSE op surface (mirrors mfusepy Operations) ─────────────────
|
|
450
501
|
ops() {
|
|
451
502
|
return {
|
|
452
503
|
readdir: this.readdir.bind(this),
|
|
453
504
|
getattr: this.getattr.bind(this),
|
|
505
|
+
fgetattr: this.fgetattr.bind(this),
|
|
454
506
|
open: this.open.bind(this),
|
|
455
507
|
read: this.read.bind(this),
|
|
456
508
|
write: this.write.bind(this),
|
|
@@ -490,7 +542,7 @@ var MirageFS = class {
|
|
|
490
542
|
return;
|
|
491
543
|
}
|
|
492
544
|
try {
|
|
493
|
-
const s = await this.ws.fs.stat(path);
|
|
545
|
+
const s = await this.ws.fs.stat(this.resolve(path));
|
|
494
546
|
if (s.type === FileType.DIRECTORY) {
|
|
495
547
|
cb(0, this.dirStat());
|
|
496
548
|
return;
|
|
@@ -503,6 +555,14 @@ var MirageFS = class {
|
|
|
503
555
|
}
|
|
504
556
|
})();
|
|
505
557
|
}
|
|
558
|
+
fgetattr(path, fd, cb) {
|
|
559
|
+
const ctx = this.handles.get(fd);
|
|
560
|
+
if (ctx?.data !== void 0) {
|
|
561
|
+
cb(0, this.fileStat(ctx.data.byteLength));
|
|
562
|
+
return;
|
|
563
|
+
}
|
|
564
|
+
this.getattr(path, cb);
|
|
565
|
+
}
|
|
506
566
|
readdir(path, cb) {
|
|
507
567
|
void (async () => {
|
|
508
568
|
if (path === MIRAGE_DIR) {
|
|
@@ -512,9 +572,9 @@ var MirageFS = class {
|
|
|
512
572
|
const names = new Set(this.virtualChildren(path));
|
|
513
573
|
if (path === "/") names.add(".mirage");
|
|
514
574
|
try {
|
|
515
|
-
const entries = await this.ws.fs.readdir(path);
|
|
575
|
+
const entries = await this.ws.fs.readdir(this.resolve(path));
|
|
516
576
|
for (const e of entries) {
|
|
517
|
-
const part = e
|
|
577
|
+
const part = rstripSlash(e).split("/").pop() ?? "";
|
|
518
578
|
if (part !== "" && !isMacosMetadata(part)) names.add(part);
|
|
519
579
|
}
|
|
520
580
|
} catch {
|
|
@@ -539,9 +599,9 @@ var MirageFS = class {
|
|
|
539
599
|
try {
|
|
540
600
|
if (ctx !== void 0 && ctx.data === void 0) {
|
|
541
601
|
const cached = this.cachedData(path);
|
|
542
|
-
ctx.data = cached ?? await this.ws.fs.readFile(path);
|
|
602
|
+
ctx.data = cached ?? await this.ws.fs.readFile(this.resolve(path));
|
|
543
603
|
}
|
|
544
|
-
const data = ctx?.data ?? this.cachedData(path) ?? await this.ws.fs.readFile(path);
|
|
604
|
+
const data = ctx?.data ?? this.cachedData(path) ?? await this.ws.fs.readFile(this.resolve(path));
|
|
545
605
|
const slice = data.subarray(pos, pos + len);
|
|
546
606
|
buf.set(slice, 0);
|
|
547
607
|
cb(slice.byteLength);
|
|
@@ -563,7 +623,7 @@ var MirageFS = class {
|
|
|
563
623
|
try {
|
|
564
624
|
let existing = new Uint8Array(0);
|
|
565
625
|
try {
|
|
566
|
-
existing = await this.ws.fs.readFile(path, { raw: true });
|
|
626
|
+
existing = await this.ws.fs.readFile(this.resolve(path), { raw: true });
|
|
567
627
|
} catch {
|
|
568
628
|
}
|
|
569
629
|
let merged = existing;
|
|
@@ -582,7 +642,7 @@ var MirageFS = class {
|
|
|
582
642
|
}
|
|
583
643
|
merged = out;
|
|
584
644
|
}
|
|
585
|
-
await this.
|
|
645
|
+
await this.writeFile(path, merged);
|
|
586
646
|
cb(len);
|
|
587
647
|
} catch {
|
|
588
648
|
cb(0);
|
|
@@ -593,11 +653,11 @@ var MirageFS = class {
|
|
|
593
653
|
void (async () => {
|
|
594
654
|
try {
|
|
595
655
|
try {
|
|
596
|
-
await this.ws.dispatch("create", path);
|
|
656
|
+
await this.ws.dispatch("create", this.resolve(path));
|
|
597
657
|
} catch (dispatchErr) {
|
|
598
658
|
const msg = (dispatchErr instanceof Error ? dispatchErr.message : String(dispatchErr)).toLowerCase();
|
|
599
659
|
if (!msg.includes("no op")) throw dispatchErr;
|
|
600
|
-
await this.
|
|
660
|
+
await this.writeFile(path, new Uint8Array(0));
|
|
601
661
|
}
|
|
602
662
|
const fh = this.nextFh++;
|
|
603
663
|
this.handles.set(fh, { path });
|
|
@@ -610,7 +670,7 @@ var MirageFS = class {
|
|
|
610
670
|
mkdir(path, _mode, cb) {
|
|
611
671
|
void (async () => {
|
|
612
672
|
try {
|
|
613
|
-
await this.ws.fs.mkdir(path);
|
|
673
|
+
await this.ws.fs.mkdir(this.resolve(path));
|
|
614
674
|
cb(0);
|
|
615
675
|
} catch (err) {
|
|
616
676
|
cb(classifyError(err));
|
|
@@ -620,7 +680,7 @@ var MirageFS = class {
|
|
|
620
680
|
unlink(path, cb) {
|
|
621
681
|
void (async () => {
|
|
622
682
|
try {
|
|
623
|
-
await this.ws.fs.unlink(path);
|
|
683
|
+
await this.ws.fs.unlink(this.resolve(path));
|
|
624
684
|
cb(0);
|
|
625
685
|
} catch (err) {
|
|
626
686
|
cb(classifyError(err));
|
|
@@ -630,7 +690,7 @@ var MirageFS = class {
|
|
|
630
690
|
rename(src, dst, cb) {
|
|
631
691
|
void (async () => {
|
|
632
692
|
try {
|
|
633
|
-
await this.ws.fs.rename(src, dst);
|
|
693
|
+
await this.ws.fs.rename(this.resolve(src), this.resolve(dst));
|
|
634
694
|
cb(0);
|
|
635
695
|
} catch (err) {
|
|
636
696
|
cb(classifyError(err));
|
|
@@ -641,14 +701,14 @@ var MirageFS = class {
|
|
|
641
701
|
void (async () => {
|
|
642
702
|
try {
|
|
643
703
|
try {
|
|
644
|
-
const entries = await this.ws.fs.readdir(path);
|
|
704
|
+
const entries = await this.ws.fs.readdir(this.resolve(path));
|
|
645
705
|
if (entries.length > 0) {
|
|
646
706
|
cb(ENOTEMPTY);
|
|
647
707
|
return;
|
|
648
708
|
}
|
|
649
709
|
} catch {
|
|
650
710
|
}
|
|
651
|
-
await this.ws.fs.rmdir(path);
|
|
711
|
+
await this.ws.fs.rmdir(this.resolve(path));
|
|
652
712
|
cb(0);
|
|
653
713
|
} catch (err) {
|
|
654
714
|
cb(classifyError(err));
|
|
@@ -659,14 +719,14 @@ var MirageFS = class {
|
|
|
659
719
|
void (async () => {
|
|
660
720
|
try {
|
|
661
721
|
try {
|
|
662
|
-
await this.ws.dispatch("truncate", path, [size]);
|
|
722
|
+
await this.ws.dispatch("truncate", this.resolve(path), [size]);
|
|
663
723
|
} catch (dispatchErr) {
|
|
664
724
|
const msg = (dispatchErr instanceof Error ? dispatchErr.message : String(dispatchErr)).toLowerCase();
|
|
665
725
|
if (!msg.includes("no op")) throw dispatchErr;
|
|
666
|
-
const data = await this.ws.fs.readFile(path, { raw: true }).catch(() => new Uint8Array(0));
|
|
726
|
+
const data = await this.ws.fs.readFile(this.resolve(path), { raw: true }).catch(() => new Uint8Array(0));
|
|
667
727
|
const out = new Uint8Array(size);
|
|
668
728
|
out.set(data.subarray(0, Math.min(data.byteLength, size)), 0);
|
|
669
|
-
await this.
|
|
729
|
+
await this.writeFile(path, out);
|
|
670
730
|
}
|
|
671
731
|
cb(0);
|
|
672
732
|
} catch (err) {
|
|
@@ -716,7 +776,7 @@ var MirageFS = class {
|
|
|
716
776
|
return;
|
|
717
777
|
}
|
|
718
778
|
try {
|
|
719
|
-
const s = await this.ws.fs.stat(path);
|
|
779
|
+
const s = await this.ws.fs.stat(this.resolve(path));
|
|
720
780
|
const ctx = { path };
|
|
721
781
|
if (s.size === null && s.type !== FileType.DIRECTORY) {
|
|
722
782
|
const data = await this.prefetch(path);
|
|
@@ -746,7 +806,7 @@ var MirageFS = class {
|
|
|
746
806
|
try {
|
|
747
807
|
let existing = new Uint8Array(0);
|
|
748
808
|
try {
|
|
749
|
-
existing = await this.ws.fs.readFile(path, { raw: true });
|
|
809
|
+
existing = await this.ws.fs.readFile(this.resolve(path), { raw: true });
|
|
750
810
|
} catch {
|
|
751
811
|
}
|
|
752
812
|
let total = existing.byteLength;
|
|
@@ -758,7 +818,7 @@ var MirageFS = class {
|
|
|
758
818
|
for (const [off, chunk] of writes) {
|
|
759
819
|
merged.set(chunk, off);
|
|
760
820
|
}
|
|
761
|
-
await this.
|
|
821
|
+
await this.writeFile(path, merged);
|
|
762
822
|
cb(0);
|
|
763
823
|
} catch (err) {
|
|
764
824
|
cb(classifyError(err));
|
|
@@ -798,13 +858,23 @@ function forceUnmount(mountpoint) {
|
|
|
798
858
|
}
|
|
799
859
|
async function mount(ws, options = {}) {
|
|
800
860
|
const Fuse = await loadFuse();
|
|
801
|
-
|
|
861
|
+
let mountpoint;
|
|
862
|
+
if (options.mountpoint !== void 0) {
|
|
863
|
+
mkdirSync(options.mountpoint, { recursive: true });
|
|
864
|
+
mountpoint = options.mountpoint;
|
|
865
|
+
} else {
|
|
866
|
+
mountpoint = mkdtempSync(join(tmpdir(), "mirage-fuse-"));
|
|
867
|
+
}
|
|
802
868
|
const agentId = options.agentId;
|
|
803
|
-
const mfs = new MirageFS(ws,
|
|
869
|
+
const mfs = new MirageFS(ws, {
|
|
870
|
+
...agentId !== void 0 ? { agentId } : {},
|
|
871
|
+
...options.rootPrefix !== void 0 ? { rootPrefix: options.rootPrefix } : {}
|
|
872
|
+
});
|
|
804
873
|
const autoUnmount = options.autoUnmount ?? process.platform === "linux";
|
|
805
874
|
const fuseOpts = {
|
|
806
875
|
force: true,
|
|
807
876
|
mkdir: true,
|
|
877
|
+
attrTimeout: "0",
|
|
808
878
|
...autoUnmount ? { autoUnmount: true } : {},
|
|
809
879
|
...options.fuseOptions ?? {}
|
|
810
880
|
};
|
|
@@ -938,20 +1008,45 @@ function loadShellParser() {
|
|
|
938
1008
|
return cachedParser;
|
|
939
1009
|
}
|
|
940
1010
|
var Workspace = class extends CoreWorkspace {
|
|
941
|
-
|
|
942
|
-
|
|
1011
|
+
autoFuseManagers = /* @__PURE__ */ new Map();
|
|
1012
|
+
fuseMountpointsMap = /* @__PURE__ */ new Map();
|
|
943
1013
|
fuseSetupPromise = null;
|
|
944
1014
|
constructor(resources, options = {}) {
|
|
945
1015
|
super(resources, {
|
|
946
1016
|
...options,
|
|
947
1017
|
shellParserFactory: options.shellParserFactory ?? loadShellParser
|
|
948
1018
|
});
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
1019
|
+
const fuseMounts = options.fuseMounts ?? {};
|
|
1020
|
+
const setups = [];
|
|
1021
|
+
for (const [prefix, target] of Object.entries(fuseMounts)) {
|
|
1022
|
+
if (target === false) continue;
|
|
1023
|
+
const fm = new FuseManager();
|
|
1024
|
+
this.autoFuseManagers.set(prefix, fm);
|
|
1025
|
+
const opts = {
|
|
1026
|
+
rootPrefix: prefix,
|
|
1027
|
+
...typeof target === "string" ? { mountpoint: target } : {}
|
|
1028
|
+
};
|
|
1029
|
+
setups.push(
|
|
1030
|
+
fm.setup(this, opts).then(
|
|
1031
|
+
(mountpoint) => {
|
|
1032
|
+
this.fuseMountpointsMap.set(prefix, mountpoint);
|
|
1033
|
+
},
|
|
1034
|
+
(err) => {
|
|
1035
|
+
process.stderr.write(
|
|
1036
|
+
`mirage: FUSE auto-mount failed for ${prefix}, continuing without it: ${err instanceof Error ? err.message : String(err)}
|
|
1037
|
+
`
|
|
1038
|
+
);
|
|
1039
|
+
}
|
|
1040
|
+
)
|
|
1041
|
+
);
|
|
954
1042
|
}
|
|
1043
|
+
if (setups.length > 0) {
|
|
1044
|
+
this.fuseSetupPromise = Promise.all(setups).then(() => void 0);
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
/** Map each FUSE-exposed mount prefix to its live mountpoint. */
|
|
1048
|
+
get fuseMountpoints() {
|
|
1049
|
+
return Object.fromEntries(this.fuseMountpointsMap);
|
|
955
1050
|
}
|
|
956
1051
|
async ensureFuseReady() {
|
|
957
1052
|
if (this.fuseSetupPromise !== null) {
|
|
@@ -959,32 +1054,14 @@ var Workspace = class extends CoreWorkspace {
|
|
|
959
1054
|
this.fuseSetupPromise = null;
|
|
960
1055
|
}
|
|
961
1056
|
}
|
|
962
|
-
async execute(
|
|
1057
|
+
async execute(command, options = {}) {
|
|
963
1058
|
await this.ensureFuseReady();
|
|
964
|
-
|
|
965
|
-
if (useNative) {
|
|
966
|
-
const mp = this.fuseMountpoint;
|
|
967
|
-
if (mp === null) {
|
|
968
|
-
console.warn(
|
|
969
|
-
"native=true requires FUSE. Install macFUSE (macOS) or libfuse (Linux) and set ws.setFuseMountpoint(). Falling back to virtual mode."
|
|
970
|
-
);
|
|
971
|
-
} else if (this.ownsFuseMount) {
|
|
972
|
-
throw new Error(
|
|
973
|
-
"native=true with a same-process FUSE mount would deadlock (Node single event loop). Workarounds:\n 1. Mount FUSE in a helper process; call nativeExec from this process.\n 2. Point nativeExec at a mountpoint created by another tool (then call ws.setFuseMountpoint(path) without using FuseManager).\n 3. Use execute() without native=true (virtual executor is in-process safe).\nSee https://mirage.dev/typescript/limitations for details."
|
|
974
|
-
);
|
|
975
|
-
} else {
|
|
976
|
-
const opts = { cwd: mp };
|
|
977
|
-
if (options.signal !== void 0) opts.signal = options.signal;
|
|
978
|
-
const { stdout, stderr, exitCode } = await nativeExec(command31, opts);
|
|
979
|
-
return new ExecuteResult2(stdout, stderr, exitCode);
|
|
980
|
-
}
|
|
981
|
-
}
|
|
982
|
-
return super.execute(command31, options);
|
|
1059
|
+
return super.execute(command, options);
|
|
983
1060
|
}
|
|
984
1061
|
async close() {
|
|
985
1062
|
await this.ensureFuseReady().catch(() => void 0);
|
|
986
|
-
|
|
987
|
-
await
|
|
1063
|
+
for (const fm of this.autoFuseManagers.values()) {
|
|
1064
|
+
await fm.close(this);
|
|
988
1065
|
}
|
|
989
1066
|
await super.close();
|
|
990
1067
|
}
|
|
@@ -1157,7 +1234,7 @@ async function resolveSizes(accessor, paths, index) {
|
|
|
1157
1234
|
}
|
|
1158
1235
|
if (size === null) {
|
|
1159
1236
|
try {
|
|
1160
|
-
const fileStat = await
|
|
1237
|
+
const fileStat = await stat(accessor, p);
|
|
1161
1238
|
size = fileStat.size;
|
|
1162
1239
|
} catch {
|
|
1163
1240
|
}
|
|
@@ -1312,543 +1389,365 @@ var RedisFileCacheStore = class extends RedisResource {
|
|
|
1312
1389
|
}
|
|
1313
1390
|
};
|
|
1314
1391
|
|
|
1315
|
-
// src/
|
|
1392
|
+
// src/resource/hf_models/config.ts
|
|
1393
|
+
var normalizeHfModelsConfig = normalizeHfRepoConfig;
|
|
1394
|
+
var redactHfModelsConfig = redactHfRepoConfig;
|
|
1395
|
+
|
|
1396
|
+
// src/resource/lancedb/lancedb.ts
|
|
1397
|
+
import {
|
|
1398
|
+
BaseResource,
|
|
1399
|
+
LANCEDB_COMMANDS,
|
|
1400
|
+
LANCEDB_OPS,
|
|
1401
|
+
LANCEDB_PROMPT,
|
|
1402
|
+
LanceDBAccessor,
|
|
1403
|
+
lanceRead,
|
|
1404
|
+
lanceReaddir,
|
|
1405
|
+
lanceStat,
|
|
1406
|
+
ResourceName,
|
|
1407
|
+
resolveLanceDBConfig
|
|
1408
|
+
} from "@struktoai/mirage-core";
|
|
1409
|
+
|
|
1410
|
+
// src/resource/lancedb/store.ts
|
|
1316
1411
|
import {
|
|
1317
|
-
|
|
1318
|
-
IndexEntry,
|
|
1319
|
-
LookupStatus
|
|
1412
|
+
loadOptionalPeer as loadOptionalPeer2
|
|
1320
1413
|
} from "@struktoai/mirage-core";
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
() => import("redis"),
|
|
1353
|
-
{ feature: "RedisIndexCacheStore", packageName: "redis" }
|
|
1354
|
-
);
|
|
1355
|
-
const c = mod.createClient({
|
|
1356
|
-
url: this.url,
|
|
1357
|
-
socket: { reconnectStrategy: false }
|
|
1414
|
+
function toStr(value) {
|
|
1415
|
+
if (value === null || value === void 0) return "";
|
|
1416
|
+
if (typeof value === "object") return JSON.stringify(value);
|
|
1417
|
+
return String(value);
|
|
1418
|
+
}
|
|
1419
|
+
function eqClause(column, value) {
|
|
1420
|
+
if (/^-?\d+$/.test(value)) return `${column} = ${value}`;
|
|
1421
|
+
return `${column} = '${value.replace(/'/g, "''")}'`;
|
|
1422
|
+
}
|
|
1423
|
+
function whereClause(filters) {
|
|
1424
|
+
return Object.entries(filters).map(([col, val]) => eqClause(col, val)).join(" AND ");
|
|
1425
|
+
}
|
|
1426
|
+
var LanceDBStore = class {
|
|
1427
|
+
config;
|
|
1428
|
+
db = null;
|
|
1429
|
+
tables = /* @__PURE__ */ new Map();
|
|
1430
|
+
constructor(config) {
|
|
1431
|
+
this.config = config;
|
|
1432
|
+
}
|
|
1433
|
+
async connection() {
|
|
1434
|
+
if (this.db === null) {
|
|
1435
|
+
const options = {};
|
|
1436
|
+
if (this.config.apiKey !== null) options.apiKey = this.config.apiKey;
|
|
1437
|
+
if (this.config.storageOptions !== null) options.storageOptions = this.config.storageOptions;
|
|
1438
|
+
if (this.config.uri.startsWith("db://")) {
|
|
1439
|
+
options.region = this.config.region;
|
|
1440
|
+
if (this.config.hostOverride !== null) options.hostOverride = this.config.hostOverride;
|
|
1441
|
+
}
|
|
1442
|
+
const { connect } = await loadOptionalPeer2(() => import("@lancedb/lancedb"), {
|
|
1443
|
+
feature: "LanceDBResource",
|
|
1444
|
+
packageName: "@lancedb/lancedb"
|
|
1358
1445
|
});
|
|
1359
|
-
await
|
|
1360
|
-
return c;
|
|
1361
|
-
})();
|
|
1362
|
-
return this.clientPromise;
|
|
1363
|
-
}
|
|
1364
|
-
async get(resourcePath) {
|
|
1365
|
-
const c = await this.client();
|
|
1366
|
-
const raw = await c.get(this.entryKey(resourcePath));
|
|
1367
|
-
if (raw === null) return { status: LookupStatus.NOT_FOUND };
|
|
1368
|
-
const parsed = JSON.parse(raw);
|
|
1369
|
-
return { entry: new IndexEntry(parsed) };
|
|
1370
|
-
}
|
|
1371
|
-
async put(resourcePath, entry) {
|
|
1372
|
-
const c = await this.client();
|
|
1373
|
-
const stored = entry.indexTime === "" ? entry.copyWith({ indexTime: (/* @__PURE__ */ new Date()).toISOString() }) : entry;
|
|
1374
|
-
await c.set(this.entryKey(resourcePath), JSON.stringify(this.serialize(stored)));
|
|
1375
|
-
}
|
|
1376
|
-
async listDir(resourcePath) {
|
|
1377
|
-
const c = await this.client();
|
|
1378
|
-
const key = this.childrenKey(resourcePath);
|
|
1379
|
-
const exists = await c.exists(key);
|
|
1380
|
-
if (!exists) return { status: LookupStatus.NOT_FOUND };
|
|
1381
|
-
const ttlRemaining = await c.ttl(key);
|
|
1382
|
-
if (ttlRemaining === -2) return { status: LookupStatus.EXPIRED };
|
|
1383
|
-
const raw = await c.lRange(key, 0, -1);
|
|
1384
|
-
return { entries: [...raw].sort() };
|
|
1385
|
-
}
|
|
1386
|
-
async setDir(resourcePath, entries, expiredAt) {
|
|
1387
|
-
const c = await this.client();
|
|
1388
|
-
const now = /* @__PURE__ */ new Date();
|
|
1389
|
-
const nowIso = now.toISOString();
|
|
1390
|
-
const prefix = resourcePath === "/" ? "/" : `${resourcePath}/`;
|
|
1391
|
-
const pipe = c.multi();
|
|
1392
|
-
const childKeys = [];
|
|
1393
|
-
for (const [name, entry] of entries) {
|
|
1394
|
-
const fullPath = prefix + name;
|
|
1395
|
-
const stored = entry.indexTime === "" ? entry.copyWith({ indexTime: nowIso }) : entry;
|
|
1396
|
-
pipe.set(this.entryKey(fullPath), JSON.stringify(this.serialize(stored)));
|
|
1397
|
-
childKeys.push(fullPath);
|
|
1446
|
+
this.db = await connect(this.config.uri, options);
|
|
1398
1447
|
}
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1448
|
+
return this.db;
|
|
1449
|
+
}
|
|
1450
|
+
async table(name) {
|
|
1451
|
+
const cached = this.tables.get(name);
|
|
1452
|
+
if (cached !== void 0) return cached;
|
|
1453
|
+
const db = await this.connection();
|
|
1454
|
+
const tbl = await db.openTable(name);
|
|
1455
|
+
this.tables.set(name, tbl);
|
|
1456
|
+
return tbl;
|
|
1457
|
+
}
|
|
1458
|
+
async listTables() {
|
|
1459
|
+
const db = await this.connection();
|
|
1460
|
+
const names = await db.tableNames();
|
|
1461
|
+
return [...names].sort();
|
|
1462
|
+
}
|
|
1463
|
+
async distinct(table, column, filters, limit) {
|
|
1464
|
+
const tbl = await this.table(table);
|
|
1465
|
+
let query = tbl.query().select([column]).limit(limit);
|
|
1466
|
+
if (Object.keys(filters).length > 0) query = query.where(whereClause(filters));
|
|
1467
|
+
const rows = await query.toArray();
|
|
1468
|
+
const values = /* @__PURE__ */ new Set();
|
|
1469
|
+
for (const row of rows) {
|
|
1470
|
+
const v = row[column];
|
|
1471
|
+
if (v !== null && v !== void 0) values.add(toStr(v));
|
|
1404
1472
|
}
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
await
|
|
1412
|
-
}
|
|
1413
|
-
async
|
|
1414
|
-
const
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1473
|
+
return [...values].sort();
|
|
1474
|
+
}
|
|
1475
|
+
async rowsMatching(table, filters, columns, limit) {
|
|
1476
|
+
const tbl = await this.table(table);
|
|
1477
|
+
let query = tbl.query().select(columns).limit(limit);
|
|
1478
|
+
if (Object.keys(filters).length > 0) query = query.where(whereClause(filters));
|
|
1479
|
+
return await query.toArray();
|
|
1480
|
+
}
|
|
1481
|
+
async rowRecord(table, idColumn, rowId) {
|
|
1482
|
+
const tbl = await this.table(table);
|
|
1483
|
+
const rows = await tbl.query().where(eqClause(idColumn, rowId)).limit(1).toArray();
|
|
1484
|
+
return rows[0] ?? null;
|
|
1485
|
+
}
|
|
1486
|
+
async search(table, query, limit) {
|
|
1487
|
+
const tbl = await this.table(table);
|
|
1488
|
+
return await tbl.search(query).limit(limit).toArray();
|
|
1489
|
+
}
|
|
1490
|
+
close() {
|
|
1491
|
+
if (this.db !== null) {
|
|
1492
|
+
this.db.close();
|
|
1493
|
+
this.db = null;
|
|
1422
1494
|
}
|
|
1423
|
-
|
|
1424
|
-
async close() {
|
|
1425
|
-
if (this.providedClient !== null) return;
|
|
1426
|
-
if (this.clientPromise === null) return;
|
|
1427
|
-
const c = await this.clientPromise;
|
|
1428
|
-
const typed = c;
|
|
1429
|
-
if (typeof typed.destroy === "function") typed.destroy();
|
|
1430
|
-
else if (c.isOpen) await c.quit();
|
|
1431
|
-
this.clientPromise = null;
|
|
1432
|
-
}
|
|
1433
|
-
serialize(e) {
|
|
1434
|
-
return {
|
|
1435
|
-
id: e.id,
|
|
1436
|
-
name: e.name,
|
|
1437
|
-
resourceType: e.resourceType,
|
|
1438
|
-
remoteTime: e.remoteTime,
|
|
1439
|
-
indexTime: e.indexTime,
|
|
1440
|
-
vfsName: e.vfsName,
|
|
1441
|
-
size: e.size
|
|
1442
|
-
};
|
|
1443
|
-
}
|
|
1444
|
-
};
|
|
1445
|
-
|
|
1446
|
-
// src/resource/sscholar/sscholar.ts
|
|
1447
|
-
import {
|
|
1448
|
-
HttpSSCholarDriver,
|
|
1449
|
-
PathSpec,
|
|
1450
|
-
RAMIndexCacheStore,
|
|
1451
|
-
ResourceName,
|
|
1452
|
-
SSCHOLAR_PAPER_COMMANDS,
|
|
1453
|
-
SSCHOLAR_PAPER_OPS,
|
|
1454
|
-
SSCHOLAR_PAPER_PROMPT,
|
|
1455
|
-
SSCholarAccessor,
|
|
1456
|
-
resolveSSCholarConfig,
|
|
1457
|
-
resolveSSCholarPaperGlob,
|
|
1458
|
-
sscholarPaperRead,
|
|
1459
|
-
sscholarPaperReaddir,
|
|
1460
|
-
sscholarPaperStat
|
|
1461
|
-
} from "@struktoai/mirage-core";
|
|
1462
|
-
var SSCholarPaperResource = class {
|
|
1463
|
-
kind = ResourceName.SSCHOLAR_PAPER;
|
|
1464
|
-
isRemote = true;
|
|
1465
|
-
indexTtl = 0;
|
|
1466
|
-
prompt;
|
|
1467
|
-
config;
|
|
1468
|
-
driver;
|
|
1469
|
-
accessor;
|
|
1470
|
-
index;
|
|
1471
|
-
constructor(options = {}) {
|
|
1472
|
-
const opts = "config" in options || "driver" in options || "prefix" in options ? options : { config: options };
|
|
1473
|
-
this.config = resolveSSCholarConfig(opts.config ?? {});
|
|
1474
|
-
this.driver = opts.driver ?? new HttpSSCholarDriver({ baseUrl: this.config.baseUrl, apiKey: this.config.apiKey });
|
|
1475
|
-
this.accessor = new SSCholarAccessor(this.driver, this.config);
|
|
1476
|
-
this.index = new RAMIndexCacheStore({ ttl: this.indexTtl });
|
|
1477
|
-
this.prompt = SSCHOLAR_PAPER_PROMPT.replace("{prefix}", opts.prefix ?? "");
|
|
1478
|
-
}
|
|
1479
|
-
open() {
|
|
1495
|
+
this.tables.clear();
|
|
1480
1496
|
return Promise.resolve();
|
|
1481
1497
|
}
|
|
1482
|
-
async close() {
|
|
1483
|
-
await this.driver.close();
|
|
1484
|
-
}
|
|
1485
|
-
ops() {
|
|
1486
|
-
return SSCHOLAR_PAPER_OPS;
|
|
1487
|
-
}
|
|
1488
|
-
commands() {
|
|
1489
|
-
return SSCHOLAR_PAPER_COMMANDS;
|
|
1490
|
-
}
|
|
1491
|
-
readFile(p) {
|
|
1492
|
-
return sscholarPaperRead(this.accessor, p, this.index);
|
|
1493
|
-
}
|
|
1494
|
-
readdir(p) {
|
|
1495
|
-
return sscholarPaperReaddir(this.accessor, p, this.index);
|
|
1496
|
-
}
|
|
1497
|
-
stat(p) {
|
|
1498
|
-
return sscholarPaperStat(this.accessor, p, this.index);
|
|
1499
|
-
}
|
|
1500
|
-
glob(paths, prefix = "") {
|
|
1501
|
-
const effective = prefix !== "" ? paths.map(
|
|
1502
|
-
(p) => p.prefix !== "" ? p : new PathSpec({
|
|
1503
|
-
original: p.original,
|
|
1504
|
-
directory: p.directory,
|
|
1505
|
-
...p.pattern !== null ? { pattern: p.pattern } : {},
|
|
1506
|
-
resolved: p.resolved,
|
|
1507
|
-
prefix
|
|
1508
|
-
})
|
|
1509
|
-
) : paths;
|
|
1510
|
-
return resolveSSCholarPaperGlob(this.accessor, effective, this.index);
|
|
1511
|
-
}
|
|
1512
1498
|
};
|
|
1513
1499
|
|
|
1514
|
-
// src/resource/
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
ResourceName as ResourceName2,
|
|
1520
|
-
SSCHOLAR_AUTHOR_COMMANDS,
|
|
1521
|
-
SSCHOLAR_AUTHOR_OPS,
|
|
1522
|
-
SSCHOLAR_AUTHOR_PROMPT,
|
|
1523
|
-
SSCholarAccessor as SSCholarAccessor2,
|
|
1524
|
-
resolveSSCholarAuthorGlob,
|
|
1525
|
-
resolveSSCholarConfig as resolveSSCholarConfig2,
|
|
1526
|
-
sscholarAuthorRead,
|
|
1527
|
-
sscholarAuthorReaddir,
|
|
1528
|
-
sscholarAuthorStat
|
|
1529
|
-
} from "@struktoai/mirage-core";
|
|
1530
|
-
var SSCholarAuthorResource = class {
|
|
1531
|
-
kind = ResourceName2.SSCHOLAR_AUTHOR;
|
|
1532
|
-
isRemote = true;
|
|
1500
|
+
// src/resource/lancedb/lancedb.ts
|
|
1501
|
+
var REMOTE_SCHEMES = ["s3://", "gs://", "az://", "hf://", "db://"];
|
|
1502
|
+
var LanceDBResource = class extends BaseResource {
|
|
1503
|
+
kind = ResourceName.LANCEDB;
|
|
1504
|
+
isRemote;
|
|
1533
1505
|
indexTtl = 0;
|
|
1534
|
-
prompt;
|
|
1535
|
-
config;
|
|
1536
|
-
driver;
|
|
1537
|
-
accessor;
|
|
1538
|
-
index;
|
|
1539
|
-
constructor(options = {}) {
|
|
1540
|
-
const opts = "config" in options || "driver" in options || "prefix" in options ? options : { config: options };
|
|
1541
|
-
this.config = resolveSSCholarConfig2(opts.config ?? {});
|
|
1542
|
-
this.driver = opts.driver ?? new HttpSSCholarDriver2({ baseUrl: this.config.baseUrl, apiKey: this.config.apiKey });
|
|
1543
|
-
this.accessor = new SSCholarAccessor2(this.driver, this.config);
|
|
1544
|
-
this.index = new RAMIndexCacheStore2({ ttl: this.indexTtl });
|
|
1545
|
-
this.prompt = SSCHOLAR_AUTHOR_PROMPT.replace("{prefix}", opts.prefix ?? "");
|
|
1546
|
-
}
|
|
1547
|
-
open() {
|
|
1548
|
-
return Promise.resolve();
|
|
1549
|
-
}
|
|
1550
|
-
async close() {
|
|
1551
|
-
await this.driver.close();
|
|
1552
|
-
}
|
|
1553
|
-
ops() {
|
|
1554
|
-
return SSCHOLAR_AUTHOR_OPS;
|
|
1555
|
-
}
|
|
1556
|
-
commands() {
|
|
1557
|
-
return SSCHOLAR_AUTHOR_COMMANDS;
|
|
1558
|
-
}
|
|
1559
|
-
readFile(p) {
|
|
1560
|
-
return sscholarAuthorRead(this.accessor, p, this.index);
|
|
1561
|
-
}
|
|
1562
|
-
readdir(p) {
|
|
1563
|
-
return sscholarAuthorReaddir(this.accessor, p, this.index);
|
|
1564
|
-
}
|
|
1565
|
-
stat(p) {
|
|
1566
|
-
return sscholarAuthorStat(this.accessor, p, this.index);
|
|
1567
|
-
}
|
|
1568
|
-
glob(paths, prefix = "") {
|
|
1569
|
-
const effective = prefix !== "" ? paths.map(
|
|
1570
|
-
(p) => p.prefix !== "" ? p : new PathSpec2({
|
|
1571
|
-
original: p.original,
|
|
1572
|
-
directory: p.directory,
|
|
1573
|
-
...p.pattern !== null ? { pattern: p.pattern } : {},
|
|
1574
|
-
resolved: p.resolved,
|
|
1575
|
-
prefix
|
|
1576
|
-
})
|
|
1577
|
-
) : paths;
|
|
1578
|
-
return resolveSSCholarAuthorGlob(this.accessor, effective, this.index);
|
|
1579
|
-
}
|
|
1580
|
-
};
|
|
1581
|
-
|
|
1582
|
-
// src/resource/vercel/vercel.ts
|
|
1583
|
-
import {
|
|
1584
|
-
HttpVercelDriver,
|
|
1585
|
-
PathSpec as PathSpec3,
|
|
1586
|
-
RAMIndexCacheStore as RAMIndexCacheStore3,
|
|
1587
|
-
ResourceName as ResourceName3,
|
|
1588
|
-
VERCEL_COMMANDS,
|
|
1589
|
-
VERCEL_OPS,
|
|
1590
|
-
VERCEL_PROMPT,
|
|
1591
|
-
VercelAccessor,
|
|
1592
|
-
resolveVercelConfig,
|
|
1593
|
-
resolveVercelGlob,
|
|
1594
|
-
vercelRead,
|
|
1595
|
-
vercelReaddir,
|
|
1596
|
-
vercelStat
|
|
1597
|
-
} from "@struktoai/mirage-core";
|
|
1598
|
-
var VercelResource = class {
|
|
1599
|
-
kind = ResourceName3.VERCEL;
|
|
1600
|
-
isRemote = true;
|
|
1601
|
-
indexTtl = 60;
|
|
1602
|
-
prompt;
|
|
1603
|
-
config;
|
|
1604
|
-
driver;
|
|
1605
|
-
accessor;
|
|
1606
|
-
index;
|
|
1607
|
-
constructor(options = {}) {
|
|
1608
|
-
const opts = "config" in options || "driver" in options || "prefix" in options ? options : { config: options };
|
|
1609
|
-
this.config = resolveVercelConfig(opts.config ?? {});
|
|
1610
|
-
this.driver = opts.driver ?? new HttpVercelDriver({
|
|
1611
|
-
baseUrl: this.config.baseUrl,
|
|
1612
|
-
token: this.config.token,
|
|
1613
|
-
teamId: this.config.teamId
|
|
1614
|
-
});
|
|
1615
|
-
this.accessor = new VercelAccessor(this.driver, this.config);
|
|
1616
|
-
this.index = new RAMIndexCacheStore3({ ttl: this.indexTtl });
|
|
1617
|
-
this.prompt = VERCEL_PROMPT.replace("{prefix}", opts.prefix ?? "");
|
|
1618
|
-
}
|
|
1619
|
-
open() {
|
|
1620
|
-
return Promise.resolve();
|
|
1621
|
-
}
|
|
1622
|
-
async close() {
|
|
1623
|
-
await this.driver.close();
|
|
1624
|
-
}
|
|
1625
|
-
ops() {
|
|
1626
|
-
return VERCEL_OPS;
|
|
1627
|
-
}
|
|
1628
|
-
commands() {
|
|
1629
|
-
return VERCEL_COMMANDS;
|
|
1630
|
-
}
|
|
1631
|
-
readFile(p) {
|
|
1632
|
-
return vercelRead(this.accessor, p, this.index);
|
|
1633
|
-
}
|
|
1634
|
-
readdir(p) {
|
|
1635
|
-
return vercelReaddir(this.accessor, p, this.index);
|
|
1636
|
-
}
|
|
1637
|
-
stat(p) {
|
|
1638
|
-
return vercelStat(this.accessor, p, this.index);
|
|
1639
|
-
}
|
|
1640
|
-
glob(paths, prefix = "") {
|
|
1641
|
-
const effective = prefix !== "" ? paths.map(
|
|
1642
|
-
(p) => p.prefix !== "" ? p : new PathSpec3({
|
|
1643
|
-
original: p.original,
|
|
1644
|
-
directory: p.directory,
|
|
1645
|
-
...p.pattern !== null ? { pattern: p.pattern } : {},
|
|
1646
|
-
resolved: p.resolved,
|
|
1647
|
-
prefix
|
|
1648
|
-
})
|
|
1649
|
-
) : paths;
|
|
1650
|
-
return resolveVercelGlob(this.accessor, effective, this.index);
|
|
1651
|
-
}
|
|
1652
|
-
};
|
|
1653
|
-
|
|
1654
|
-
// src/resource/posthog/posthog.ts
|
|
1655
|
-
import {
|
|
1656
|
-
HttpPostHogDriver,
|
|
1657
|
-
PathSpec as PathSpec4,
|
|
1658
|
-
RAMIndexCacheStore as RAMIndexCacheStore4,
|
|
1659
|
-
ResourceName as ResourceName4,
|
|
1660
|
-
POSTHOG_COMMANDS,
|
|
1661
|
-
POSTHOG_OPS,
|
|
1662
|
-
POSTHOG_PROMPT,
|
|
1663
|
-
PostHogAccessor,
|
|
1664
|
-
posthogRead,
|
|
1665
|
-
posthogReaddir,
|
|
1666
|
-
posthogStat,
|
|
1667
|
-
resolvePostHogConfig,
|
|
1668
|
-
resolvePostHogGlob
|
|
1669
|
-
} from "@struktoai/mirage-core";
|
|
1670
|
-
var PostHogResource = class {
|
|
1671
|
-
kind = ResourceName4.POSTHOG;
|
|
1672
|
-
isRemote = true;
|
|
1673
|
-
indexTtl = 60;
|
|
1674
|
-
prompt;
|
|
1506
|
+
prompt = LANCEDB_PROMPT;
|
|
1675
1507
|
config;
|
|
1676
|
-
|
|
1508
|
+
store;
|
|
1677
1509
|
accessor;
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
const
|
|
1681
|
-
this.config =
|
|
1682
|
-
this.
|
|
1683
|
-
this.
|
|
1684
|
-
this.
|
|
1685
|
-
this.prompt = POSTHOG_PROMPT.replace("{prefix}", opts.prefix ?? "");
|
|
1510
|
+
constructor(options) {
|
|
1511
|
+
super();
|
|
1512
|
+
const config = "config" in options ? options.config : options;
|
|
1513
|
+
this.config = resolveLanceDBConfig(config);
|
|
1514
|
+
this.isRemote = REMOTE_SCHEMES.some((scheme) => this.config.uri.startsWith(scheme));
|
|
1515
|
+
this.store = new LanceDBStore(this.config);
|
|
1516
|
+
this.accessor = new LanceDBAccessor(this.store, this.config);
|
|
1686
1517
|
}
|
|
1687
1518
|
open() {
|
|
1688
1519
|
return Promise.resolve();
|
|
1689
1520
|
}
|
|
1690
1521
|
async close() {
|
|
1691
|
-
await this.
|
|
1522
|
+
await this.store.close();
|
|
1692
1523
|
}
|
|
1693
1524
|
ops() {
|
|
1694
|
-
return
|
|
1525
|
+
return LANCEDB_OPS;
|
|
1695
1526
|
}
|
|
1696
1527
|
commands() {
|
|
1697
|
-
return
|
|
1528
|
+
return LANCEDB_COMMANDS;
|
|
1698
1529
|
}
|
|
1699
1530
|
readFile(p) {
|
|
1700
|
-
return
|
|
1531
|
+
return lanceRead(this.accessor, p, this.index);
|
|
1701
1532
|
}
|
|
1702
1533
|
readdir(p) {
|
|
1703
|
-
return
|
|
1534
|
+
return lanceReaddir(this.accessor, p, this.index);
|
|
1704
1535
|
}
|
|
1705
1536
|
stat(p) {
|
|
1706
|
-
return
|
|
1707
|
-
}
|
|
1708
|
-
glob(paths, prefix = "") {
|
|
1709
|
-
const effective = prefix !== "" ? paths.map(
|
|
1710
|
-
(p) => p.prefix !== "" ? p : new PathSpec4({
|
|
1711
|
-
original: p.original,
|
|
1712
|
-
directory: p.directory,
|
|
1713
|
-
...p.pattern !== null ? { pattern: p.pattern } : {},
|
|
1714
|
-
resolved: p.resolved,
|
|
1715
|
-
prefix
|
|
1716
|
-
})
|
|
1717
|
-
) : paths;
|
|
1718
|
-
return resolvePostHogGlob(this.accessor, effective, this.index);
|
|
1537
|
+
return lanceStat(this.accessor, p, this.index);
|
|
1719
1538
|
}
|
|
1720
1539
|
};
|
|
1721
1540
|
|
|
1722
1541
|
// src/resource/registry.ts
|
|
1723
1542
|
import { normalizeFields } from "@struktoai/mirage-core";
|
|
1724
1543
|
var REGISTRY = {
|
|
1725
|
-
ram: async (
|
|
1544
|
+
ram: async (_config) => {
|
|
1726
1545
|
const { RAMResource } = await import("@struktoai/mirage-core");
|
|
1727
1546
|
return new RAMResource();
|
|
1728
1547
|
},
|
|
1729
1548
|
disk: async (config) => {
|
|
1730
|
-
const { DiskResource: DiskResource2 } = await import("./disk-
|
|
1731
|
-
const
|
|
1732
|
-
return new DiskResource2(
|
|
1549
|
+
const { DiskResource: DiskResource2 } = await import("./disk-POACMF4G.js");
|
|
1550
|
+
const norm = normalizeFields(config);
|
|
1551
|
+
return new DiskResource2(norm);
|
|
1733
1552
|
},
|
|
1734
1553
|
redis: async (config) => {
|
|
1735
|
-
const { RedisResource: RedisResource2 } = await import("./redis-
|
|
1736
|
-
const
|
|
1737
|
-
return new RedisResource2(
|
|
1554
|
+
const { RedisResource: RedisResource2 } = await import("./redis-S6GIPA4Z.js");
|
|
1555
|
+
const norm = normalizeFields(config);
|
|
1556
|
+
return new RedisResource2(norm);
|
|
1738
1557
|
},
|
|
1739
1558
|
s3: async (config) => {
|
|
1740
|
-
const { S3Resource: S3Resource2 } = await import("./s3-
|
|
1741
|
-
const { normalizeS3Config } = await import("./config-
|
|
1559
|
+
const { S3Resource: S3Resource2 } = await import("./s3-GMPUJ65D.js");
|
|
1560
|
+
const { normalizeS3Config } = await import("./config-QWCY3LBQ.js");
|
|
1742
1561
|
return new S3Resource2(normalizeS3Config(config));
|
|
1743
1562
|
},
|
|
1744
1563
|
gcs: async (config) => {
|
|
1745
|
-
const { GCSResource: GCSResource2 } = await import("./gcs-
|
|
1746
|
-
const { normalizeGcsConfig } = await import("./config-
|
|
1564
|
+
const { GCSResource: GCSResource2 } = await import("./gcs-SMIE4VMT.js");
|
|
1565
|
+
const { normalizeGcsConfig } = await import("./config-VM526IKB.js");
|
|
1747
1566
|
return new GCSResource2(normalizeGcsConfig(config));
|
|
1748
1567
|
},
|
|
1749
1568
|
oci: async (config) => {
|
|
1750
|
-
const { OCIResource: OCIResource2 } = await import("./oci-
|
|
1751
|
-
const { normalizeOciConfig } = await import("./config-
|
|
1569
|
+
const { OCIResource: OCIResource2 } = await import("./oci-NURLWPL2.js");
|
|
1570
|
+
const { normalizeOciConfig } = await import("./config-KYTRXAB2.js");
|
|
1752
1571
|
return new OCIResource2(normalizeOciConfig(config));
|
|
1753
1572
|
},
|
|
1754
1573
|
r2: async (config) => {
|
|
1755
|
-
const { R2Resource: R2Resource2 } = await import("./r2-
|
|
1756
|
-
const { normalizeR2Config } = await import("./config-
|
|
1574
|
+
const { R2Resource: R2Resource2 } = await import("./r2-FSZK7IFI.js");
|
|
1575
|
+
const { normalizeR2Config } = await import("./config-KMVCVBYN.js");
|
|
1757
1576
|
return new R2Resource2(normalizeR2Config(config));
|
|
1758
1577
|
},
|
|
1578
|
+
hf_buckets: async (config) => {
|
|
1579
|
+
const { HfBucketsResource: HfBucketsResource2 } = await import("./hf_buckets-RIOMV7WG.js");
|
|
1580
|
+
const { normalizeHfBucketsConfig: normalizeHfBucketsConfig2 } = await import("./config-CVZ2AGCO.js");
|
|
1581
|
+
return new HfBucketsResource2(normalizeHfBucketsConfig2(config));
|
|
1582
|
+
},
|
|
1583
|
+
hf_datasets: async (config) => {
|
|
1584
|
+
const { HfDatasetsResource: HfDatasetsResource2 } = await import("./hf_datasets-QF4BQ3OK.js");
|
|
1585
|
+
const { normalizeHfRepoConfig: normalizeHfRepoConfig2 } = await import("./config-CVZ2AGCO.js");
|
|
1586
|
+
return new HfDatasetsResource2(normalizeHfRepoConfig2(config));
|
|
1587
|
+
},
|
|
1588
|
+
hf_models: async (config) => {
|
|
1589
|
+
const { HfModelsResource: HfModelsResource2 } = await import("./hf_models-62GC2HPZ.js");
|
|
1590
|
+
const { normalizeHfRepoConfig: normalizeHfRepoConfig2 } = await import("./config-CVZ2AGCO.js");
|
|
1591
|
+
return new HfModelsResource2(normalizeHfRepoConfig2(config));
|
|
1592
|
+
},
|
|
1593
|
+
hf_spaces: async (config) => {
|
|
1594
|
+
const { HfSpacesResource: HfSpacesResource2 } = await import("./hf_spaces-NVSMUNRM.js");
|
|
1595
|
+
const { normalizeHfRepoConfig: normalizeHfRepoConfig2 } = await import("./config-CVZ2AGCO.js");
|
|
1596
|
+
return new HfSpacesResource2(normalizeHfRepoConfig2(config));
|
|
1597
|
+
},
|
|
1759
1598
|
supabase: async (config) => {
|
|
1760
|
-
const { SupabaseResource: SupabaseResource2 } = await import("./supabase-
|
|
1761
|
-
const { normalizeSupabaseConfig } = await import("./config-
|
|
1599
|
+
const { SupabaseResource: SupabaseResource2 } = await import("./supabase-HLWNHBBE.js");
|
|
1600
|
+
const { normalizeSupabaseConfig } = await import("./config-GE4W4ZJC.js");
|
|
1762
1601
|
return new SupabaseResource2(normalizeSupabaseConfig(config));
|
|
1763
1602
|
},
|
|
1764
|
-
|
|
1765
|
-
const {
|
|
1766
|
-
const {
|
|
1767
|
-
return
|
|
1603
|
+
databricks_volume: async (config) => {
|
|
1604
|
+
const { DatabricksVolumeResource: DatabricksVolumeResource2 } = await import("./databricks_volume-HNQ4DJVJ.js");
|
|
1605
|
+
const { normalizeDatabricksVolumeConfig } = await import("@struktoai/mirage-core");
|
|
1606
|
+
return DatabricksVolumeResource2.create(normalizeDatabricksVolumeConfig(config));
|
|
1768
1607
|
},
|
|
1769
|
-
|
|
1770
|
-
const {
|
|
1771
|
-
const {
|
|
1772
|
-
return new
|
|
1608
|
+
minio: async (config) => {
|
|
1609
|
+
const { MinIOResource: MinIOResource2 } = await import("./minio-L3XE6PQS.js");
|
|
1610
|
+
const { normalizeMinIOConfig } = await import("./config-34LHOGLM.js");
|
|
1611
|
+
return new MinIOResource2(normalizeMinIOConfig(config));
|
|
1773
1612
|
},
|
|
1774
|
-
|
|
1775
|
-
const {
|
|
1776
|
-
const {
|
|
1777
|
-
return new
|
|
1613
|
+
ceph: async (config) => {
|
|
1614
|
+
const { CephResource: CephResource2 } = await import("./ceph-TNN4I2FT.js");
|
|
1615
|
+
const { normalizeCephConfig } = await import("./config-ZFJYQZCH.js");
|
|
1616
|
+
return new CephResource2(normalizeCephConfig(config));
|
|
1617
|
+
},
|
|
1618
|
+
seaweedfs: async (config) => {
|
|
1619
|
+
const { SeaweedFSResource: SeaweedFSResource2 } = await import("./seaweedfs-J3EPUEPE.js");
|
|
1620
|
+
const { normalizeSeaweedFSConfig } = await import("./config-GHRUKEQ6.js");
|
|
1621
|
+
return new SeaweedFSResource2(normalizeSeaweedFSConfig(config));
|
|
1622
|
+
},
|
|
1623
|
+
wasabi: async (config) => {
|
|
1624
|
+
const { WasabiResource: WasabiResource2 } = await import("./wasabi-SOZKPMRQ.js");
|
|
1625
|
+
const { normalizeWasabiConfig } = await import("./config-QAA646XB.js");
|
|
1626
|
+
return new WasabiResource2(normalizeWasabiConfig(config));
|
|
1627
|
+
},
|
|
1628
|
+
backblaze: async (config) => {
|
|
1629
|
+
const { BackblazeResource: BackblazeResource2 } = await import("./backblaze-OHW57DLK.js");
|
|
1630
|
+
const { normalizeBackblazeConfig } = await import("./config-WDAZFXYD.js");
|
|
1631
|
+
return new BackblazeResource2(normalizeBackblazeConfig(config));
|
|
1632
|
+
},
|
|
1633
|
+
digitalocean: async (config) => {
|
|
1634
|
+
const { DigitalOceanResource: DigitalOceanResource2 } = await import("./digitalocean-6SPR4S7V.js");
|
|
1635
|
+
const { normalizeDigitalOceanConfig } = await import("./config-Q45Y46YT.js");
|
|
1636
|
+
return new DigitalOceanResource2(normalizeDigitalOceanConfig(config));
|
|
1637
|
+
},
|
|
1638
|
+
tencent: async (config) => {
|
|
1639
|
+
const { TencentResource: TencentResource2 } = await import("./tencent-YDO73XBD.js");
|
|
1640
|
+
const { normalizeTencentConfig } = await import("./config-QNMKWJ4M.js");
|
|
1641
|
+
return new TencentResource2(normalizeTencentConfig(config));
|
|
1642
|
+
},
|
|
1643
|
+
aliyun: async (config) => {
|
|
1644
|
+
const { AliyunResource: AliyunResource2 } = await import("./aliyun-TMZRUYCG.js");
|
|
1645
|
+
const { normalizeAliyunConfig } = await import("./config-HKRMKD76.js");
|
|
1646
|
+
return new AliyunResource2(normalizeAliyunConfig(config));
|
|
1647
|
+
},
|
|
1648
|
+
scaleway: async (config) => {
|
|
1649
|
+
const { ScalewayResource: ScalewayResource2 } = await import("./scaleway-5VM55Y6D.js");
|
|
1650
|
+
const { normalizeScalewayConfig } = await import("./config-EO23EY62.js");
|
|
1651
|
+
return new ScalewayResource2(normalizeScalewayConfig(config));
|
|
1652
|
+
},
|
|
1653
|
+
qingstor: async (config) => {
|
|
1654
|
+
const { QingStorResource: QingStorResource2 } = await import("./qingstor-W55D5YFO.js");
|
|
1655
|
+
const { normalizeQingStorConfig } = await import("./config-IVY5EQQ2.js");
|
|
1656
|
+
return new QingStorResource2(normalizeQingStorConfig(config));
|
|
1657
|
+
},
|
|
1658
|
+
postgres: async (config) => {
|
|
1659
|
+
const { PostgresResource: PostgresResource2 } = await import("./postgres-JNFMPAO2.js");
|
|
1660
|
+
const { normalizePostgresConfig } = await import("@struktoai/mirage-core");
|
|
1661
|
+
return new PostgresResource2(normalizePostgresConfig(config));
|
|
1662
|
+
},
|
|
1663
|
+
mongodb: async (config) => {
|
|
1664
|
+
const { MongoDBResource: MongoDBResource2 } = await import("./mongodb-ZOX4FRHJ.js");
|
|
1665
|
+
const { normalizeMongoDBConfig } = await import("@struktoai/mirage-core");
|
|
1666
|
+
return new MongoDBResource2(normalizeMongoDBConfig(config));
|
|
1667
|
+
},
|
|
1668
|
+
slack: async (config) => {
|
|
1669
|
+
const { SlackResource: SlackResource2 } = await import("./slack-FVBXY7KD.js");
|
|
1670
|
+
const { normalizeSlackConfig: normalizeSlackConfig2 } = await import("./config-ZV6G2ZEC.js");
|
|
1671
|
+
return new SlackResource2(normalizeSlackConfig2(config));
|
|
1778
1672
|
},
|
|
1779
1673
|
ssh: async (config) => {
|
|
1780
|
-
const { SSHResource: SSHResource2 } = await import("./ssh-
|
|
1781
|
-
const { normalizeSshConfig: normalizeSshConfig2 } = await import("./config-
|
|
1674
|
+
const { SSHResource: SSHResource2 } = await import("./ssh-GCXETJ3Z.js");
|
|
1675
|
+
const { normalizeSshConfig: normalizeSshConfig2 } = await import("./config-KJOLGVB2.js");
|
|
1782
1676
|
return new SSHResource2(normalizeSshConfig2(config));
|
|
1783
1677
|
},
|
|
1784
1678
|
discord: async (config) => {
|
|
1785
|
-
const { DiscordResource: DiscordResource2 } = await import("./discord-
|
|
1786
|
-
const { normalizeDiscordConfig: normalizeDiscordConfig2 } = await import("./config-
|
|
1679
|
+
const { DiscordResource: DiscordResource2 } = await import("./discord-SAV2RBJV.js");
|
|
1680
|
+
const { normalizeDiscordConfig: normalizeDiscordConfig2 } = await import("./config-DG65OEG3.js");
|
|
1787
1681
|
return new DiscordResource2(normalizeDiscordConfig2(config));
|
|
1788
1682
|
},
|
|
1789
1683
|
trello: async (config) => {
|
|
1790
|
-
const { TrelloResource: TrelloResource2 } = await import("./trello-
|
|
1791
|
-
const { normalizeTrelloConfig: normalizeTrelloConfig2 } = await import("./config-
|
|
1684
|
+
const { TrelloResource: TrelloResource2 } = await import("./trello-CQ53BQUL.js");
|
|
1685
|
+
const { normalizeTrelloConfig: normalizeTrelloConfig2 } = await import("./config-GVH27UPE.js");
|
|
1792
1686
|
return new TrelloResource2(normalizeTrelloConfig2(config));
|
|
1793
1687
|
},
|
|
1794
1688
|
linear: async (config) => {
|
|
1795
|
-
const { LinearResource: LinearResource2 } = await import("./linear-
|
|
1796
|
-
const { normalizeLinearConfig: normalizeLinearConfig2 } = await import("./config-
|
|
1689
|
+
const { LinearResource: LinearResource2 } = await import("./linear-2MM55KBC.js");
|
|
1690
|
+
const { normalizeLinearConfig: normalizeLinearConfig2 } = await import("./config-GCQK6NJY.js");
|
|
1797
1691
|
return new LinearResource2(normalizeLinearConfig2(config));
|
|
1798
1692
|
},
|
|
1693
|
+
notion: async (config) => {
|
|
1694
|
+
const { NotionResource: NotionResource2 } = await import("./notion-UK4GTMT4.js");
|
|
1695
|
+
const { normalizeNotionConfig: normalizeNotionConfig2 } = await import("./config-IJJXGLBQ.js");
|
|
1696
|
+
return new NotionResource2(normalizeNotionConfig2(config));
|
|
1697
|
+
},
|
|
1799
1698
|
langfuse: async (config) => {
|
|
1800
|
-
const { LangfuseResource: LangfuseResource2 } = await import("./langfuse-
|
|
1801
|
-
const { normalizeLangfuseConfig: normalizeLangfuseConfig2 } = await import("./config-
|
|
1699
|
+
const { LangfuseResource: LangfuseResource2 } = await import("./langfuse-HUAYVPHF.js");
|
|
1700
|
+
const { normalizeLangfuseConfig: normalizeLangfuseConfig2 } = await import("./config-LHFFXVYI.js");
|
|
1802
1701
|
return new LangfuseResource2(normalizeLangfuseConfig2(config));
|
|
1803
1702
|
},
|
|
1804
1703
|
github: async (config) => {
|
|
1805
|
-
const { GitHubResource: GitHubResource2 } = await import("./github-
|
|
1806
|
-
const { normalizeGitHubConfig: normalizeGitHubConfig2 } = await import("./config-
|
|
1704
|
+
const { GitHubResource: GitHubResource2 } = await import("./github-KBHWANKQ.js");
|
|
1705
|
+
const { normalizeGitHubConfig: normalizeGitHubConfig2 } = await import("./config-3BBWD5AB.js");
|
|
1807
1706
|
return GitHubResource2.create(normalizeGitHubConfig2(config));
|
|
1808
1707
|
},
|
|
1809
1708
|
github_ci: async (config) => {
|
|
1810
|
-
const { GitHubCIResource: GitHubCIResource2 } = await import("./github_ci-
|
|
1811
|
-
const { normalizeGitHubCIConfig: normalizeGitHubCIConfig2 } = await import("./config-
|
|
1709
|
+
const { GitHubCIResource: GitHubCIResource2 } = await import("./github_ci-HPITNK37.js");
|
|
1710
|
+
const { normalizeGitHubCIConfig: normalizeGitHubCIConfig2 } = await import("./config-EIHSP5DZ.js");
|
|
1812
1711
|
return new GitHubCIResource2(normalizeGitHubCIConfig2(config));
|
|
1813
1712
|
},
|
|
1814
1713
|
gdocs: async (config) => {
|
|
1815
|
-
const { GDocsResource: GDocsResource2 } = await import("./gdocs-
|
|
1816
|
-
const { normalizeGDocsConfig: normalizeGDocsConfig2 } = await import("./config-
|
|
1714
|
+
const { GDocsResource: GDocsResource2 } = await import("./gdocs-X5Y2SIQX.js");
|
|
1715
|
+
const { normalizeGDocsConfig: normalizeGDocsConfig2 } = await import("./config-D3RLSPNF.js");
|
|
1817
1716
|
return new GDocsResource2(normalizeGDocsConfig2(config));
|
|
1818
1717
|
},
|
|
1819
1718
|
gsheets: async (config) => {
|
|
1820
|
-
const { GSheetsResource: GSheetsResource2 } = await import("./gsheets-
|
|
1821
|
-
const { normalizeGSheetsConfig: normalizeGSheetsConfig2 } = await import("./config-
|
|
1719
|
+
const { GSheetsResource: GSheetsResource2 } = await import("./gsheets-ZSUDIWGK.js");
|
|
1720
|
+
const { normalizeGSheetsConfig: normalizeGSheetsConfig2 } = await import("./config-OT2TQQCN.js");
|
|
1822
1721
|
return new GSheetsResource2(normalizeGSheetsConfig2(config));
|
|
1823
1722
|
},
|
|
1824
1723
|
gslides: async (config) => {
|
|
1825
|
-
const { GSlidesResource: GSlidesResource2 } = await import("./gslides-
|
|
1826
|
-
const { normalizeGSlidesConfig: normalizeGSlidesConfig2 } = await import("./config-
|
|
1724
|
+
const { GSlidesResource: GSlidesResource2 } = await import("./gslides-GYXM7IMJ.js");
|
|
1725
|
+
const { normalizeGSlidesConfig: normalizeGSlidesConfig2 } = await import("./config-IDZMEW73.js");
|
|
1827
1726
|
return new GSlidesResource2(normalizeGSlidesConfig2(config));
|
|
1828
1727
|
},
|
|
1829
1728
|
gdrive: async (config) => {
|
|
1830
|
-
const { GDriveResource: GDriveResource2 } = await import("./gdrive-
|
|
1831
|
-
const { normalizeGDriveConfig: normalizeGDriveConfig2 } = await import("./config-
|
|
1729
|
+
const { GDriveResource: GDriveResource2 } = await import("./gdrive-SIQPRIGI.js");
|
|
1730
|
+
const { normalizeGDriveConfig: normalizeGDriveConfig2 } = await import("./config-HXVYIXP5.js");
|
|
1832
1731
|
return new GDriveResource2(normalizeGDriveConfig2(config));
|
|
1833
1732
|
},
|
|
1834
1733
|
dropbox: async (config) => {
|
|
1835
|
-
const { DropboxResource: DropboxResource2 } = await import("./dropbox-
|
|
1836
|
-
const { normalizeDropboxConfig: normalizeDropboxConfig2 } = await import("./config-
|
|
1734
|
+
const { DropboxResource: DropboxResource2 } = await import("./dropbox-CQ7MTYX2.js");
|
|
1735
|
+
const { normalizeDropboxConfig: normalizeDropboxConfig2 } = await import("./config-4UDVSUQJ.js");
|
|
1837
1736
|
return new DropboxResource2(normalizeDropboxConfig2(config));
|
|
1838
1737
|
},
|
|
1839
1738
|
box: async (config) => {
|
|
1840
|
-
const { BoxResource: BoxResource2 } = await import("./box-
|
|
1841
|
-
const { normalizeBoxConfig: normalizeBoxConfig2 } = await import("./config-
|
|
1739
|
+
const { BoxResource: BoxResource2 } = await import("./box-UXTCAFOZ.js");
|
|
1740
|
+
const { normalizeBoxConfig: normalizeBoxConfig2 } = await import("./config-CMDBAPDH.js");
|
|
1842
1741
|
return new BoxResource2(normalizeBoxConfig2(config));
|
|
1843
1742
|
},
|
|
1844
1743
|
gmail: async (config) => {
|
|
1845
|
-
const { GmailResource: GmailResource2 } = await import("./gmail-
|
|
1846
|
-
const { normalizeGmailConfig
|
|
1847
|
-
return new GmailResource2(
|
|
1744
|
+
const { GmailResource: GmailResource2 } = await import("./gmail-DKHAGJNX.js");
|
|
1745
|
+
const { normalizeGmailConfig } = await import("./config-NV5WXP64.js");
|
|
1746
|
+
return new GmailResource2(normalizeGmailConfig(config));
|
|
1848
1747
|
},
|
|
1849
1748
|
email: async (config) => {
|
|
1850
|
-
const { EmailResource: EmailResource2 } = await import("./email-
|
|
1851
|
-
const { normalizeEmailConfig: normalizeEmailConfig2 } = await import("./config-
|
|
1749
|
+
const { EmailResource: EmailResource2 } = await import("./email-KBQ7CXS7.js");
|
|
1750
|
+
const { normalizeEmailConfig: normalizeEmailConfig2 } = await import("./config-3IVQJBNW.js");
|
|
1852
1751
|
return new EmailResource2(normalizeEmailConfig2(config));
|
|
1853
1752
|
}
|
|
1854
1753
|
};
|
|
@@ -1867,1585 +1766,20 @@ async function buildResource(name, config = {}) {
|
|
|
1867
1766
|
}
|
|
1868
1767
|
return factory(config);
|
|
1869
1768
|
}
|
|
1870
|
-
|
|
1871
|
-
// src/commands/local_audio/disk/cat_mp3.ts
|
|
1872
|
-
import {
|
|
1873
|
-
IOResult,
|
|
1874
|
-
ResourceName as ResourceName5,
|
|
1875
|
-
command,
|
|
1876
|
-
materialize,
|
|
1877
|
-
specOf
|
|
1878
|
-
} from "@struktoai/mirage-core";
|
|
1879
|
-
|
|
1880
|
-
// src/commands/local_audio/utils.ts
|
|
1881
|
-
import { createRequire as createRequire3 } from "module";
|
|
1882
|
-
import { join as join2 } from "path";
|
|
1883
|
-
import { parseBuffer } from "music-metadata";
|
|
1884
|
-
var _config = {};
|
|
1885
|
-
var ENC = new TextEncoder();
|
|
1886
|
-
var DEC = new TextDecoder();
|
|
1887
|
-
var _sherpa = null;
|
|
1888
|
-
var _wavefile = null;
|
|
1889
|
-
var _recognizer = null;
|
|
1890
|
-
var _loadedModelDir = null;
|
|
1891
|
-
var require2 = createRequire3(import.meta.url);
|
|
1892
|
-
function loadSherpa() {
|
|
1893
|
-
if (_sherpa !== null) return _sherpa;
|
|
1894
|
-
try {
|
|
1895
|
-
_sherpa = require2("sherpa-onnx-node");
|
|
1896
|
-
return _sherpa;
|
|
1897
|
-
} catch {
|
|
1898
|
-
throw new Error(
|
|
1899
|
-
"Audio transcription requires 'sherpa-onnx-node'. Install with: npm i sherpa-onnx-node (or pnpm/yarn add)."
|
|
1900
|
-
);
|
|
1901
|
-
}
|
|
1902
|
-
}
|
|
1903
|
-
function loadWavefile() {
|
|
1904
|
-
if (_wavefile !== null) return _wavefile;
|
|
1905
|
-
try {
|
|
1906
|
-
_wavefile = require2("wavefile");
|
|
1907
|
-
return _wavefile;
|
|
1908
|
-
} catch {
|
|
1909
|
-
throw new Error(
|
|
1910
|
-
"Built-in WAV decoding requires 'wavefile'. Install with: npm i wavefile (or pass a custom recognizer via configure({ recognizer }) to skip it)."
|
|
1911
|
-
);
|
|
1912
|
-
}
|
|
1913
|
-
}
|
|
1914
|
-
function getRecognizer(modelDir) {
|
|
1915
|
-
if (_recognizer !== null && _loadedModelDir === modelDir) return _recognizer;
|
|
1916
|
-
const sherpa = loadSherpa();
|
|
1917
|
-
_recognizer = new sherpa.OfflineRecognizer({
|
|
1918
|
-
featConfig: { sampleRate: 16e3, featureDim: 80 },
|
|
1919
|
-
modelConfig: {
|
|
1920
|
-
whisper: {
|
|
1921
|
-
encoder: join2(modelDir, "base-encoder.int8.onnx"),
|
|
1922
|
-
decoder: join2(modelDir, "base-decoder.int8.onnx")
|
|
1923
|
-
},
|
|
1924
|
-
tokens: join2(modelDir, "base-tokens.txt"),
|
|
1925
|
-
numThreads: 2,
|
|
1926
|
-
provider: "cpu"
|
|
1927
|
-
}
|
|
1928
|
-
});
|
|
1929
|
-
_loadedModelDir = modelDir;
|
|
1930
|
-
return _recognizer;
|
|
1931
|
-
}
|
|
1932
|
-
function configure(opts) {
|
|
1933
|
-
if (opts.modelDir !== void 0) _config.modelDir = opts.modelDir;
|
|
1934
|
-
if (opts.recognizer !== void 0) _config.recognizer = opts.recognizer;
|
|
1935
|
-
if (opts.modelDir !== void 0 && opts.modelDir !== _loadedModelDir) {
|
|
1936
|
-
_recognizer = null;
|
|
1937
|
-
_loadedModelDir = null;
|
|
1938
|
-
}
|
|
1939
|
-
}
|
|
1940
|
-
function getConfig() {
|
|
1941
|
-
return _config;
|
|
1942
|
-
}
|
|
1943
|
-
async function* transcribe(raw, startSec, endSec) {
|
|
1944
|
-
if (_config.recognizer !== void 0) {
|
|
1945
|
-
for await (const chunk of _config.recognizer(raw, startSec, endSec)) {
|
|
1946
|
-
yield typeof chunk === "string" ? ENC.encode(chunk) : chunk;
|
|
1947
|
-
}
|
|
1948
|
-
return;
|
|
1949
|
-
}
|
|
1950
|
-
if (_config.modelDir !== void 0) {
|
|
1951
|
-
const isWav = raw.byteLength >= 12 && DEC.decode(raw.subarray(0, 4)) === "RIFF";
|
|
1952
|
-
if (!isWav) {
|
|
1953
|
-
throw new Error(
|
|
1954
|
-
"Built-in transcriber handles WAV only. For MP3/OGG/other, pass a custom transcriber via configure({ recognizer: (raw, startSec?, endSec?) => AsyncIterable<string | Uint8Array> })."
|
|
1955
|
-
);
|
|
1956
|
-
}
|
|
1957
|
-
const { WaveFile } = loadWavefile();
|
|
1958
|
-
const w = new WaveFile(raw);
|
|
1959
|
-
w.toSampleRate(16e3);
|
|
1960
|
-
w.toBitDepth("32f");
|
|
1961
|
-
let samples = w.getSamples(true, Float32Array);
|
|
1962
|
-
if (startSec !== void 0 || endSec !== void 0) {
|
|
1963
|
-
const s = Math.max(0, Math.floor((startSec ?? 0) * 16e3));
|
|
1964
|
-
const e = endSec !== void 0 ? Math.min(samples.length, Math.floor(endSec * 16e3)) : samples.length;
|
|
1965
|
-
samples = samples.subarray(s, e);
|
|
1966
|
-
}
|
|
1967
|
-
const recognizer = getRecognizer(_config.modelDir);
|
|
1968
|
-
const stream2 = recognizer.createStream();
|
|
1969
|
-
stream2.acceptWaveform({ sampleRate: 16e3, samples });
|
|
1970
|
-
const result = await recognizer.decodeAsync(stream2);
|
|
1971
|
-
const text = result.text.trim();
|
|
1972
|
-
if (text !== "") yield ENC.encode(`${text}
|
|
1973
|
-
`);
|
|
1974
|
-
return;
|
|
1975
|
-
}
|
|
1976
|
-
throw new Error(
|
|
1977
|
-
"Audio transcription not configured. Call configure({ modelDir }) to use the built-in sherpa-onnx+wavefile pipeline, or configure({ recognizer }) to plug your own."
|
|
1978
|
-
);
|
|
1979
|
-
}
|
|
1980
|
-
async function metadata(raw) {
|
|
1981
|
-
const parsed = await parseBuffer(raw, void 0, { duration: true });
|
|
1982
|
-
const f = parsed.format;
|
|
1983
|
-
return {
|
|
1984
|
-
duration: f.duration ?? null,
|
|
1985
|
-
sampleRate: f.sampleRate ?? null,
|
|
1986
|
-
channels: f.numberOfChannels ?? null,
|
|
1987
|
-
bitrate: f.bitrate !== void 0 ? f.bitrate / 1e3 : null
|
|
1988
|
-
};
|
|
1989
|
-
}
|
|
1990
|
-
function estimateByteRange(meta, fileSize, startSec, endSec) {
|
|
1991
|
-
const duration = meta.duration ?? 0;
|
|
1992
|
-
if (duration <= 0) return [0, fileSize];
|
|
1993
|
-
const start = startSec ?? 0;
|
|
1994
|
-
const end = endSec ?? duration;
|
|
1995
|
-
const ratioStart = Math.max(0, start / duration);
|
|
1996
|
-
const ratioEnd = Math.min(1, end / duration);
|
|
1997
|
-
return [Math.floor(ratioStart * fileSize), Math.floor(ratioEnd * fileSize)];
|
|
1998
|
-
}
|
|
1999
|
-
function formatDuration(duration) {
|
|
2000
|
-
const total = Math.floor(duration);
|
|
2001
|
-
const hours = Math.floor(total / 3600);
|
|
2002
|
-
const minutes = Math.floor(total % 3600 / 60);
|
|
2003
|
-
const seconds = total % 60;
|
|
2004
|
-
const mm = String(minutes).padStart(2, "0");
|
|
2005
|
-
const ss = String(seconds).padStart(2, "0");
|
|
2006
|
-
if (hours > 0) return `${String(hours)}:${mm}:${ss}`;
|
|
2007
|
-
return `${String(minutes)}:${ss}`;
|
|
2008
|
-
}
|
|
2009
|
-
function formatMetadata(meta, path, fileSize) {
|
|
2010
|
-
const lines = [`${path}:`];
|
|
2011
|
-
const { duration, sampleRate, channels, bitrate } = meta;
|
|
2012
|
-
if (duration !== null) lines.push(` Duration: ${formatDuration(duration)}`);
|
|
2013
|
-
else lines.push(" Duration: unknown");
|
|
2014
|
-
if (sampleRate !== null) lines.push(` Sample rate: ${String(Math.floor(sampleRate))} Hz`);
|
|
2015
|
-
if (channels !== null) {
|
|
2016
|
-
const ch = Math.floor(channels);
|
|
2017
|
-
const label = ch === 1 ? "mono" : ch === 2 ? "stereo" : `${String(ch)} channels`;
|
|
2018
|
-
lines.push(` Channels: ${String(ch)} (${label})`);
|
|
2019
|
-
}
|
|
2020
|
-
if (bitrate !== null) lines.push(` Bitrate: ${bitrate.toFixed(1)} kbps`);
|
|
2021
|
-
if (fileSize !== void 0 && fileSize !== null) {
|
|
2022
|
-
if (fileSize >= 1048576) lines.push(` File size: ${(fileSize / 1048576).toFixed(1)} MB`);
|
|
2023
|
-
else if (fileSize >= 1024) lines.push(` File size: ${(fileSize / 1024).toFixed(1)} KB`);
|
|
2024
|
-
else lines.push(` File size: ${String(fileSize)} B`);
|
|
2025
|
-
}
|
|
2026
|
-
return lines.join("\n");
|
|
2027
|
-
}
|
|
2028
|
-
|
|
2029
|
-
// src/commands/local_audio/disk/cat_mp3.ts
|
|
2030
|
-
var ENC2 = new TextEncoder();
|
|
2031
|
-
async function catMp3Command(accessor, paths, _texts, _opts) {
|
|
2032
|
-
if (paths.length === 0) {
|
|
2033
|
-
return [null, new IOResult({ exitCode: 1, stderr: ENC2.encode("cat: missing operand\n") })];
|
|
2034
|
-
}
|
|
2035
|
-
const first = paths[0];
|
|
2036
|
-
if (first === void 0) return [null, new IOResult()];
|
|
2037
|
-
try {
|
|
2038
|
-
const raw = await materialize(stream(accessor, first));
|
|
2039
|
-
const out = transcribe(raw);
|
|
2040
|
-
return [out, new IOResult({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
2041
|
-
} catch (err) {
|
|
2042
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2043
|
-
return [
|
|
2044
|
-
null,
|
|
2045
|
-
new IOResult({
|
|
2046
|
-
exitCode: 1,
|
|
2047
|
-
stderr: ENC2.encode(`cat: ${first.original}: failed to read as mp3: ${msg}
|
|
2048
|
-
`)
|
|
2049
|
-
})
|
|
2050
|
-
];
|
|
2051
|
-
}
|
|
2052
|
-
}
|
|
2053
|
-
var DISK_LOCAL_AUDIO_CAT_MP3 = command({
|
|
2054
|
-
name: "cat",
|
|
2055
|
-
resource: ResourceName5.DISK,
|
|
2056
|
-
spec: specOf("cat"),
|
|
2057
|
-
filetype: ".mp3",
|
|
2058
|
-
fn: catMp3Command
|
|
2059
|
-
});
|
|
2060
|
-
|
|
2061
|
-
// src/commands/local_audio/disk/cat_ogg.ts
|
|
2062
|
-
import {
|
|
2063
|
-
IOResult as IOResult2,
|
|
2064
|
-
ResourceName as ResourceName6,
|
|
2065
|
-
command as command2,
|
|
2066
|
-
materialize as materialize2,
|
|
2067
|
-
specOf as specOf2
|
|
2068
|
-
} from "@struktoai/mirage-core";
|
|
2069
|
-
var ENC3 = new TextEncoder();
|
|
2070
|
-
async function catOggCommand(accessor, paths, _texts, _opts) {
|
|
2071
|
-
if (paths.length === 0) {
|
|
2072
|
-
return [null, new IOResult2({ exitCode: 1, stderr: ENC3.encode("cat: missing operand\n") })];
|
|
2073
|
-
}
|
|
2074
|
-
const first = paths[0];
|
|
2075
|
-
if (first === void 0) return [null, new IOResult2()];
|
|
2076
|
-
try {
|
|
2077
|
-
const raw = await materialize2(stream(accessor, first));
|
|
2078
|
-
const out = transcribe(raw);
|
|
2079
|
-
return [out, new IOResult2({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
2080
|
-
} catch (err) {
|
|
2081
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2082
|
-
return [
|
|
2083
|
-
null,
|
|
2084
|
-
new IOResult2({
|
|
2085
|
-
exitCode: 1,
|
|
2086
|
-
stderr: ENC3.encode(`cat: ${first.original}: failed to read as ogg: ${msg}
|
|
2087
|
-
`)
|
|
2088
|
-
})
|
|
2089
|
-
];
|
|
2090
|
-
}
|
|
2091
|
-
}
|
|
2092
|
-
var DISK_LOCAL_AUDIO_CAT_OGG = command2({
|
|
2093
|
-
name: "cat",
|
|
2094
|
-
resource: ResourceName6.DISK,
|
|
2095
|
-
spec: specOf2("cat"),
|
|
2096
|
-
filetype: ".ogg",
|
|
2097
|
-
fn: catOggCommand
|
|
2098
|
-
});
|
|
2099
|
-
|
|
2100
|
-
// src/commands/local_audio/disk/cat_wav.ts
|
|
2101
|
-
import {
|
|
2102
|
-
IOResult as IOResult3,
|
|
2103
|
-
ResourceName as ResourceName7,
|
|
2104
|
-
command as command3,
|
|
2105
|
-
materialize as materialize3,
|
|
2106
|
-
specOf as specOf3
|
|
2107
|
-
} from "@struktoai/mirage-core";
|
|
2108
|
-
var ENC4 = new TextEncoder();
|
|
2109
|
-
async function catWavCommand(accessor, paths, _texts, _opts) {
|
|
2110
|
-
if (paths.length === 0) {
|
|
2111
|
-
return [null, new IOResult3({ exitCode: 1, stderr: ENC4.encode("cat: missing operand\n") })];
|
|
2112
|
-
}
|
|
2113
|
-
const first = paths[0];
|
|
2114
|
-
if (first === void 0) return [null, new IOResult3()];
|
|
2115
|
-
try {
|
|
2116
|
-
const raw = await materialize3(stream(accessor, first));
|
|
2117
|
-
const out = transcribe(raw);
|
|
2118
|
-
return [out, new IOResult3({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
2119
|
-
} catch (err) {
|
|
2120
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2121
|
-
return [
|
|
2122
|
-
null,
|
|
2123
|
-
new IOResult3({
|
|
2124
|
-
exitCode: 1,
|
|
2125
|
-
stderr: ENC4.encode(`cat: ${first.original}: failed to read as wav: ${msg}
|
|
2126
|
-
`)
|
|
2127
|
-
})
|
|
2128
|
-
];
|
|
2129
|
-
}
|
|
2130
|
-
}
|
|
2131
|
-
var DISK_LOCAL_AUDIO_CAT_WAV = command3({
|
|
2132
|
-
name: "cat",
|
|
2133
|
-
resource: ResourceName7.DISK,
|
|
2134
|
-
spec: specOf3("cat"),
|
|
2135
|
-
filetype: ".wav",
|
|
2136
|
-
fn: catWavCommand
|
|
2137
|
-
});
|
|
2138
|
-
|
|
2139
|
-
// src/commands/local_audio/disk/grep_mp3.ts
|
|
2140
|
-
import {
|
|
2141
|
-
IOResult as IOResult4,
|
|
2142
|
-
ResourceName as ResourceName8,
|
|
2143
|
-
command as command4,
|
|
2144
|
-
materialize as materialize4,
|
|
2145
|
-
specOf as specOf4
|
|
2146
|
-
} from "@struktoai/mirage-core";
|
|
2147
|
-
var ENC5 = new TextEncoder();
|
|
2148
|
-
var DEC2 = new TextDecoder();
|
|
2149
|
-
async function grepMp3Command(accessor, paths, texts, opts) {
|
|
2150
|
-
if (paths.length === 0 || texts.length === 0) {
|
|
2151
|
-
return [null, new IOResult4({ exitCode: 1, stderr: ENC5.encode("grep: missing operand\n") })];
|
|
2152
|
-
}
|
|
2153
|
-
const first = paths[0];
|
|
2154
|
-
if (first === void 0) return [null, new IOResult4()];
|
|
2155
|
-
const pattern = texts[0] ?? "";
|
|
2156
|
-
const ignoreCase = opts.flags.i === true;
|
|
2157
|
-
try {
|
|
2158
|
-
const raw = await materialize4(stream(accessor, first));
|
|
2159
|
-
const text = DEC2.decode(await materialize4(transcribe(raw)));
|
|
2160
|
-
const flags = ignoreCase ? "i" : "";
|
|
2161
|
-
const re = new RegExp(pattern, flags);
|
|
2162
|
-
if (re.test(text)) {
|
|
2163
|
-
const out = ENC5.encode(text);
|
|
2164
|
-
return [out, new IOResult4({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
2165
|
-
}
|
|
2166
|
-
return [
|
|
2167
|
-
null,
|
|
2168
|
-
new IOResult4({
|
|
2169
|
-
exitCode: 1,
|
|
2170
|
-
reads: { [first.original]: raw },
|
|
2171
|
-
cache: [first.original]
|
|
2172
|
-
})
|
|
2173
|
-
];
|
|
2174
|
-
} catch (err) {
|
|
2175
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2176
|
-
return [
|
|
2177
|
-
null,
|
|
2178
|
-
new IOResult4({
|
|
2179
|
-
exitCode: 1,
|
|
2180
|
-
stderr: ENC5.encode(`grep: ${first.original}: failed to read as mp3: ${msg}
|
|
2181
|
-
`)
|
|
2182
|
-
})
|
|
2183
|
-
];
|
|
2184
|
-
}
|
|
2185
|
-
}
|
|
2186
|
-
var DISK_LOCAL_AUDIO_GREP_MP3 = command4({
|
|
2187
|
-
name: "grep",
|
|
2188
|
-
resource: ResourceName8.DISK,
|
|
2189
|
-
spec: specOf4("grep"),
|
|
2190
|
-
filetype: ".mp3",
|
|
2191
|
-
fn: grepMp3Command
|
|
2192
|
-
});
|
|
2193
|
-
|
|
2194
|
-
// src/commands/local_audio/disk/grep_ogg.ts
|
|
2195
|
-
import {
|
|
2196
|
-
IOResult as IOResult5,
|
|
2197
|
-
ResourceName as ResourceName9,
|
|
2198
|
-
command as command5,
|
|
2199
|
-
materialize as materialize5,
|
|
2200
|
-
specOf as specOf5
|
|
2201
|
-
} from "@struktoai/mirage-core";
|
|
2202
|
-
var ENC6 = new TextEncoder();
|
|
2203
|
-
var DEC3 = new TextDecoder();
|
|
2204
|
-
async function grepOggCommand(accessor, paths, texts, opts) {
|
|
2205
|
-
if (paths.length === 0 || texts.length === 0) {
|
|
2206
|
-
return [null, new IOResult5({ exitCode: 1, stderr: ENC6.encode("grep: missing operand\n") })];
|
|
2207
|
-
}
|
|
2208
|
-
const first = paths[0];
|
|
2209
|
-
if (first === void 0) return [null, new IOResult5()];
|
|
2210
|
-
const pattern = texts[0] ?? "";
|
|
2211
|
-
const ignoreCase = opts.flags.i === true;
|
|
2212
|
-
try {
|
|
2213
|
-
const raw = await materialize5(stream(accessor, first));
|
|
2214
|
-
const text = DEC3.decode(await materialize5(transcribe(raw)));
|
|
2215
|
-
const flags = ignoreCase ? "i" : "";
|
|
2216
|
-
const re = new RegExp(pattern, flags);
|
|
2217
|
-
if (re.test(text)) {
|
|
2218
|
-
const out = ENC6.encode(text);
|
|
2219
|
-
return [out, new IOResult5({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
2220
|
-
}
|
|
2221
|
-
return [
|
|
2222
|
-
null,
|
|
2223
|
-
new IOResult5({
|
|
2224
|
-
exitCode: 1,
|
|
2225
|
-
reads: { [first.original]: raw },
|
|
2226
|
-
cache: [first.original]
|
|
2227
|
-
})
|
|
2228
|
-
];
|
|
2229
|
-
} catch (err) {
|
|
2230
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2231
|
-
return [
|
|
2232
|
-
null,
|
|
2233
|
-
new IOResult5({
|
|
2234
|
-
exitCode: 1,
|
|
2235
|
-
stderr: ENC6.encode(`grep: ${first.original}: failed to read as ogg: ${msg}
|
|
2236
|
-
`)
|
|
2237
|
-
})
|
|
2238
|
-
];
|
|
2239
|
-
}
|
|
2240
|
-
}
|
|
2241
|
-
var DISK_LOCAL_AUDIO_GREP_OGG = command5({
|
|
2242
|
-
name: "grep",
|
|
2243
|
-
resource: ResourceName9.DISK,
|
|
2244
|
-
spec: specOf5("grep"),
|
|
2245
|
-
filetype: ".ogg",
|
|
2246
|
-
fn: grepOggCommand
|
|
2247
|
-
});
|
|
2248
|
-
|
|
2249
|
-
// src/commands/local_audio/disk/grep_wav.ts
|
|
2250
|
-
import {
|
|
2251
|
-
IOResult as IOResult6,
|
|
2252
|
-
ResourceName as ResourceName10,
|
|
2253
|
-
command as command6,
|
|
2254
|
-
materialize as materialize6,
|
|
2255
|
-
specOf as specOf6
|
|
2256
|
-
} from "@struktoai/mirage-core";
|
|
2257
|
-
var ENC7 = new TextEncoder();
|
|
2258
|
-
var DEC4 = new TextDecoder();
|
|
2259
|
-
async function grepWavCommand(accessor, paths, texts, opts) {
|
|
2260
|
-
if (paths.length === 0 || texts.length === 0) {
|
|
2261
|
-
return [null, new IOResult6({ exitCode: 1, stderr: ENC7.encode("grep: missing operand\n") })];
|
|
2262
|
-
}
|
|
2263
|
-
const first = paths[0];
|
|
2264
|
-
if (first === void 0) return [null, new IOResult6()];
|
|
2265
|
-
const pattern = texts[0] ?? "";
|
|
2266
|
-
const ignoreCase = opts.flags.i === true;
|
|
2267
|
-
try {
|
|
2268
|
-
const raw = await materialize6(stream(accessor, first));
|
|
2269
|
-
const text = DEC4.decode(await materialize6(transcribe(raw)));
|
|
2270
|
-
const flags = ignoreCase ? "i" : "";
|
|
2271
|
-
const re = new RegExp(pattern, flags);
|
|
2272
|
-
if (re.test(text)) {
|
|
2273
|
-
const out = ENC7.encode(text);
|
|
2274
|
-
return [out, new IOResult6({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
2275
|
-
}
|
|
2276
|
-
return [
|
|
2277
|
-
null,
|
|
2278
|
-
new IOResult6({
|
|
2279
|
-
exitCode: 1,
|
|
2280
|
-
reads: { [first.original]: raw },
|
|
2281
|
-
cache: [first.original]
|
|
2282
|
-
})
|
|
2283
|
-
];
|
|
2284
|
-
} catch (err) {
|
|
2285
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2286
|
-
return [
|
|
2287
|
-
null,
|
|
2288
|
-
new IOResult6({
|
|
2289
|
-
exitCode: 1,
|
|
2290
|
-
stderr: ENC7.encode(`grep: ${first.original}: failed to read as wav: ${msg}
|
|
2291
|
-
`)
|
|
2292
|
-
})
|
|
2293
|
-
];
|
|
2294
|
-
}
|
|
2295
|
-
}
|
|
2296
|
-
var DISK_LOCAL_AUDIO_GREP_WAV = command6({
|
|
2297
|
-
name: "grep",
|
|
2298
|
-
resource: ResourceName10.DISK,
|
|
2299
|
-
spec: specOf6("grep"),
|
|
2300
|
-
filetype: ".wav",
|
|
2301
|
-
fn: grepWavCommand
|
|
2302
|
-
});
|
|
2303
|
-
|
|
2304
|
-
// src/commands/local_audio/disk/head_mp3.ts
|
|
2305
|
-
import {
|
|
2306
|
-
IOResult as IOResult7,
|
|
2307
|
-
ResourceName as ResourceName11,
|
|
2308
|
-
command as command7,
|
|
2309
|
-
materialize as materialize7,
|
|
2310
|
-
specOf as specOf7
|
|
2311
|
-
} from "@struktoai/mirage-core";
|
|
2312
|
-
var ENC8 = new TextEncoder();
|
|
2313
|
-
async function headMp3Command(accessor, paths, _texts, opts) {
|
|
2314
|
-
if (paths.length === 0) {
|
|
2315
|
-
return [null, new IOResult7({ exitCode: 1, stderr: ENC8.encode("head: missing operand\n") })];
|
|
2316
|
-
}
|
|
2317
|
-
const first = paths[0];
|
|
2318
|
-
if (first === void 0) return [null, new IOResult7()];
|
|
2319
|
-
if (typeof opts.flags.c === "string") {
|
|
2320
|
-
return [
|
|
2321
|
-
null,
|
|
2322
|
-
new IOResult7({ exitCode: 1, stderr: ENC8.encode("head: -c not supported for audio files\n") })
|
|
2323
|
-
];
|
|
2324
|
-
}
|
|
2325
|
-
const n = typeof opts.flags.n === "string" ? Number.parseInt(opts.flags.n, 10) : 10;
|
|
2326
|
-
try {
|
|
2327
|
-
const raw = await materialize7(stream(accessor, first));
|
|
2328
|
-
const out = transcribe(raw, void 0, n);
|
|
2329
|
-
return [out, new IOResult7({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
2330
|
-
} catch (err) {
|
|
2331
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2332
|
-
return [
|
|
2333
|
-
null,
|
|
2334
|
-
new IOResult7({
|
|
2335
|
-
exitCode: 1,
|
|
2336
|
-
stderr: ENC8.encode(`head: ${first.original}: failed to read as mp3: ${msg}
|
|
2337
|
-
`)
|
|
2338
|
-
})
|
|
2339
|
-
];
|
|
2340
|
-
}
|
|
2341
|
-
}
|
|
2342
|
-
var DISK_LOCAL_AUDIO_HEAD_MP3 = command7({
|
|
2343
|
-
name: "head",
|
|
2344
|
-
resource: ResourceName11.DISK,
|
|
2345
|
-
spec: specOf7("head"),
|
|
2346
|
-
filetype: ".mp3",
|
|
2347
|
-
fn: headMp3Command
|
|
2348
|
-
});
|
|
2349
|
-
|
|
2350
|
-
// src/commands/local_audio/disk/head_ogg.ts
|
|
2351
|
-
import {
|
|
2352
|
-
IOResult as IOResult8,
|
|
2353
|
-
ResourceName as ResourceName12,
|
|
2354
|
-
command as command8,
|
|
2355
|
-
materialize as materialize8,
|
|
2356
|
-
specOf as specOf8
|
|
2357
|
-
} from "@struktoai/mirage-core";
|
|
2358
|
-
var ENC9 = new TextEncoder();
|
|
2359
|
-
async function headOggCommand(accessor, paths, _texts, opts) {
|
|
2360
|
-
if (paths.length === 0) {
|
|
2361
|
-
return [null, new IOResult8({ exitCode: 1, stderr: ENC9.encode("head: missing operand\n") })];
|
|
2362
|
-
}
|
|
2363
|
-
const first = paths[0];
|
|
2364
|
-
if (first === void 0) return [null, new IOResult8()];
|
|
2365
|
-
if (typeof opts.flags.c === "string") {
|
|
2366
|
-
return [
|
|
2367
|
-
null,
|
|
2368
|
-
new IOResult8({ exitCode: 1, stderr: ENC9.encode("head: -c not supported for audio files\n") })
|
|
2369
|
-
];
|
|
2370
|
-
}
|
|
2371
|
-
const n = typeof opts.flags.n === "string" ? Number.parseInt(opts.flags.n, 10) : 10;
|
|
2372
|
-
try {
|
|
2373
|
-
const raw = await materialize8(stream(accessor, first));
|
|
2374
|
-
const out = transcribe(raw, void 0, n);
|
|
2375
|
-
return [out, new IOResult8({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
2376
|
-
} catch (err) {
|
|
2377
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2378
|
-
return [
|
|
2379
|
-
null,
|
|
2380
|
-
new IOResult8({
|
|
2381
|
-
exitCode: 1,
|
|
2382
|
-
stderr: ENC9.encode(`head: ${first.original}: failed to read as ogg: ${msg}
|
|
2383
|
-
`)
|
|
2384
|
-
})
|
|
2385
|
-
];
|
|
2386
|
-
}
|
|
2387
|
-
}
|
|
2388
|
-
var DISK_LOCAL_AUDIO_HEAD_OGG = command8({
|
|
2389
|
-
name: "head",
|
|
2390
|
-
resource: ResourceName12.DISK,
|
|
2391
|
-
spec: specOf8("head"),
|
|
2392
|
-
filetype: ".ogg",
|
|
2393
|
-
fn: headOggCommand
|
|
2394
|
-
});
|
|
2395
|
-
|
|
2396
|
-
// src/commands/local_audio/disk/head_wav.ts
|
|
2397
|
-
import {
|
|
2398
|
-
IOResult as IOResult9,
|
|
2399
|
-
ResourceName as ResourceName13,
|
|
2400
|
-
command as command9,
|
|
2401
|
-
materialize as materialize9,
|
|
2402
|
-
specOf as specOf9
|
|
2403
|
-
} from "@struktoai/mirage-core";
|
|
2404
|
-
var ENC10 = new TextEncoder();
|
|
2405
|
-
async function headWavCommand(accessor, paths, _texts, opts) {
|
|
2406
|
-
if (paths.length === 0) {
|
|
2407
|
-
return [null, new IOResult9({ exitCode: 1, stderr: ENC10.encode("head: missing operand\n") })];
|
|
2408
|
-
}
|
|
2409
|
-
const first = paths[0];
|
|
2410
|
-
if (first === void 0) return [null, new IOResult9()];
|
|
2411
|
-
if (typeof opts.flags.c === "string") {
|
|
2412
|
-
return [
|
|
2413
|
-
null,
|
|
2414
|
-
new IOResult9({ exitCode: 1, stderr: ENC10.encode("head: -c not supported for audio files\n") })
|
|
2415
|
-
];
|
|
2416
|
-
}
|
|
2417
|
-
const n = typeof opts.flags.n === "string" ? Number.parseInt(opts.flags.n, 10) : 10;
|
|
2418
|
-
try {
|
|
2419
|
-
const raw = await materialize9(stream(accessor, first));
|
|
2420
|
-
const out = transcribe(raw, void 0, n);
|
|
2421
|
-
return [out, new IOResult9({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
2422
|
-
} catch (err) {
|
|
2423
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2424
|
-
return [
|
|
2425
|
-
null,
|
|
2426
|
-
new IOResult9({
|
|
2427
|
-
exitCode: 1,
|
|
2428
|
-
stderr: ENC10.encode(`head: ${first.original}: failed to read as wav: ${msg}
|
|
2429
|
-
`)
|
|
2430
|
-
})
|
|
2431
|
-
];
|
|
2432
|
-
}
|
|
2433
|
-
}
|
|
2434
|
-
var DISK_LOCAL_AUDIO_HEAD_WAV = command9({
|
|
2435
|
-
name: "head",
|
|
2436
|
-
resource: ResourceName13.DISK,
|
|
2437
|
-
spec: specOf9("head"),
|
|
2438
|
-
filetype: ".wav",
|
|
2439
|
-
fn: headWavCommand
|
|
2440
|
-
});
|
|
2441
|
-
|
|
2442
|
-
// src/commands/local_audio/disk/stat_mp3.ts
|
|
2443
|
-
import {
|
|
2444
|
-
IOResult as IOResult10,
|
|
2445
|
-
ResourceName as ResourceName14,
|
|
2446
|
-
command as command10,
|
|
2447
|
-
materialize as materialize10,
|
|
2448
|
-
specOf as specOf10
|
|
2449
|
-
} from "@struktoai/mirage-core";
|
|
2450
|
-
var ENC11 = new TextEncoder();
|
|
2451
|
-
async function statMp3Command(accessor, paths, _texts, _opts) {
|
|
2452
|
-
if (paths.length === 0) {
|
|
2453
|
-
return [null, new IOResult10({ exitCode: 1, stderr: ENC11.encode("stat: missing operand\n") })];
|
|
2454
|
-
}
|
|
2455
|
-
const first = paths[0];
|
|
2456
|
-
if (first === void 0) return [null, new IOResult10()];
|
|
2457
|
-
try {
|
|
2458
|
-
const raw = await materialize10(stream(accessor, first));
|
|
2459
|
-
const meta = await metadata(raw);
|
|
2460
|
-
const fs2 = await stat(accessor, first);
|
|
2461
|
-
const out = ENC11.encode(formatMetadata(meta, first.original, fs2.size ?? null));
|
|
2462
|
-
return [out, new IOResult10({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
2463
|
-
} catch (err) {
|
|
2464
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2465
|
-
return [
|
|
2466
|
-
null,
|
|
2467
|
-
new IOResult10({
|
|
2468
|
-
exitCode: 1,
|
|
2469
|
-
stderr: ENC11.encode(`stat: ${first.original}: failed to read as mp3: ${msg}
|
|
2470
|
-
`)
|
|
2471
|
-
})
|
|
2472
|
-
];
|
|
2473
|
-
}
|
|
2474
|
-
}
|
|
2475
|
-
var DISK_LOCAL_AUDIO_STAT_MP3 = command10({
|
|
2476
|
-
name: "stat",
|
|
2477
|
-
resource: ResourceName14.DISK,
|
|
2478
|
-
spec: specOf10("stat"),
|
|
2479
|
-
filetype: ".mp3",
|
|
2480
|
-
fn: statMp3Command
|
|
2481
|
-
});
|
|
2482
|
-
|
|
2483
|
-
// src/commands/local_audio/disk/stat_ogg.ts
|
|
2484
|
-
import {
|
|
2485
|
-
IOResult as IOResult11,
|
|
2486
|
-
ResourceName as ResourceName15,
|
|
2487
|
-
command as command11,
|
|
2488
|
-
materialize as materialize11,
|
|
2489
|
-
specOf as specOf11
|
|
2490
|
-
} from "@struktoai/mirage-core";
|
|
2491
|
-
var ENC12 = new TextEncoder();
|
|
2492
|
-
async function statOggCommand(accessor, paths, _texts, _opts) {
|
|
2493
|
-
if (paths.length === 0) {
|
|
2494
|
-
return [null, new IOResult11({ exitCode: 1, stderr: ENC12.encode("stat: missing operand\n") })];
|
|
2495
|
-
}
|
|
2496
|
-
const first = paths[0];
|
|
2497
|
-
if (first === void 0) return [null, new IOResult11()];
|
|
2498
|
-
try {
|
|
2499
|
-
const raw = await materialize11(stream(accessor, first));
|
|
2500
|
-
const meta = await metadata(raw);
|
|
2501
|
-
const fs2 = await stat(accessor, first);
|
|
2502
|
-
const out = ENC12.encode(formatMetadata(meta, first.original, fs2.size ?? null));
|
|
2503
|
-
return [out, new IOResult11({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
2504
|
-
} catch (err) {
|
|
2505
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2506
|
-
return [
|
|
2507
|
-
null,
|
|
2508
|
-
new IOResult11({
|
|
2509
|
-
exitCode: 1,
|
|
2510
|
-
stderr: ENC12.encode(`stat: ${first.original}: failed to read as ogg: ${msg}
|
|
2511
|
-
`)
|
|
2512
|
-
})
|
|
2513
|
-
];
|
|
2514
|
-
}
|
|
2515
|
-
}
|
|
2516
|
-
var DISK_LOCAL_AUDIO_STAT_OGG = command11({
|
|
2517
|
-
name: "stat",
|
|
2518
|
-
resource: ResourceName15.DISK,
|
|
2519
|
-
spec: specOf11("stat"),
|
|
2520
|
-
filetype: ".ogg",
|
|
2521
|
-
fn: statOggCommand
|
|
2522
|
-
});
|
|
2523
|
-
|
|
2524
|
-
// src/commands/local_audio/disk/stat_wav.ts
|
|
2525
|
-
import {
|
|
2526
|
-
IOResult as IOResult12,
|
|
2527
|
-
ResourceName as ResourceName16,
|
|
2528
|
-
command as command12,
|
|
2529
|
-
materialize as materialize12,
|
|
2530
|
-
specOf as specOf12
|
|
2531
|
-
} from "@struktoai/mirage-core";
|
|
2532
|
-
var ENC13 = new TextEncoder();
|
|
2533
|
-
async function statWavCommand(accessor, paths, _texts, _opts) {
|
|
2534
|
-
if (paths.length === 0) {
|
|
2535
|
-
return [null, new IOResult12({ exitCode: 1, stderr: ENC13.encode("stat: missing operand\n") })];
|
|
2536
|
-
}
|
|
2537
|
-
const first = paths[0];
|
|
2538
|
-
if (first === void 0) return [null, new IOResult12()];
|
|
2539
|
-
try {
|
|
2540
|
-
const raw = await materialize12(stream(accessor, first));
|
|
2541
|
-
const meta = await metadata(raw);
|
|
2542
|
-
const fs2 = await stat(accessor, first);
|
|
2543
|
-
const out = ENC13.encode(formatMetadata(meta, first.original, fs2.size ?? null));
|
|
2544
|
-
return [out, new IOResult12({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
2545
|
-
} catch (err) {
|
|
2546
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2547
|
-
return [
|
|
2548
|
-
null,
|
|
2549
|
-
new IOResult12({
|
|
2550
|
-
exitCode: 1,
|
|
2551
|
-
stderr: ENC13.encode(`stat: ${first.original}: failed to read as wav: ${msg}
|
|
2552
|
-
`)
|
|
2553
|
-
})
|
|
2554
|
-
];
|
|
2555
|
-
}
|
|
2556
|
-
}
|
|
2557
|
-
var DISK_LOCAL_AUDIO_STAT_WAV = command12({
|
|
2558
|
-
name: "stat",
|
|
2559
|
-
resource: ResourceName16.DISK,
|
|
2560
|
-
spec: specOf12("stat"),
|
|
2561
|
-
filetype: ".wav",
|
|
2562
|
-
fn: statWavCommand
|
|
2563
|
-
});
|
|
2564
|
-
|
|
2565
|
-
// src/commands/local_audio/disk/tail_mp3.ts
|
|
2566
|
-
import {
|
|
2567
|
-
IOResult as IOResult13,
|
|
2568
|
-
ResourceName as ResourceName17,
|
|
2569
|
-
command as command13,
|
|
2570
|
-
materialize as materialize13,
|
|
2571
|
-
specOf as specOf13
|
|
2572
|
-
} from "@struktoai/mirage-core";
|
|
2573
|
-
var ENC14 = new TextEncoder();
|
|
2574
|
-
async function tailMp3Command(accessor, paths, _texts, opts) {
|
|
2575
|
-
if (paths.length === 0) {
|
|
2576
|
-
return [null, new IOResult13({ exitCode: 1, stderr: ENC14.encode("tail: missing operand\n") })];
|
|
2577
|
-
}
|
|
2578
|
-
const first = paths[0];
|
|
2579
|
-
if (first === void 0) return [null, new IOResult13()];
|
|
2580
|
-
if (typeof opts.flags.c === "string") {
|
|
2581
|
-
return [
|
|
2582
|
-
null,
|
|
2583
|
-
new IOResult13({ exitCode: 1, stderr: ENC14.encode("tail: -c not supported for audio files\n") })
|
|
2584
|
-
];
|
|
2585
|
-
}
|
|
2586
|
-
const n = typeof opts.flags.n === "string" ? Number.parseInt(opts.flags.n, 10) : 10;
|
|
2587
|
-
try {
|
|
2588
|
-
const raw = await materialize13(stream(accessor, first));
|
|
2589
|
-
const meta = await metadata(raw);
|
|
2590
|
-
const duration = meta.duration ?? 0;
|
|
2591
|
-
const start = Math.max(0, duration - n);
|
|
2592
|
-
const out = transcribe(raw, start);
|
|
2593
|
-
return [out, new IOResult13({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
2594
|
-
} catch (err) {
|
|
2595
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2596
|
-
return [
|
|
2597
|
-
null,
|
|
2598
|
-
new IOResult13({
|
|
2599
|
-
exitCode: 1,
|
|
2600
|
-
stderr: ENC14.encode(`tail: ${first.original}: failed to read as mp3: ${msg}
|
|
2601
|
-
`)
|
|
2602
|
-
})
|
|
2603
|
-
];
|
|
2604
|
-
}
|
|
2605
|
-
}
|
|
2606
|
-
var DISK_LOCAL_AUDIO_TAIL_MP3 = command13({
|
|
2607
|
-
name: "tail",
|
|
2608
|
-
resource: ResourceName17.DISK,
|
|
2609
|
-
spec: specOf13("tail"),
|
|
2610
|
-
filetype: ".mp3",
|
|
2611
|
-
fn: tailMp3Command
|
|
2612
|
-
});
|
|
2613
|
-
|
|
2614
|
-
// src/commands/local_audio/disk/tail_ogg.ts
|
|
2615
|
-
import {
|
|
2616
|
-
IOResult as IOResult14,
|
|
2617
|
-
ResourceName as ResourceName18,
|
|
2618
|
-
command as command14,
|
|
2619
|
-
materialize as materialize14,
|
|
2620
|
-
specOf as specOf14
|
|
2621
|
-
} from "@struktoai/mirage-core";
|
|
2622
|
-
var ENC15 = new TextEncoder();
|
|
2623
|
-
async function tailOggCommand(accessor, paths, _texts, opts) {
|
|
2624
|
-
if (paths.length === 0) {
|
|
2625
|
-
return [null, new IOResult14({ exitCode: 1, stderr: ENC15.encode("tail: missing operand\n") })];
|
|
2626
|
-
}
|
|
2627
|
-
const first = paths[0];
|
|
2628
|
-
if (first === void 0) return [null, new IOResult14()];
|
|
2629
|
-
if (typeof opts.flags.c === "string") {
|
|
2630
|
-
return [
|
|
2631
|
-
null,
|
|
2632
|
-
new IOResult14({ exitCode: 1, stderr: ENC15.encode("tail: -c not supported for audio files\n") })
|
|
2633
|
-
];
|
|
2634
|
-
}
|
|
2635
|
-
const n = typeof opts.flags.n === "string" ? Number.parseInt(opts.flags.n, 10) : 10;
|
|
2636
|
-
try {
|
|
2637
|
-
const raw = await materialize14(stream(accessor, first));
|
|
2638
|
-
const meta = await metadata(raw);
|
|
2639
|
-
const duration = meta.duration ?? 0;
|
|
2640
|
-
const start = Math.max(0, duration - n);
|
|
2641
|
-
const out = transcribe(raw, start);
|
|
2642
|
-
return [out, new IOResult14({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
2643
|
-
} catch (err) {
|
|
2644
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2645
|
-
return [
|
|
2646
|
-
null,
|
|
2647
|
-
new IOResult14({
|
|
2648
|
-
exitCode: 1,
|
|
2649
|
-
stderr: ENC15.encode(`tail: ${first.original}: failed to read as ogg: ${msg}
|
|
2650
|
-
`)
|
|
2651
|
-
})
|
|
2652
|
-
];
|
|
2653
|
-
}
|
|
2654
|
-
}
|
|
2655
|
-
var DISK_LOCAL_AUDIO_TAIL_OGG = command14({
|
|
2656
|
-
name: "tail",
|
|
2657
|
-
resource: ResourceName18.DISK,
|
|
2658
|
-
spec: specOf14("tail"),
|
|
2659
|
-
filetype: ".ogg",
|
|
2660
|
-
fn: tailOggCommand
|
|
2661
|
-
});
|
|
2662
|
-
|
|
2663
|
-
// src/commands/local_audio/disk/tail_wav.ts
|
|
2664
|
-
import {
|
|
2665
|
-
IOResult as IOResult15,
|
|
2666
|
-
ResourceName as ResourceName19,
|
|
2667
|
-
command as command15,
|
|
2668
|
-
materialize as materialize15,
|
|
2669
|
-
specOf as specOf15
|
|
2670
|
-
} from "@struktoai/mirage-core";
|
|
2671
|
-
var ENC16 = new TextEncoder();
|
|
2672
|
-
async function tailWavCommand(accessor, paths, _texts, opts) {
|
|
2673
|
-
if (paths.length === 0) {
|
|
2674
|
-
return [null, new IOResult15({ exitCode: 1, stderr: ENC16.encode("tail: missing operand\n") })];
|
|
2675
|
-
}
|
|
2676
|
-
const first = paths[0];
|
|
2677
|
-
if (first === void 0) return [null, new IOResult15()];
|
|
2678
|
-
if (typeof opts.flags.c === "string") {
|
|
2679
|
-
return [
|
|
2680
|
-
null,
|
|
2681
|
-
new IOResult15({ exitCode: 1, stderr: ENC16.encode("tail: -c not supported for audio files\n") })
|
|
2682
|
-
];
|
|
2683
|
-
}
|
|
2684
|
-
const n = typeof opts.flags.n === "string" ? Number.parseInt(opts.flags.n, 10) : 10;
|
|
2685
|
-
try {
|
|
2686
|
-
const raw = await materialize15(stream(accessor, first));
|
|
2687
|
-
const meta = await metadata(raw);
|
|
2688
|
-
const duration = meta.duration ?? 0;
|
|
2689
|
-
const start = Math.max(0, duration - n);
|
|
2690
|
-
const out = transcribe(raw, start);
|
|
2691
|
-
return [out, new IOResult15({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
2692
|
-
} catch (err) {
|
|
2693
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2694
|
-
return [
|
|
2695
|
-
null,
|
|
2696
|
-
new IOResult15({
|
|
2697
|
-
exitCode: 1,
|
|
2698
|
-
stderr: ENC16.encode(`tail: ${first.original}: failed to read as wav: ${msg}
|
|
2699
|
-
`)
|
|
2700
|
-
})
|
|
2701
|
-
];
|
|
2702
|
-
}
|
|
2703
|
-
}
|
|
2704
|
-
var DISK_LOCAL_AUDIO_TAIL_WAV = command15({
|
|
2705
|
-
name: "tail",
|
|
2706
|
-
resource: ResourceName19.DISK,
|
|
2707
|
-
spec: specOf15("tail"),
|
|
2708
|
-
filetype: ".wav",
|
|
2709
|
-
fn: tailWavCommand
|
|
2710
|
-
});
|
|
2711
|
-
|
|
2712
|
-
// src/commands/local_audio/disk/index.ts
|
|
2713
|
-
var DISK_LOCAL_AUDIO_COMMANDS = [
|
|
2714
|
-
...DISK_LOCAL_AUDIO_CAT_WAV,
|
|
2715
|
-
...DISK_LOCAL_AUDIO_CAT_MP3,
|
|
2716
|
-
...DISK_LOCAL_AUDIO_CAT_OGG,
|
|
2717
|
-
...DISK_LOCAL_AUDIO_HEAD_WAV,
|
|
2718
|
-
...DISK_LOCAL_AUDIO_HEAD_MP3,
|
|
2719
|
-
...DISK_LOCAL_AUDIO_HEAD_OGG,
|
|
2720
|
-
...DISK_LOCAL_AUDIO_TAIL_WAV,
|
|
2721
|
-
...DISK_LOCAL_AUDIO_TAIL_MP3,
|
|
2722
|
-
...DISK_LOCAL_AUDIO_TAIL_OGG,
|
|
2723
|
-
...DISK_LOCAL_AUDIO_GREP_WAV,
|
|
2724
|
-
...DISK_LOCAL_AUDIO_GREP_MP3,
|
|
2725
|
-
...DISK_LOCAL_AUDIO_GREP_OGG,
|
|
2726
|
-
...DISK_LOCAL_AUDIO_STAT_WAV,
|
|
2727
|
-
...DISK_LOCAL_AUDIO_STAT_MP3,
|
|
2728
|
-
...DISK_LOCAL_AUDIO_STAT_OGG
|
|
2729
|
-
];
|
|
2730
|
-
|
|
2731
|
-
// src/commands/local_audio/ram/cat_mp3.ts
|
|
2732
|
-
import {
|
|
2733
|
-
IOResult as IOResult16,
|
|
2734
|
-
ResourceName as ResourceName20,
|
|
2735
|
-
command as command16,
|
|
2736
|
-
specOf as specOf16
|
|
2737
|
-
} from "@struktoai/mirage-core";
|
|
2738
|
-
|
|
2739
|
-
// src/commands/local_audio/ram/read.ts
|
|
2740
|
-
function norm(p) {
|
|
2741
|
-
return `/${p.replace(/^\/+|\/+$/g, "")}`;
|
|
2742
|
-
}
|
|
2743
|
-
function readRam(accessor, path) {
|
|
2744
|
-
const p = norm(path.stripPrefix);
|
|
2745
|
-
const data = accessor.store.files.get(p);
|
|
2746
|
-
if (data === void 0) throw new Error(`file not found: ${p}`);
|
|
2747
|
-
return data;
|
|
2748
|
-
}
|
|
2749
|
-
|
|
2750
|
-
// src/commands/local_audio/ram/cat_mp3.ts
|
|
2751
|
-
var ENC17 = new TextEncoder();
|
|
2752
|
-
function catMp3Command2(accessor, paths, _texts, _opts) {
|
|
2753
|
-
if (paths.length === 0) {
|
|
2754
|
-
return [null, new IOResult16({ exitCode: 1, stderr: ENC17.encode("cat: missing operand\n") })];
|
|
2755
|
-
}
|
|
2756
|
-
const first = paths[0];
|
|
2757
|
-
if (first === void 0) return [null, new IOResult16()];
|
|
2758
|
-
try {
|
|
2759
|
-
const raw = readRam(accessor, first);
|
|
2760
|
-
const out = transcribe(raw);
|
|
2761
|
-
return [out, new IOResult16({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
2762
|
-
} catch (err) {
|
|
2763
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2764
|
-
return [
|
|
2765
|
-
null,
|
|
2766
|
-
new IOResult16({
|
|
2767
|
-
exitCode: 1,
|
|
2768
|
-
stderr: ENC17.encode(`cat: ${first.original}: failed to read as mp3: ${msg}
|
|
2769
|
-
`)
|
|
2770
|
-
})
|
|
2771
|
-
];
|
|
2772
|
-
}
|
|
2773
|
-
}
|
|
2774
|
-
var RAM_LOCAL_AUDIO_CAT_MP3 = command16({
|
|
2775
|
-
name: "cat",
|
|
2776
|
-
resource: ResourceName20.RAM,
|
|
2777
|
-
spec: specOf16("cat"),
|
|
2778
|
-
filetype: ".mp3",
|
|
2779
|
-
fn: catMp3Command2
|
|
2780
|
-
});
|
|
2781
|
-
|
|
2782
|
-
// src/commands/local_audio/ram/cat_ogg.ts
|
|
2783
|
-
import {
|
|
2784
|
-
IOResult as IOResult17,
|
|
2785
|
-
ResourceName as ResourceName21,
|
|
2786
|
-
command as command17,
|
|
2787
|
-
specOf as specOf17
|
|
2788
|
-
} from "@struktoai/mirage-core";
|
|
2789
|
-
var ENC18 = new TextEncoder();
|
|
2790
|
-
function catOggCommand2(accessor, paths, _texts, _opts) {
|
|
2791
|
-
if (paths.length === 0) {
|
|
2792
|
-
return [null, new IOResult17({ exitCode: 1, stderr: ENC18.encode("cat: missing operand\n") })];
|
|
2793
|
-
}
|
|
2794
|
-
const first = paths[0];
|
|
2795
|
-
if (first === void 0) return [null, new IOResult17()];
|
|
2796
|
-
try {
|
|
2797
|
-
const raw = readRam(accessor, first);
|
|
2798
|
-
const out = transcribe(raw);
|
|
2799
|
-
return [out, new IOResult17({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
2800
|
-
} catch (err) {
|
|
2801
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2802
|
-
return [
|
|
2803
|
-
null,
|
|
2804
|
-
new IOResult17({
|
|
2805
|
-
exitCode: 1,
|
|
2806
|
-
stderr: ENC18.encode(`cat: ${first.original}: failed to read as ogg: ${msg}
|
|
2807
|
-
`)
|
|
2808
|
-
})
|
|
2809
|
-
];
|
|
2810
|
-
}
|
|
2811
|
-
}
|
|
2812
|
-
var RAM_LOCAL_AUDIO_CAT_OGG = command17({
|
|
2813
|
-
name: "cat",
|
|
2814
|
-
resource: ResourceName21.RAM,
|
|
2815
|
-
spec: specOf17("cat"),
|
|
2816
|
-
filetype: ".ogg",
|
|
2817
|
-
fn: catOggCommand2
|
|
2818
|
-
});
|
|
2819
|
-
|
|
2820
|
-
// src/commands/local_audio/ram/cat_wav.ts
|
|
2821
|
-
import {
|
|
2822
|
-
IOResult as IOResult18,
|
|
2823
|
-
ResourceName as ResourceName22,
|
|
2824
|
-
command as command18,
|
|
2825
|
-
specOf as specOf18
|
|
2826
|
-
} from "@struktoai/mirage-core";
|
|
2827
|
-
var ENC19 = new TextEncoder();
|
|
2828
|
-
function catWavCommand2(accessor, paths, _texts, _opts) {
|
|
2829
|
-
if (paths.length === 0) {
|
|
2830
|
-
return [null, new IOResult18({ exitCode: 1, stderr: ENC19.encode("cat: missing operand\n") })];
|
|
2831
|
-
}
|
|
2832
|
-
const first = paths[0];
|
|
2833
|
-
if (first === void 0) return [null, new IOResult18()];
|
|
2834
|
-
try {
|
|
2835
|
-
const raw = readRam(accessor, first);
|
|
2836
|
-
const out = transcribe(raw);
|
|
2837
|
-
return [out, new IOResult18({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
2838
|
-
} catch (err) {
|
|
2839
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2840
|
-
return [
|
|
2841
|
-
null,
|
|
2842
|
-
new IOResult18({
|
|
2843
|
-
exitCode: 1,
|
|
2844
|
-
stderr: ENC19.encode(`cat: ${first.original}: failed to read as wav: ${msg}
|
|
2845
|
-
`)
|
|
2846
|
-
})
|
|
2847
|
-
];
|
|
2848
|
-
}
|
|
2849
|
-
}
|
|
2850
|
-
var RAM_LOCAL_AUDIO_CAT_WAV = command18({
|
|
2851
|
-
name: "cat",
|
|
2852
|
-
resource: ResourceName22.RAM,
|
|
2853
|
-
spec: specOf18("cat"),
|
|
2854
|
-
filetype: ".wav",
|
|
2855
|
-
fn: catWavCommand2
|
|
2856
|
-
});
|
|
2857
|
-
|
|
2858
|
-
// src/commands/local_audio/ram/grep_mp3.ts
|
|
2859
|
-
import {
|
|
2860
|
-
IOResult as IOResult19,
|
|
2861
|
-
ResourceName as ResourceName23,
|
|
2862
|
-
command as command19,
|
|
2863
|
-
materialize as materialize16,
|
|
2864
|
-
specOf as specOf19
|
|
2865
|
-
} from "@struktoai/mirage-core";
|
|
2866
|
-
var ENC20 = new TextEncoder();
|
|
2867
|
-
var DEC5 = new TextDecoder();
|
|
2868
|
-
async function grepMp3Command2(accessor, paths, texts, opts) {
|
|
2869
|
-
if (paths.length === 0 || texts.length === 0) {
|
|
2870
|
-
return [null, new IOResult19({ exitCode: 1, stderr: ENC20.encode("grep: missing operand\n") })];
|
|
2871
|
-
}
|
|
2872
|
-
const first = paths[0];
|
|
2873
|
-
if (first === void 0) return [null, new IOResult19()];
|
|
2874
|
-
const pattern = texts[0] ?? "";
|
|
2875
|
-
const ignoreCase = opts.flags.i === true;
|
|
2876
|
-
try {
|
|
2877
|
-
const raw = readRam(accessor, first);
|
|
2878
|
-
const text = DEC5.decode(await materialize16(transcribe(raw)));
|
|
2879
|
-
const flags = ignoreCase ? "i" : "";
|
|
2880
|
-
const re = new RegExp(pattern, flags);
|
|
2881
|
-
if (re.test(text)) {
|
|
2882
|
-
const out = ENC20.encode(text);
|
|
2883
|
-
return [out, new IOResult19({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
2884
|
-
}
|
|
2885
|
-
return [
|
|
2886
|
-
null,
|
|
2887
|
-
new IOResult19({
|
|
2888
|
-
exitCode: 1,
|
|
2889
|
-
reads: { [first.original]: raw },
|
|
2890
|
-
cache: [first.original]
|
|
2891
|
-
})
|
|
2892
|
-
];
|
|
2893
|
-
} catch (err) {
|
|
2894
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2895
|
-
return [
|
|
2896
|
-
null,
|
|
2897
|
-
new IOResult19({
|
|
2898
|
-
exitCode: 1,
|
|
2899
|
-
stderr: ENC20.encode(`grep: ${first.original}: failed to read as mp3: ${msg}
|
|
2900
|
-
`)
|
|
2901
|
-
})
|
|
2902
|
-
];
|
|
2903
|
-
}
|
|
2904
|
-
}
|
|
2905
|
-
var RAM_LOCAL_AUDIO_GREP_MP3 = command19({
|
|
2906
|
-
name: "grep",
|
|
2907
|
-
resource: ResourceName23.RAM,
|
|
2908
|
-
spec: specOf19("grep"),
|
|
2909
|
-
filetype: ".mp3",
|
|
2910
|
-
fn: grepMp3Command2
|
|
2911
|
-
});
|
|
2912
|
-
|
|
2913
|
-
// src/commands/local_audio/ram/grep_ogg.ts
|
|
2914
|
-
import {
|
|
2915
|
-
IOResult as IOResult20,
|
|
2916
|
-
ResourceName as ResourceName24,
|
|
2917
|
-
command as command20,
|
|
2918
|
-
materialize as materialize17,
|
|
2919
|
-
specOf as specOf20
|
|
2920
|
-
} from "@struktoai/mirage-core";
|
|
2921
|
-
var ENC21 = new TextEncoder();
|
|
2922
|
-
var DEC6 = new TextDecoder();
|
|
2923
|
-
async function grepOggCommand2(accessor, paths, texts, opts) {
|
|
2924
|
-
if (paths.length === 0 || texts.length === 0) {
|
|
2925
|
-
return [null, new IOResult20({ exitCode: 1, stderr: ENC21.encode("grep: missing operand\n") })];
|
|
2926
|
-
}
|
|
2927
|
-
const first = paths[0];
|
|
2928
|
-
if (first === void 0) return [null, new IOResult20()];
|
|
2929
|
-
const pattern = texts[0] ?? "";
|
|
2930
|
-
const ignoreCase = opts.flags.i === true;
|
|
2931
|
-
try {
|
|
2932
|
-
const raw = readRam(accessor, first);
|
|
2933
|
-
const text = DEC6.decode(await materialize17(transcribe(raw)));
|
|
2934
|
-
const flags = ignoreCase ? "i" : "";
|
|
2935
|
-
const re = new RegExp(pattern, flags);
|
|
2936
|
-
if (re.test(text)) {
|
|
2937
|
-
const out = ENC21.encode(text);
|
|
2938
|
-
return [out, new IOResult20({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
2939
|
-
}
|
|
2940
|
-
return [
|
|
2941
|
-
null,
|
|
2942
|
-
new IOResult20({
|
|
2943
|
-
exitCode: 1,
|
|
2944
|
-
reads: { [first.original]: raw },
|
|
2945
|
-
cache: [first.original]
|
|
2946
|
-
})
|
|
2947
|
-
];
|
|
2948
|
-
} catch (err) {
|
|
2949
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2950
|
-
return [
|
|
2951
|
-
null,
|
|
2952
|
-
new IOResult20({
|
|
2953
|
-
exitCode: 1,
|
|
2954
|
-
stderr: ENC21.encode(`grep: ${first.original}: failed to read as ogg: ${msg}
|
|
2955
|
-
`)
|
|
2956
|
-
})
|
|
2957
|
-
];
|
|
2958
|
-
}
|
|
2959
|
-
}
|
|
2960
|
-
var RAM_LOCAL_AUDIO_GREP_OGG = command20({
|
|
2961
|
-
name: "grep",
|
|
2962
|
-
resource: ResourceName24.RAM,
|
|
2963
|
-
spec: specOf20("grep"),
|
|
2964
|
-
filetype: ".ogg",
|
|
2965
|
-
fn: grepOggCommand2
|
|
2966
|
-
});
|
|
2967
|
-
|
|
2968
|
-
// src/commands/local_audio/ram/grep_wav.ts
|
|
2969
|
-
import {
|
|
2970
|
-
IOResult as IOResult21,
|
|
2971
|
-
ResourceName as ResourceName25,
|
|
2972
|
-
command as command21,
|
|
2973
|
-
materialize as materialize18,
|
|
2974
|
-
specOf as specOf21
|
|
2975
|
-
} from "@struktoai/mirage-core";
|
|
2976
|
-
var ENC22 = new TextEncoder();
|
|
2977
|
-
var DEC7 = new TextDecoder();
|
|
2978
|
-
async function grepWavCommand2(accessor, paths, texts, opts) {
|
|
2979
|
-
if (paths.length === 0 || texts.length === 0) {
|
|
2980
|
-
return [null, new IOResult21({ exitCode: 1, stderr: ENC22.encode("grep: missing operand\n") })];
|
|
2981
|
-
}
|
|
2982
|
-
const first = paths[0];
|
|
2983
|
-
if (first === void 0) return [null, new IOResult21()];
|
|
2984
|
-
const pattern = texts[0] ?? "";
|
|
2985
|
-
const ignoreCase = opts.flags.i === true;
|
|
2986
|
-
try {
|
|
2987
|
-
const raw = readRam(accessor, first);
|
|
2988
|
-
const text = DEC7.decode(await materialize18(transcribe(raw)));
|
|
2989
|
-
const flags = ignoreCase ? "i" : "";
|
|
2990
|
-
const re = new RegExp(pattern, flags);
|
|
2991
|
-
if (re.test(text)) {
|
|
2992
|
-
const out = ENC22.encode(text);
|
|
2993
|
-
return [out, new IOResult21({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
2994
|
-
}
|
|
2995
|
-
return [
|
|
2996
|
-
null,
|
|
2997
|
-
new IOResult21({
|
|
2998
|
-
exitCode: 1,
|
|
2999
|
-
reads: { [first.original]: raw },
|
|
3000
|
-
cache: [first.original]
|
|
3001
|
-
})
|
|
3002
|
-
];
|
|
3003
|
-
} catch (err) {
|
|
3004
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
3005
|
-
return [
|
|
3006
|
-
null,
|
|
3007
|
-
new IOResult21({
|
|
3008
|
-
exitCode: 1,
|
|
3009
|
-
stderr: ENC22.encode(`grep: ${first.original}: failed to read as wav: ${msg}
|
|
3010
|
-
`)
|
|
3011
|
-
})
|
|
3012
|
-
];
|
|
3013
|
-
}
|
|
3014
|
-
}
|
|
3015
|
-
var RAM_LOCAL_AUDIO_GREP_WAV = command21({
|
|
3016
|
-
name: "grep",
|
|
3017
|
-
resource: ResourceName25.RAM,
|
|
3018
|
-
spec: specOf21("grep"),
|
|
3019
|
-
filetype: ".wav",
|
|
3020
|
-
fn: grepWavCommand2
|
|
3021
|
-
});
|
|
3022
|
-
|
|
3023
|
-
// src/commands/local_audio/ram/head_mp3.ts
|
|
3024
|
-
import {
|
|
3025
|
-
IOResult as IOResult22,
|
|
3026
|
-
ResourceName as ResourceName26,
|
|
3027
|
-
command as command22,
|
|
3028
|
-
specOf as specOf22
|
|
3029
|
-
} from "@struktoai/mirage-core";
|
|
3030
|
-
var ENC23 = new TextEncoder();
|
|
3031
|
-
function headMp3Command2(accessor, paths, _texts, opts) {
|
|
3032
|
-
if (paths.length === 0) {
|
|
3033
|
-
return [null, new IOResult22({ exitCode: 1, stderr: ENC23.encode("head: missing operand\n") })];
|
|
3034
|
-
}
|
|
3035
|
-
const first = paths[0];
|
|
3036
|
-
if (first === void 0) return [null, new IOResult22()];
|
|
3037
|
-
if (typeof opts.flags.c === "string") {
|
|
3038
|
-
return [
|
|
3039
|
-
null,
|
|
3040
|
-
new IOResult22({ exitCode: 1, stderr: ENC23.encode("head: -c not supported for audio files\n") })
|
|
3041
|
-
];
|
|
3042
|
-
}
|
|
3043
|
-
const n = typeof opts.flags.n === "string" ? Number.parseInt(opts.flags.n, 10) : 10;
|
|
3044
|
-
try {
|
|
3045
|
-
const raw = readRam(accessor, first);
|
|
3046
|
-
const out = transcribe(raw, void 0, n);
|
|
3047
|
-
return [out, new IOResult22({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
3048
|
-
} catch (err) {
|
|
3049
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
3050
|
-
return [
|
|
3051
|
-
null,
|
|
3052
|
-
new IOResult22({
|
|
3053
|
-
exitCode: 1,
|
|
3054
|
-
stderr: ENC23.encode(`head: ${first.original}: failed to read as mp3: ${msg}
|
|
3055
|
-
`)
|
|
3056
|
-
})
|
|
3057
|
-
];
|
|
3058
|
-
}
|
|
3059
|
-
}
|
|
3060
|
-
var RAM_LOCAL_AUDIO_HEAD_MP3 = command22({
|
|
3061
|
-
name: "head",
|
|
3062
|
-
resource: ResourceName26.RAM,
|
|
3063
|
-
spec: specOf22("head"),
|
|
3064
|
-
filetype: ".mp3",
|
|
3065
|
-
fn: headMp3Command2
|
|
3066
|
-
});
|
|
3067
|
-
|
|
3068
|
-
// src/commands/local_audio/ram/head_ogg.ts
|
|
3069
|
-
import {
|
|
3070
|
-
IOResult as IOResult23,
|
|
3071
|
-
ResourceName as ResourceName27,
|
|
3072
|
-
command as command23,
|
|
3073
|
-
specOf as specOf23
|
|
3074
|
-
} from "@struktoai/mirage-core";
|
|
3075
|
-
var ENC24 = new TextEncoder();
|
|
3076
|
-
function headOggCommand2(accessor, paths, _texts, opts) {
|
|
3077
|
-
if (paths.length === 0) {
|
|
3078
|
-
return [null, new IOResult23({ exitCode: 1, stderr: ENC24.encode("head: missing operand\n") })];
|
|
3079
|
-
}
|
|
3080
|
-
const first = paths[0];
|
|
3081
|
-
if (first === void 0) return [null, new IOResult23()];
|
|
3082
|
-
if (typeof opts.flags.c === "string") {
|
|
3083
|
-
return [
|
|
3084
|
-
null,
|
|
3085
|
-
new IOResult23({ exitCode: 1, stderr: ENC24.encode("head: -c not supported for audio files\n") })
|
|
3086
|
-
];
|
|
3087
|
-
}
|
|
3088
|
-
const n = typeof opts.flags.n === "string" ? Number.parseInt(opts.flags.n, 10) : 10;
|
|
3089
|
-
try {
|
|
3090
|
-
const raw = readRam(accessor, first);
|
|
3091
|
-
const out = transcribe(raw, void 0, n);
|
|
3092
|
-
return [out, new IOResult23({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
3093
|
-
} catch (err) {
|
|
3094
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
3095
|
-
return [
|
|
3096
|
-
null,
|
|
3097
|
-
new IOResult23({
|
|
3098
|
-
exitCode: 1,
|
|
3099
|
-
stderr: ENC24.encode(`head: ${first.original}: failed to read as ogg: ${msg}
|
|
3100
|
-
`)
|
|
3101
|
-
})
|
|
3102
|
-
];
|
|
3103
|
-
}
|
|
3104
|
-
}
|
|
3105
|
-
var RAM_LOCAL_AUDIO_HEAD_OGG = command23({
|
|
3106
|
-
name: "head",
|
|
3107
|
-
resource: ResourceName27.RAM,
|
|
3108
|
-
spec: specOf23("head"),
|
|
3109
|
-
filetype: ".ogg",
|
|
3110
|
-
fn: headOggCommand2
|
|
3111
|
-
});
|
|
3112
|
-
|
|
3113
|
-
// src/commands/local_audio/ram/head_wav.ts
|
|
3114
|
-
import {
|
|
3115
|
-
IOResult as IOResult24,
|
|
3116
|
-
ResourceName as ResourceName28,
|
|
3117
|
-
command as command24,
|
|
3118
|
-
specOf as specOf24
|
|
3119
|
-
} from "@struktoai/mirage-core";
|
|
3120
|
-
var ENC25 = new TextEncoder();
|
|
3121
|
-
function headWavCommand2(accessor, paths, _texts, opts) {
|
|
3122
|
-
if (paths.length === 0) {
|
|
3123
|
-
return [null, new IOResult24({ exitCode: 1, stderr: ENC25.encode("head: missing operand\n") })];
|
|
3124
|
-
}
|
|
3125
|
-
const first = paths[0];
|
|
3126
|
-
if (first === void 0) return [null, new IOResult24()];
|
|
3127
|
-
if (typeof opts.flags.c === "string") {
|
|
3128
|
-
return [
|
|
3129
|
-
null,
|
|
3130
|
-
new IOResult24({ exitCode: 1, stderr: ENC25.encode("head: -c not supported for audio files\n") })
|
|
3131
|
-
];
|
|
3132
|
-
}
|
|
3133
|
-
const n = typeof opts.flags.n === "string" ? Number.parseInt(opts.flags.n, 10) : 10;
|
|
3134
|
-
try {
|
|
3135
|
-
const raw = readRam(accessor, first);
|
|
3136
|
-
const out = transcribe(raw, void 0, n);
|
|
3137
|
-
return [out, new IOResult24({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
3138
|
-
} catch (err) {
|
|
3139
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
3140
|
-
return [
|
|
3141
|
-
null,
|
|
3142
|
-
new IOResult24({
|
|
3143
|
-
exitCode: 1,
|
|
3144
|
-
stderr: ENC25.encode(`head: ${first.original}: failed to read as wav: ${msg}
|
|
3145
|
-
`)
|
|
3146
|
-
})
|
|
3147
|
-
];
|
|
3148
|
-
}
|
|
3149
|
-
}
|
|
3150
|
-
var RAM_LOCAL_AUDIO_HEAD_WAV = command24({
|
|
3151
|
-
name: "head",
|
|
3152
|
-
resource: ResourceName28.RAM,
|
|
3153
|
-
spec: specOf24("head"),
|
|
3154
|
-
filetype: ".wav",
|
|
3155
|
-
fn: headWavCommand2
|
|
3156
|
-
});
|
|
3157
|
-
|
|
3158
|
-
// src/commands/local_audio/ram/stat_mp3.ts
|
|
3159
|
-
import {
|
|
3160
|
-
IOResult as IOResult25,
|
|
3161
|
-
ResourceName as ResourceName29,
|
|
3162
|
-
command as command25,
|
|
3163
|
-
specOf as specOf25
|
|
3164
|
-
} from "@struktoai/mirage-core";
|
|
3165
|
-
var ENC26 = new TextEncoder();
|
|
3166
|
-
async function statMp3Command2(accessor, paths, _texts, _opts) {
|
|
3167
|
-
if (paths.length === 0) {
|
|
3168
|
-
return [null, new IOResult25({ exitCode: 1, stderr: ENC26.encode("stat: missing operand\n") })];
|
|
3169
|
-
}
|
|
3170
|
-
const first = paths[0];
|
|
3171
|
-
if (first === void 0) return [null, new IOResult25()];
|
|
3172
|
-
try {
|
|
3173
|
-
const raw = readRam(accessor, first);
|
|
3174
|
-
const meta = await metadata(raw);
|
|
3175
|
-
const out = ENC26.encode(formatMetadata(meta, first.original, null));
|
|
3176
|
-
return [out, new IOResult25({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
3177
|
-
} catch (err) {
|
|
3178
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
3179
|
-
return [
|
|
3180
|
-
null,
|
|
3181
|
-
new IOResult25({
|
|
3182
|
-
exitCode: 1,
|
|
3183
|
-
stderr: ENC26.encode(`stat: ${first.original}: failed to read as mp3: ${msg}
|
|
3184
|
-
`)
|
|
3185
|
-
})
|
|
3186
|
-
];
|
|
3187
|
-
}
|
|
3188
|
-
}
|
|
3189
|
-
var RAM_LOCAL_AUDIO_STAT_MP3 = command25({
|
|
3190
|
-
name: "stat",
|
|
3191
|
-
resource: ResourceName29.RAM,
|
|
3192
|
-
spec: specOf25("stat"),
|
|
3193
|
-
filetype: ".mp3",
|
|
3194
|
-
fn: statMp3Command2
|
|
3195
|
-
});
|
|
3196
|
-
|
|
3197
|
-
// src/commands/local_audio/ram/stat_ogg.ts
|
|
3198
|
-
import {
|
|
3199
|
-
IOResult as IOResult26,
|
|
3200
|
-
ResourceName as ResourceName30,
|
|
3201
|
-
command as command26,
|
|
3202
|
-
specOf as specOf26
|
|
3203
|
-
} from "@struktoai/mirage-core";
|
|
3204
|
-
var ENC27 = new TextEncoder();
|
|
3205
|
-
async function statOggCommand2(accessor, paths, _texts, _opts) {
|
|
3206
|
-
if (paths.length === 0) {
|
|
3207
|
-
return [null, new IOResult26({ exitCode: 1, stderr: ENC27.encode("stat: missing operand\n") })];
|
|
3208
|
-
}
|
|
3209
|
-
const first = paths[0];
|
|
3210
|
-
if (first === void 0) return [null, new IOResult26()];
|
|
3211
|
-
try {
|
|
3212
|
-
const raw = readRam(accessor, first);
|
|
3213
|
-
const meta = await metadata(raw);
|
|
3214
|
-
const out = ENC27.encode(formatMetadata(meta, first.original, null));
|
|
3215
|
-
return [out, new IOResult26({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
3216
|
-
} catch (err) {
|
|
3217
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
3218
|
-
return [
|
|
3219
|
-
null,
|
|
3220
|
-
new IOResult26({
|
|
3221
|
-
exitCode: 1,
|
|
3222
|
-
stderr: ENC27.encode(`stat: ${first.original}: failed to read as ogg: ${msg}
|
|
3223
|
-
`)
|
|
3224
|
-
})
|
|
3225
|
-
];
|
|
3226
|
-
}
|
|
3227
|
-
}
|
|
3228
|
-
var RAM_LOCAL_AUDIO_STAT_OGG = command26({
|
|
3229
|
-
name: "stat",
|
|
3230
|
-
resource: ResourceName30.RAM,
|
|
3231
|
-
spec: specOf26("stat"),
|
|
3232
|
-
filetype: ".ogg",
|
|
3233
|
-
fn: statOggCommand2
|
|
3234
|
-
});
|
|
3235
|
-
|
|
3236
|
-
// src/commands/local_audio/ram/stat_wav.ts
|
|
3237
|
-
import {
|
|
3238
|
-
IOResult as IOResult27,
|
|
3239
|
-
ResourceName as ResourceName31,
|
|
3240
|
-
command as command27,
|
|
3241
|
-
specOf as specOf27
|
|
3242
|
-
} from "@struktoai/mirage-core";
|
|
3243
|
-
var ENC28 = new TextEncoder();
|
|
3244
|
-
async function statWavCommand2(accessor, paths, _texts, _opts) {
|
|
3245
|
-
if (paths.length === 0) {
|
|
3246
|
-
return [null, new IOResult27({ exitCode: 1, stderr: ENC28.encode("stat: missing operand\n") })];
|
|
3247
|
-
}
|
|
3248
|
-
const first = paths[0];
|
|
3249
|
-
if (first === void 0) return [null, new IOResult27()];
|
|
3250
|
-
try {
|
|
3251
|
-
const raw = readRam(accessor, first);
|
|
3252
|
-
const meta = await metadata(raw);
|
|
3253
|
-
const out = ENC28.encode(formatMetadata(meta, first.original, null));
|
|
3254
|
-
return [out, new IOResult27({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
3255
|
-
} catch (err) {
|
|
3256
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
3257
|
-
return [
|
|
3258
|
-
null,
|
|
3259
|
-
new IOResult27({
|
|
3260
|
-
exitCode: 1,
|
|
3261
|
-
stderr: ENC28.encode(`stat: ${first.original}: failed to read as wav: ${msg}
|
|
3262
|
-
`)
|
|
3263
|
-
})
|
|
3264
|
-
];
|
|
3265
|
-
}
|
|
3266
|
-
}
|
|
3267
|
-
var RAM_LOCAL_AUDIO_STAT_WAV = command27({
|
|
3268
|
-
name: "stat",
|
|
3269
|
-
resource: ResourceName31.RAM,
|
|
3270
|
-
spec: specOf27("stat"),
|
|
3271
|
-
filetype: ".wav",
|
|
3272
|
-
fn: statWavCommand2
|
|
3273
|
-
});
|
|
3274
|
-
|
|
3275
|
-
// src/commands/local_audio/ram/tail_mp3.ts
|
|
3276
|
-
import {
|
|
3277
|
-
IOResult as IOResult28,
|
|
3278
|
-
ResourceName as ResourceName32,
|
|
3279
|
-
command as command28,
|
|
3280
|
-
specOf as specOf28
|
|
3281
|
-
} from "@struktoai/mirage-core";
|
|
3282
|
-
var ENC29 = new TextEncoder();
|
|
3283
|
-
async function tailMp3Command2(accessor, paths, _texts, opts) {
|
|
3284
|
-
if (paths.length === 0) {
|
|
3285
|
-
return [null, new IOResult28({ exitCode: 1, stderr: ENC29.encode("tail: missing operand\n") })];
|
|
3286
|
-
}
|
|
3287
|
-
const first = paths[0];
|
|
3288
|
-
if (first === void 0) return [null, new IOResult28()];
|
|
3289
|
-
if (typeof opts.flags.c === "string") {
|
|
3290
|
-
return [
|
|
3291
|
-
null,
|
|
3292
|
-
new IOResult28({ exitCode: 1, stderr: ENC29.encode("tail: -c not supported for audio files\n") })
|
|
3293
|
-
];
|
|
3294
|
-
}
|
|
3295
|
-
const n = typeof opts.flags.n === "string" ? Number.parseInt(opts.flags.n, 10) : 10;
|
|
3296
|
-
try {
|
|
3297
|
-
const raw = readRam(accessor, first);
|
|
3298
|
-
const meta = await metadata(raw);
|
|
3299
|
-
const duration = meta.duration ?? 0;
|
|
3300
|
-
const start = Math.max(0, duration - n);
|
|
3301
|
-
const out = transcribe(raw, start);
|
|
3302
|
-
return [out, new IOResult28({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
3303
|
-
} catch (err) {
|
|
3304
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
3305
|
-
return [
|
|
3306
|
-
null,
|
|
3307
|
-
new IOResult28({
|
|
3308
|
-
exitCode: 1,
|
|
3309
|
-
stderr: ENC29.encode(`tail: ${first.original}: failed to read as mp3: ${msg}
|
|
3310
|
-
`)
|
|
3311
|
-
})
|
|
3312
|
-
];
|
|
3313
|
-
}
|
|
3314
|
-
}
|
|
3315
|
-
var RAM_LOCAL_AUDIO_TAIL_MP3 = command28({
|
|
3316
|
-
name: "tail",
|
|
3317
|
-
resource: ResourceName32.RAM,
|
|
3318
|
-
spec: specOf28("tail"),
|
|
3319
|
-
filetype: ".mp3",
|
|
3320
|
-
fn: tailMp3Command2
|
|
3321
|
-
});
|
|
3322
|
-
|
|
3323
|
-
// src/commands/local_audio/ram/tail_ogg.ts
|
|
3324
|
-
import {
|
|
3325
|
-
IOResult as IOResult29,
|
|
3326
|
-
ResourceName as ResourceName33,
|
|
3327
|
-
command as command29,
|
|
3328
|
-
specOf as specOf29
|
|
3329
|
-
} from "@struktoai/mirage-core";
|
|
3330
|
-
var ENC30 = new TextEncoder();
|
|
3331
|
-
async function tailOggCommand2(accessor, paths, _texts, opts) {
|
|
3332
|
-
if (paths.length === 0) {
|
|
3333
|
-
return [null, new IOResult29({ exitCode: 1, stderr: ENC30.encode("tail: missing operand\n") })];
|
|
3334
|
-
}
|
|
3335
|
-
const first = paths[0];
|
|
3336
|
-
if (first === void 0) return [null, new IOResult29()];
|
|
3337
|
-
if (typeof opts.flags.c === "string") {
|
|
3338
|
-
return [
|
|
3339
|
-
null,
|
|
3340
|
-
new IOResult29({ exitCode: 1, stderr: ENC30.encode("tail: -c not supported for audio files\n") })
|
|
3341
|
-
];
|
|
3342
|
-
}
|
|
3343
|
-
const n = typeof opts.flags.n === "string" ? Number.parseInt(opts.flags.n, 10) : 10;
|
|
3344
|
-
try {
|
|
3345
|
-
const raw = readRam(accessor, first);
|
|
3346
|
-
const meta = await metadata(raw);
|
|
3347
|
-
const duration = meta.duration ?? 0;
|
|
3348
|
-
const start = Math.max(0, duration - n);
|
|
3349
|
-
const out = transcribe(raw, start);
|
|
3350
|
-
return [out, new IOResult29({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
3351
|
-
} catch (err) {
|
|
3352
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
3353
|
-
return [
|
|
3354
|
-
null,
|
|
3355
|
-
new IOResult29({
|
|
3356
|
-
exitCode: 1,
|
|
3357
|
-
stderr: ENC30.encode(`tail: ${first.original}: failed to read as ogg: ${msg}
|
|
3358
|
-
`)
|
|
3359
|
-
})
|
|
3360
|
-
];
|
|
3361
|
-
}
|
|
3362
|
-
}
|
|
3363
|
-
var RAM_LOCAL_AUDIO_TAIL_OGG = command29({
|
|
3364
|
-
name: "tail",
|
|
3365
|
-
resource: ResourceName33.RAM,
|
|
3366
|
-
spec: specOf29("tail"),
|
|
3367
|
-
filetype: ".ogg",
|
|
3368
|
-
fn: tailOggCommand2
|
|
3369
|
-
});
|
|
3370
|
-
|
|
3371
|
-
// src/commands/local_audio/ram/tail_wav.ts
|
|
3372
|
-
import {
|
|
3373
|
-
IOResult as IOResult30,
|
|
3374
|
-
ResourceName as ResourceName34,
|
|
3375
|
-
command as command30,
|
|
3376
|
-
specOf as specOf30
|
|
3377
|
-
} from "@struktoai/mirage-core";
|
|
3378
|
-
var ENC31 = new TextEncoder();
|
|
3379
|
-
async function tailWavCommand2(accessor, paths, _texts, opts) {
|
|
3380
|
-
if (paths.length === 0) {
|
|
3381
|
-
return [null, new IOResult30({ exitCode: 1, stderr: ENC31.encode("tail: missing operand\n") })];
|
|
3382
|
-
}
|
|
3383
|
-
const first = paths[0];
|
|
3384
|
-
if (first === void 0) return [null, new IOResult30()];
|
|
3385
|
-
if (typeof opts.flags.c === "string") {
|
|
3386
|
-
return [
|
|
3387
|
-
null,
|
|
3388
|
-
new IOResult30({ exitCode: 1, stderr: ENC31.encode("tail: -c not supported for audio files\n") })
|
|
3389
|
-
];
|
|
3390
|
-
}
|
|
3391
|
-
const n = typeof opts.flags.n === "string" ? Number.parseInt(opts.flags.n, 10) : 10;
|
|
3392
|
-
try {
|
|
3393
|
-
const raw = readRam(accessor, first);
|
|
3394
|
-
const meta = await metadata(raw);
|
|
3395
|
-
const duration = meta.duration ?? 0;
|
|
3396
|
-
const start = Math.max(0, duration - n);
|
|
3397
|
-
const out = transcribe(raw, start);
|
|
3398
|
-
return [out, new IOResult30({ reads: { [first.original]: raw }, cache: [first.original] })];
|
|
3399
|
-
} catch (err) {
|
|
3400
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
3401
|
-
return [
|
|
3402
|
-
null,
|
|
3403
|
-
new IOResult30({
|
|
3404
|
-
exitCode: 1,
|
|
3405
|
-
stderr: ENC31.encode(`tail: ${first.original}: failed to read as wav: ${msg}
|
|
3406
|
-
`)
|
|
3407
|
-
})
|
|
3408
|
-
];
|
|
3409
|
-
}
|
|
3410
|
-
}
|
|
3411
|
-
var RAM_LOCAL_AUDIO_TAIL_WAV = command30({
|
|
3412
|
-
name: "tail",
|
|
3413
|
-
resource: ResourceName34.RAM,
|
|
3414
|
-
spec: specOf30("tail"),
|
|
3415
|
-
filetype: ".wav",
|
|
3416
|
-
fn: tailWavCommand2
|
|
3417
|
-
});
|
|
3418
|
-
|
|
3419
|
-
// src/commands/local_audio/ram/index.ts
|
|
3420
|
-
var RAM_LOCAL_AUDIO_COMMANDS = [
|
|
3421
|
-
...RAM_LOCAL_AUDIO_CAT_WAV,
|
|
3422
|
-
...RAM_LOCAL_AUDIO_CAT_MP3,
|
|
3423
|
-
...RAM_LOCAL_AUDIO_CAT_OGG,
|
|
3424
|
-
...RAM_LOCAL_AUDIO_HEAD_WAV,
|
|
3425
|
-
...RAM_LOCAL_AUDIO_HEAD_MP3,
|
|
3426
|
-
...RAM_LOCAL_AUDIO_HEAD_OGG,
|
|
3427
|
-
...RAM_LOCAL_AUDIO_TAIL_WAV,
|
|
3428
|
-
...RAM_LOCAL_AUDIO_TAIL_MP3,
|
|
3429
|
-
...RAM_LOCAL_AUDIO_TAIL_OGG,
|
|
3430
|
-
...RAM_LOCAL_AUDIO_GREP_WAV,
|
|
3431
|
-
...RAM_LOCAL_AUDIO_GREP_MP3,
|
|
3432
|
-
...RAM_LOCAL_AUDIO_GREP_OGG,
|
|
3433
|
-
...RAM_LOCAL_AUDIO_STAT_WAV,
|
|
3434
|
-
...RAM_LOCAL_AUDIO_STAT_MP3,
|
|
3435
|
-
...RAM_LOCAL_AUDIO_STAT_OGG
|
|
3436
|
-
];
|
|
3437
|
-
|
|
3438
|
-
// src/commands/local_audio/index.ts
|
|
3439
|
-
var LOCAL_AUDIO_COMMANDS = {
|
|
3440
|
-
ram: RAM_LOCAL_AUDIO_COMMANDS,
|
|
3441
|
-
disk: DISK_LOCAL_AUDIO_COMMANDS
|
|
3442
|
-
};
|
|
3443
1769
|
export {
|
|
1770
|
+
ALIYUN_PROMPT,
|
|
1771
|
+
AliyunResource,
|
|
1772
|
+
BACKBLAZE_PROMPT,
|
|
1773
|
+
BackblazeResource,
|
|
3444
1774
|
BoxResource,
|
|
1775
|
+
CEPH_PROMPT,
|
|
1776
|
+
CephResource,
|
|
1777
|
+
DIGITALOCEAN_PROMPT,
|
|
3445
1778
|
DISK_COMMANDS,
|
|
3446
|
-
DISK_LOCAL_AUDIO_COMMANDS,
|
|
3447
1779
|
DISK_OPS,
|
|
3448
1780
|
DISK_PROMPT,
|
|
1781
|
+
DatabricksVolumeResource,
|
|
1782
|
+
DigitalOceanResource,
|
|
3449
1783
|
DiscordResource,
|
|
3450
1784
|
DiskResource,
|
|
3451
1785
|
DropboxResource,
|
|
@@ -3466,60 +1800,78 @@ export {
|
|
|
3466
1800
|
GitHubCIResource,
|
|
3467
1801
|
GitHubResource,
|
|
3468
1802
|
GmailResource,
|
|
3469
|
-
|
|
1803
|
+
HF_BUCKETS_PROMPT,
|
|
1804
|
+
HF_COMMANDS,
|
|
1805
|
+
HF_DATASETS_PROMPT,
|
|
1806
|
+
HF_ENDPOINT,
|
|
1807
|
+
HF_MODELS_PROMPT,
|
|
1808
|
+
HF_OPS,
|
|
1809
|
+
HF_RESOURCES,
|
|
1810
|
+
HF_SPACES_PROMPT,
|
|
1811
|
+
HfAccessor,
|
|
1812
|
+
HfBucketsAccessor,
|
|
1813
|
+
HfBucketsResource,
|
|
1814
|
+
HfDatasetsAccessor,
|
|
1815
|
+
HfDatasetsResource,
|
|
1816
|
+
HfModelsAccessor,
|
|
1817
|
+
HfModelsResource,
|
|
1818
|
+
HfSpacesAccessor,
|
|
1819
|
+
HfSpacesResource,
|
|
1820
|
+
LanceDBResource,
|
|
1821
|
+
LanceDBStore,
|
|
3470
1822
|
LangfuseResource,
|
|
3471
1823
|
LinearResource,
|
|
1824
|
+
MINIO_PROMPT,
|
|
1825
|
+
MinIOResource,
|
|
3472
1826
|
MirageFS,
|
|
3473
1827
|
MongoDBResource,
|
|
3474
1828
|
MongoDBStore,
|
|
1829
|
+
NotionResource,
|
|
3475
1830
|
OCIResource,
|
|
3476
1831
|
OCI_PROMPT,
|
|
3477
|
-
PostHogResource,
|
|
3478
1832
|
PostgresResource,
|
|
3479
1833
|
PostgresStore,
|
|
1834
|
+
QINGSTOR_PROMPT,
|
|
1835
|
+
QingStorResource,
|
|
3480
1836
|
R2Resource,
|
|
3481
1837
|
R2_PROMPT,
|
|
3482
|
-
RAM_LOCAL_AUDIO_COMMANDS,
|
|
3483
1838
|
REDIS_COMMANDS,
|
|
3484
1839
|
REDIS_OPS,
|
|
3485
1840
|
REDIS_PROMPT,
|
|
3486
1841
|
RedisAccessor,
|
|
3487
1842
|
RedisFileCacheStore,
|
|
3488
|
-
RedisIndexCacheStore,
|
|
3489
1843
|
RedisResource,
|
|
3490
1844
|
RedisStore,
|
|
3491
1845
|
S3Resource,
|
|
3492
|
-
|
|
3493
|
-
|
|
1846
|
+
SCALEWAY_PROMPT,
|
|
1847
|
+
SEAWEEDFS_PROMPT,
|
|
3494
1848
|
SSHAccessor,
|
|
3495
1849
|
SSHResource,
|
|
3496
1850
|
SSH_COMMANDS,
|
|
3497
1851
|
SSH_OPS,
|
|
3498
1852
|
SSH_PROMPT,
|
|
3499
1853
|
SUPABASE_PROMPT,
|
|
1854
|
+
ScalewayResource,
|
|
1855
|
+
SeaweedFSResource,
|
|
3500
1856
|
SlackResource,
|
|
3501
1857
|
SupabaseResource,
|
|
1858
|
+
TENCENT_PROMPT,
|
|
1859
|
+
TencentResource,
|
|
3502
1860
|
TrelloResource,
|
|
3503
|
-
|
|
1861
|
+
WASABI_PROMPT,
|
|
1862
|
+
WasabiResource,
|
|
3504
1863
|
Workspace,
|
|
1864
|
+
assertHfRepoId,
|
|
3505
1865
|
buildEmailConfig,
|
|
3506
1866
|
buildResource,
|
|
3507
|
-
configure as configureLocalAudio,
|
|
3508
1867
|
fileReadProvision,
|
|
3509
1868
|
mount as fuseMount,
|
|
3510
1869
|
mountBackground as fuseMountBackground,
|
|
3511
|
-
getConfig as getLocalAudioConfig,
|
|
3512
1870
|
headTailProvision,
|
|
3513
1871
|
isMacosMetadata,
|
|
3514
1872
|
knownResources,
|
|
3515
|
-
|
|
3516
|
-
formatDuration as localAudioFormatDuration,
|
|
3517
|
-
formatMetadata as localAudioFormatMetadata,
|
|
3518
|
-
metadata as localAudioMetadata,
|
|
3519
|
-
transcribe as localAudioTranscribe,
|
|
1873
|
+
loadDatabricksProfile,
|
|
3520
1874
|
metadataProvision,
|
|
3521
|
-
nativeExec,
|
|
3522
|
-
nativeExecStream,
|
|
3523
1875
|
normalizeBoxConfig,
|
|
3524
1876
|
normalizeDiscordConfig,
|
|
3525
1877
|
normalizeDropboxConfig,
|
|
@@ -3530,14 +1882,23 @@ export {
|
|
|
3530
1882
|
normalizeGSlidesConfig,
|
|
3531
1883
|
normalizeGitHubCIConfig,
|
|
3532
1884
|
normalizeGitHubConfig,
|
|
3533
|
-
normalizeGmailConfig,
|
|
1885
|
+
normalizeGoogleConfig as normalizeGmailConfig,
|
|
1886
|
+
normalizeHfBucketsConfig,
|
|
1887
|
+
normalizeHfModelsConfig,
|
|
1888
|
+
normalizeHfRepoConfig,
|
|
3534
1889
|
normalizeLangfuseConfig,
|
|
3535
1890
|
normalizeLinearConfig,
|
|
1891
|
+
normalizeNotionConfig,
|
|
3536
1892
|
normalizeSlackConfig,
|
|
3537
1893
|
normalizeSshConfig,
|
|
3538
1894
|
normalizeTrelloConfig,
|
|
1895
|
+
parseDatabricksCfg,
|
|
3539
1896
|
patchNodeFs,
|
|
1897
|
+
redactAliyunConfig,
|
|
1898
|
+
redactBackblazeConfig,
|
|
3540
1899
|
redactBoxConfig,
|
|
1900
|
+
redactCephConfig,
|
|
1901
|
+
redactDigitalOceanConfig,
|
|
3541
1902
|
redactDiscordConfig,
|
|
3542
1903
|
redactDropboxConfig,
|
|
3543
1904
|
redactEmailConfig,
|
|
@@ -3548,17 +1909,34 @@ export {
|
|
|
3548
1909
|
redactGcsConfig,
|
|
3549
1910
|
redactGitHubCIConfig,
|
|
3550
1911
|
redactGitHubConfig,
|
|
3551
|
-
redactGmailConfig,
|
|
1912
|
+
redactGoogleConfig as redactGmailConfig,
|
|
1913
|
+
redactHfBucketsConfig,
|
|
1914
|
+
redactHfModelsConfig,
|
|
1915
|
+
redactHfRepoConfig,
|
|
3552
1916
|
redactLangfuseConfig,
|
|
3553
1917
|
redactLinearConfig,
|
|
1918
|
+
redactMinIOConfig,
|
|
1919
|
+
redactNotionConfig,
|
|
3554
1920
|
redactOciConfig,
|
|
1921
|
+
redactQingStorConfig,
|
|
3555
1922
|
redactR2Config,
|
|
3556
1923
|
redactConfig as redactS3Config,
|
|
1924
|
+
redactScalewayConfig,
|
|
1925
|
+
redactSeaweedFSConfig,
|
|
3557
1926
|
redactSlackConfig,
|
|
3558
1927
|
redactSshConfig,
|
|
3559
1928
|
redactSupabaseConfig,
|
|
1929
|
+
redactTencentConfig,
|
|
3560
1930
|
redactTrelloConfig,
|
|
1931
|
+
redactWasabiConfig,
|
|
3561
1932
|
register as registerResourceFactory,
|
|
3562
|
-
|
|
1933
|
+
resolvedAliyunEndpoint,
|
|
1934
|
+
resolvedBackblazeEndpoint,
|
|
1935
|
+
resolvedDigitalOceanEndpoint,
|
|
1936
|
+
resolvedQingStorEndpoint,
|
|
1937
|
+
resolvedScalewayEndpoint,
|
|
1938
|
+
resolvedSupabaseEndpoint,
|
|
1939
|
+
resolvedTencentEndpoint,
|
|
1940
|
+
resolvedWasabiEndpoint
|
|
3563
1941
|
};
|
|
3564
1942
|
//# sourceMappingURL=index.js.map
|