@struktoai/mirage-node 0.0.3-alpha.0 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{aliyun-TMZRUYCG.js → aliyun-JMJ3PFYY.js} +3 -3
- package/dist/{backblaze-OHW57DLK.js → backblaze-TDFD23QO.js} +3 -3
- package/dist/{box-UXTCAFOZ.js → box-GQ2U2R6R.js} +2 -2
- package/dist/{ceph-TNN4I2FT.js → ceph-S2VOYO6G.js} +3 -3
- package/dist/{chunk-FXFDBF3P.js → chunk-3WIO7NBR.js} +2 -2
- package/dist/{chunk-O7ODGJYL.js → chunk-47AVIIOT.js} +2 -2
- package/dist/{chunk-Q6CDMOM6.js → chunk-7CW3BMPH.js} +2 -2
- package/dist/{chunk-E7RW3SBV.js → chunk-A7IVFIOP.js} +2 -2
- package/dist/chunk-A7IVFIOP.js.map +1 -0
- package/dist/{chunk-3T3RMDNX.js → chunk-AUHSTJJ3.js} +2 -2
- package/dist/{chunk-PJBQKMCD.js → chunk-DM4GSE26.js} +2 -2
- package/dist/{chunk-5DLOHQJ2.js → chunk-EM4J5EQS.js} +2 -2
- package/dist/chunk-EM4J5EQS.js.map +1 -0
- package/dist/{chunk-ABTEGAFB.js → chunk-EZQ5HBAC.js} +2 -2
- package/dist/chunk-EZQ5HBAC.js.map +1 -0
- package/dist/{chunk-KTNDT45N.js → chunk-FQ33BYFR.js} +2 -2
- package/dist/{chunk-YAVGCQUP.js → chunk-G2WCEUQL.js} +2 -2
- package/dist/chunk-G2WCEUQL.js.map +1 -0
- package/dist/{chunk-RLGWMJD3.js → chunk-GCFYZSVR.js} +133 -3
- package/dist/chunk-GCFYZSVR.js.map +1 -0
- package/dist/{chunk-NHS7WLEQ.js → chunk-GS5AUKUO.js} +2 -2
- package/dist/chunk-GS5AUKUO.js.map +1 -0
- package/dist/{chunk-BYTU2YC3.js → chunk-HGCRXJGP.js} +2 -2
- package/dist/{chunk-G5BZE7UA.js → chunk-HJJMP6IX.js} +2 -2
- package/dist/{chunk-IQVNVTOP.js → chunk-I5THIMPP.js} +2 -2
- package/dist/chunk-IDYHQQOH.js +1095 -0
- package/dist/chunk-IDYHQQOH.js.map +1 -0
- package/dist/{chunk-C6NHFMIP.js → chunk-IK2L4EN3.js} +2 -2
- package/dist/{chunk-LYDMMNL2.js → chunk-JAGJTM3Q.js} +2 -2
- package/dist/chunk-JAGJTM3Q.js.map +1 -0
- package/dist/{chunk-A7X4L4JM.js → chunk-JCC4CU2I.js} +2 -2
- package/dist/chunk-JCC4CU2I.js.map +1 -0
- package/dist/{chunk-AJICZLHT.js → chunk-KPULTUOK.js} +2 -2
- package/dist/{chunk-YPT4JBUY.js → chunk-LV2G7VHL.js} +2 -2
- package/dist/chunk-LV2G7VHL.js.map +1 -0
- package/dist/{chunk-C6NHEDHY.js → chunk-M5FVUIYP.js} +2 -2
- package/dist/chunk-M5FVUIYP.js.map +1 -0
- package/dist/{chunk-HEHERHQ5.js → chunk-MPCCRRE6.js} +2 -2
- package/dist/chunk-MPCCRRE6.js.map +1 -0
- package/dist/{chunk-RQYEEA2O.js → chunk-N5FSLVKO.js} +2 -2
- package/dist/{chunk-CASCUFK2.js → chunk-NOHWIBRX.js} +2 -2
- package/dist/chunk-NOHWIBRX.js.map +1 -0
- package/dist/{chunk-TRTUHCS4.js → chunk-QCZ2XUKH.js} +2 -2
- package/dist/chunk-QCZ2XUKH.js.map +1 -0
- package/dist/{chunk-3IJSIVKT.js → chunk-QQBJC2FQ.js} +2 -2
- package/dist/{chunk-JZQHKDSY.js → chunk-RNQN2FOU.js} +2 -2
- package/dist/chunk-RNQN2FOU.js.map +1 -0
- package/dist/{chunk-DTAY7LPC.js → chunk-S5OVP467.js} +2 -2
- package/dist/chunk-S5OVP467.js.map +1 -0
- package/dist/{chunk-5YOCVEUB.js → chunk-SWCDFEUK.js} +2 -2
- package/dist/chunk-SWCDFEUK.js.map +1 -0
- package/dist/{chunk-MHCMHKM6.js → chunk-TA3WMOMU.js} +2 -2
- package/dist/chunk-TA3WMOMU.js.map +1 -0
- package/dist/{chunk-WSGEIVY3.js → chunk-TURD42QO.js} +101 -85
- package/dist/chunk-TURD42QO.js.map +1 -0
- package/dist/{chunk-WL7HS7EM.js → chunk-UINQOUZR.js} +2 -2
- package/dist/{chunk-A4Z6DZ22.js → chunk-VWKUT4CW.js} +2 -2
- package/dist/chunk-VWKUT4CW.js.map +1 -0
- package/dist/{chunk-ERELJ7BS.js → chunk-WAR4Q2NM.js} +2 -2
- package/dist/chunk-WAR4Q2NM.js.map +1 -0
- package/dist/{chunk-5HCVKTP3.js → chunk-WHFUWWI6.js} +92 -81
- package/dist/chunk-WHFUWWI6.js.map +1 -0
- package/dist/{chunk-HQ4KWN76.js → chunk-X3G37FXT.js} +2 -2
- package/dist/{chunk-OYV2DN66.js → chunk-X5HF2OFP.js} +2 -2
- package/dist/chunk-XWVDS66D.js +963 -0
- package/dist/chunk-XWVDS66D.js.map +1 -0
- package/dist/{chunk-L6JPBJAS.js → chunk-YAHRT6MB.js} +2 -2
- package/dist/{chunk-XRU5WXZX.js → chunk-ZEGAMJO2.js} +2 -2
- package/dist/chunk-ZEGAMJO2.js.map +1 -0
- package/dist/{chunk-B6SXRCBO.js → chunk-ZGSER5TG.js} +2 -2
- package/dist/databricks_volume-7XOUYSTY.js +7 -0
- package/dist/{digitalocean-6SPR4S7V.js → digitalocean-3CQ4CPPZ.js} +3 -3
- package/dist/{discord-SAV2RBJV.js → discord-BG7OSRJG.js} +2 -2
- package/dist/{disk-POACMF4G.js → disk-XVLBCVKE.js} +2 -2
- package/dist/{dropbox-CQ7MTYX2.js → dropbox-74GYLV3R.js} +2 -2
- package/dist/{email-KBQ7CXS7.js → email-5IZ7OBQ4.js} +2 -2
- package/dist/{gcs-SMIE4VMT.js → gcs-EMEYU2XT.js} +3 -3
- package/dist/{gdocs-X5Y2SIQX.js → gdocs-R67TDPON.js} +2 -2
- package/dist/{gdrive-SIQPRIGI.js → gdrive-PRN2ALRK.js} +2 -2
- package/dist/{github-KBHWANKQ.js → github-DV7E6OFV.js} +2 -2
- package/dist/{github_ci-HPITNK37.js → github_ci-Q554V5PA.js} +2 -2
- package/dist/{gmail-DKHAGJNX.js → gmail-OLN2LT4O.js} +2 -2
- package/dist/{gsheets-ZSUDIWGK.js → gsheets-H4RYMQJ5.js} +2 -2
- package/dist/{gslides-GYXM7IMJ.js → gslides-YLCHKJOM.js} +2 -2
- package/dist/{hf_buckets-RIOMV7WG.js → hf_buckets-DTKXKKFF.js} +3 -3
- package/dist/{hf_datasets-QF4BQ3OK.js → hf_datasets-55C4APKR.js} +3 -3
- package/dist/{hf_models-62GC2HPZ.js → hf_models-RO5JR36V.js} +3 -3
- package/dist/{hf_spaces-NVSMUNRM.js → hf_spaces-ZVZ3EDRX.js} +3 -3
- package/dist/index.d.ts +110 -44
- package/dist/index.js +520 -232
- package/dist/index.js.map +1 -1
- package/dist/{langfuse-HUAYVPHF.js → langfuse-ACASJZ7O.js} +2 -2
- package/dist/{linear-2MM55KBC.js → linear-IC37LZV7.js} +2 -2
- package/dist/{minio-L3XE6PQS.js → minio-HZ576XFQ.js} +3 -3
- package/dist/mongodb-JVR62OIO.js +7 -0
- package/dist/{notion-UK4GTMT4.js → notion-HKRPQMJS.js} +2 -2
- package/dist/{oci-NURLWPL2.js → oci-ZLVECXTW.js} +3 -3
- package/dist/postgres-P36Z2YN4.js +7 -0
- package/dist/{qingstor-W55D5YFO.js → qingstor-YLP6K3L4.js} +3 -3
- package/dist/{r2-FSZK7IFI.js → r2-RPK25ANI.js} +3 -3
- package/dist/{redis-S6GIPA4Z.js → redis-V5ULXULL.js} +2 -2
- package/dist/{s3-GMPUJ65D.js → s3-4OIOCAAT.js} +2 -2
- package/dist/{scaleway-5VM55Y6D.js → scaleway-CCWCLUHB.js} +3 -3
- package/dist/{seaweedfs-J3EPUEPE.js → seaweedfs-QSWKF2FN.js} +3 -3
- package/dist/{slack-FVBXY7KD.js → slack-YPS7PII3.js} +2 -2
- package/dist/{ssh-GCXETJ3Z.js → ssh-YFP3SMTJ.js} +2 -2
- package/dist/{supabase-HLWNHBBE.js → supabase-6CFTOKGZ.js} +3 -3
- package/dist/{tencent-YDO73XBD.js → tencent-IWZZOSQ4.js} +3 -3
- package/dist/{trello-CQ53BQUL.js → trello-XYKWZD6P.js} +2 -2
- package/dist/{wasabi-SOZKPMRQ.js → wasabi-6Z4DC5S5.js} +3 -3
- package/package.json +7 -5
- package/dist/chunk-5DLOHQJ2.js.map +0 -1
- package/dist/chunk-5HCVKTP3.js.map +0 -1
- package/dist/chunk-5YOCVEUB.js.map +0 -1
- package/dist/chunk-A4Z6DZ22.js.map +0 -1
- package/dist/chunk-A7X4L4JM.js.map +0 -1
- package/dist/chunk-ABTEGAFB.js.map +0 -1
- package/dist/chunk-C6NHEDHY.js.map +0 -1
- package/dist/chunk-CASCUFK2.js.map +0 -1
- package/dist/chunk-DTAY7LPC.js.map +0 -1
- package/dist/chunk-E7RW3SBV.js.map +0 -1
- package/dist/chunk-ERELJ7BS.js.map +0 -1
- package/dist/chunk-HEHERHQ5.js.map +0 -1
- package/dist/chunk-JZQHKDSY.js.map +0 -1
- package/dist/chunk-LYDMMNL2.js.map +0 -1
- package/dist/chunk-MHCMHKM6.js.map +0 -1
- package/dist/chunk-N72CAZEH.js +0 -1990
- package/dist/chunk-N72CAZEH.js.map +0 -1
- package/dist/chunk-NHS7WLEQ.js.map +0 -1
- package/dist/chunk-PBBG7VFT.js +0 -1896
- package/dist/chunk-PBBG7VFT.js.map +0 -1
- package/dist/chunk-RLGWMJD3.js.map +0 -1
- package/dist/chunk-TRTUHCS4.js.map +0 -1
- package/dist/chunk-WSGEIVY3.js.map +0 -1
- package/dist/chunk-XRU5WXZX.js.map +0 -1
- package/dist/chunk-YAVGCQUP.js.map +0 -1
- package/dist/chunk-YPT4JBUY.js.map +0 -1
- package/dist/databricks_volume-HNQ4DJVJ.js +0 -7
- package/dist/mongodb-ZOX4FRHJ.js +0 -7
- package/dist/postgres-JNFMPAO2.js +0 -7
- /package/dist/{aliyun-TMZRUYCG.js.map → aliyun-JMJ3PFYY.js.map} +0 -0
- /package/dist/{backblaze-OHW57DLK.js.map → backblaze-TDFD23QO.js.map} +0 -0
- /package/dist/{box-UXTCAFOZ.js.map → box-GQ2U2R6R.js.map} +0 -0
- /package/dist/{ceph-TNN4I2FT.js.map → ceph-S2VOYO6G.js.map} +0 -0
- /package/dist/{chunk-FXFDBF3P.js.map → chunk-3WIO7NBR.js.map} +0 -0
- /package/dist/{chunk-O7ODGJYL.js.map → chunk-47AVIIOT.js.map} +0 -0
- /package/dist/{chunk-Q6CDMOM6.js.map → chunk-7CW3BMPH.js.map} +0 -0
- /package/dist/{chunk-3T3RMDNX.js.map → chunk-AUHSTJJ3.js.map} +0 -0
- /package/dist/{chunk-PJBQKMCD.js.map → chunk-DM4GSE26.js.map} +0 -0
- /package/dist/{chunk-KTNDT45N.js.map → chunk-FQ33BYFR.js.map} +0 -0
- /package/dist/{chunk-BYTU2YC3.js.map → chunk-HGCRXJGP.js.map} +0 -0
- /package/dist/{chunk-G5BZE7UA.js.map → chunk-HJJMP6IX.js.map} +0 -0
- /package/dist/{chunk-IQVNVTOP.js.map → chunk-I5THIMPP.js.map} +0 -0
- /package/dist/{chunk-C6NHFMIP.js.map → chunk-IK2L4EN3.js.map} +0 -0
- /package/dist/{chunk-AJICZLHT.js.map → chunk-KPULTUOK.js.map} +0 -0
- /package/dist/{chunk-RQYEEA2O.js.map → chunk-N5FSLVKO.js.map} +0 -0
- /package/dist/{chunk-3IJSIVKT.js.map → chunk-QQBJC2FQ.js.map} +0 -0
- /package/dist/{chunk-WL7HS7EM.js.map → chunk-UINQOUZR.js.map} +0 -0
- /package/dist/{chunk-HQ4KWN76.js.map → chunk-X3G37FXT.js.map} +0 -0
- /package/dist/{chunk-OYV2DN66.js.map → chunk-X5HF2OFP.js.map} +0 -0
- /package/dist/{chunk-L6JPBJAS.js.map → chunk-YAHRT6MB.js.map} +0 -0
- /package/dist/{chunk-B6SXRCBO.js.map → chunk-ZGSER5TG.js.map} +0 -0
- /package/dist/{databricks_volume-HNQ4DJVJ.js.map → databricks_volume-7XOUYSTY.js.map} +0 -0
- /package/dist/{digitalocean-6SPR4S7V.js.map → digitalocean-3CQ4CPPZ.js.map} +0 -0
- /package/dist/{discord-SAV2RBJV.js.map → discord-BG7OSRJG.js.map} +0 -0
- /package/dist/{disk-POACMF4G.js.map → disk-XVLBCVKE.js.map} +0 -0
- /package/dist/{dropbox-CQ7MTYX2.js.map → dropbox-74GYLV3R.js.map} +0 -0
- /package/dist/{email-KBQ7CXS7.js.map → email-5IZ7OBQ4.js.map} +0 -0
- /package/dist/{gcs-SMIE4VMT.js.map → gcs-EMEYU2XT.js.map} +0 -0
- /package/dist/{gdocs-X5Y2SIQX.js.map → gdocs-R67TDPON.js.map} +0 -0
- /package/dist/{gdrive-SIQPRIGI.js.map → gdrive-PRN2ALRK.js.map} +0 -0
- /package/dist/{github-KBHWANKQ.js.map → github-DV7E6OFV.js.map} +0 -0
- /package/dist/{github_ci-HPITNK37.js.map → github_ci-Q554V5PA.js.map} +0 -0
- /package/dist/{gmail-DKHAGJNX.js.map → gmail-OLN2LT4O.js.map} +0 -0
- /package/dist/{gsheets-ZSUDIWGK.js.map → gsheets-H4RYMQJ5.js.map} +0 -0
- /package/dist/{gslides-GYXM7IMJ.js.map → gslides-YLCHKJOM.js.map} +0 -0
- /package/dist/{hf_buckets-RIOMV7WG.js.map → hf_buckets-DTKXKKFF.js.map} +0 -0
- /package/dist/{hf_datasets-QF4BQ3OK.js.map → hf_datasets-55C4APKR.js.map} +0 -0
- /package/dist/{hf_models-62GC2HPZ.js.map → hf_models-RO5JR36V.js.map} +0 -0
- /package/dist/{hf_spaces-NVSMUNRM.js.map → hf_spaces-ZVZ3EDRX.js.map} +0 -0
- /package/dist/{langfuse-HUAYVPHF.js.map → langfuse-ACASJZ7O.js.map} +0 -0
- /package/dist/{linear-2MM55KBC.js.map → linear-IC37LZV7.js.map} +0 -0
- /package/dist/{minio-L3XE6PQS.js.map → minio-HZ576XFQ.js.map} +0 -0
- /package/dist/{mongodb-ZOX4FRHJ.js.map → mongodb-JVR62OIO.js.map} +0 -0
- /package/dist/{notion-UK4GTMT4.js.map → notion-HKRPQMJS.js.map} +0 -0
- /package/dist/{oci-NURLWPL2.js.map → oci-ZLVECXTW.js.map} +0 -0
- /package/dist/{postgres-JNFMPAO2.js.map → postgres-P36Z2YN4.js.map} +0 -0
- /package/dist/{qingstor-W55D5YFO.js.map → qingstor-YLP6K3L4.js.map} +0 -0
- /package/dist/{r2-FSZK7IFI.js.map → r2-RPK25ANI.js.map} +0 -0
- /package/dist/{redis-S6GIPA4Z.js.map → redis-V5ULXULL.js.map} +0 -0
- /package/dist/{s3-GMPUJ65D.js.map → s3-4OIOCAAT.js.map} +0 -0
- /package/dist/{scaleway-5VM55Y6D.js.map → scaleway-CCWCLUHB.js.map} +0 -0
- /package/dist/{seaweedfs-J3EPUEPE.js.map → seaweedfs-QSWKF2FN.js.map} +0 -0
- /package/dist/{slack-FVBXY7KD.js.map → slack-YPS7PII3.js.map} +0 -0
- /package/dist/{ssh-GCXETJ3Z.js.map → ssh-YFP3SMTJ.js.map} +0 -0
- /package/dist/{supabase-HLWNHBBE.js.map → supabase-6CFTOKGZ.js.map} +0 -0
- /package/dist/{tencent-YDO73XBD.js.map → tencent-IWZZOSQ4.js.map} +0 -0
- /package/dist/{trello-CQ53BQUL.js.map → trello-XYKWZD6P.js.map} +0 -0
- /package/dist/{wasabi-SOZKPMRQ.js.map → wasabi-6Z4DC5S5.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GmailResource
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MPCCRRE6.js";
|
|
4
4
|
import {
|
|
5
5
|
EMAIL_COMMANDS,
|
|
6
6
|
EMAIL_OPS,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
EMAIL_WRITE_PROMPT,
|
|
9
9
|
EmailAccessor,
|
|
10
10
|
EmailResource
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-S5OVP467.js";
|
|
12
12
|
import {
|
|
13
13
|
buildEmailConfig,
|
|
14
14
|
normalizeEmailConfig,
|
|
@@ -16,24 +16,24 @@ import {
|
|
|
16
16
|
} from "./chunk-B2ZOKNN4.js";
|
|
17
17
|
import {
|
|
18
18
|
GSlidesResource
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-A7IVFIOP.js";
|
|
20
20
|
import {
|
|
21
21
|
GDriveResource
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-QCZ2XUKH.js";
|
|
23
23
|
import {
|
|
24
24
|
normalizeGDriveConfig,
|
|
25
25
|
redactGDriveConfig
|
|
26
26
|
} from "./chunk-DP2PP5V2.js";
|
|
27
27
|
import {
|
|
28
28
|
DropboxResource
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-SWCDFEUK.js";
|
|
30
30
|
import {
|
|
31
31
|
normalizeDropboxConfig,
|
|
32
32
|
redactDropboxConfig
|
|
33
33
|
} from "./chunk-Q2IAILVC.js";
|
|
34
34
|
import {
|
|
35
35
|
BoxResource
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-VWKUT4CW.js";
|
|
37
37
|
import {
|
|
38
38
|
normalizeBoxConfig,
|
|
39
39
|
redactBoxConfig
|
|
@@ -44,24 +44,24 @@ import {
|
|
|
44
44
|
} from "./chunk-54NTYJEO.js";
|
|
45
45
|
import {
|
|
46
46
|
GitHubResource
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-LV2G7VHL.js";
|
|
48
48
|
import {
|
|
49
49
|
GitHubCIResource
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-EZQ5HBAC.js";
|
|
51
51
|
import {
|
|
52
52
|
normalizeGitHubCIConfig,
|
|
53
53
|
redactGitHubCIConfig
|
|
54
54
|
} from "./chunk-H3I2KZIY.js";
|
|
55
55
|
import {
|
|
56
56
|
GDocsResource
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-JCC4CU2I.js";
|
|
58
58
|
import {
|
|
59
59
|
normalizeGDocsConfig,
|
|
60
60
|
redactGDocsConfig
|
|
61
61
|
} from "./chunk-H3BST2LI.js";
|
|
62
62
|
import {
|
|
63
63
|
GSheetsResource
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-ZEGAMJO2.js";
|
|
65
65
|
import {
|
|
66
66
|
normalizeGSheetsConfig,
|
|
67
67
|
redactGSheetsConfig
|
|
@@ -72,24 +72,24 @@ import {
|
|
|
72
72
|
} from "./chunk-W7FLHT65.js";
|
|
73
73
|
import {
|
|
74
74
|
TrelloResource
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-WAR4Q2NM.js";
|
|
76
76
|
import {
|
|
77
77
|
LinearResource
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-G2WCEUQL.js";
|
|
79
79
|
import {
|
|
80
80
|
normalizeLinearConfig,
|
|
81
81
|
redactLinearConfig
|
|
82
82
|
} from "./chunk-YUK3X3B4.js";
|
|
83
83
|
import {
|
|
84
84
|
NotionResource
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-NOHWIBRX.js";
|
|
86
86
|
import {
|
|
87
87
|
normalizeNotionConfig,
|
|
88
88
|
redactNotionConfig
|
|
89
89
|
} from "./chunk-JZT4QGIP.js";
|
|
90
90
|
import {
|
|
91
91
|
LangfuseResource
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-EM4J5EQS.js";
|
|
93
93
|
import {
|
|
94
94
|
normalizeLangfuseConfig,
|
|
95
95
|
redactLangfuseConfig
|
|
@@ -101,10 +101,10 @@ import {
|
|
|
101
101
|
import {
|
|
102
102
|
MongoDBResource,
|
|
103
103
|
MongoDBStore
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-GCFYZSVR.js";
|
|
105
105
|
import {
|
|
106
106
|
SlackResource
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-M5FVUIYP.js";
|
|
108
108
|
import {
|
|
109
109
|
normalizeSlackConfig,
|
|
110
110
|
redactSlackConfig
|
|
@@ -115,14 +115,14 @@ import {
|
|
|
115
115
|
SSH_COMMANDS,
|
|
116
116
|
SSH_OPS,
|
|
117
117
|
SSH_PROMPT
|
|
118
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-WHFUWWI6.js";
|
|
119
119
|
import {
|
|
120
120
|
normalizeSshConfig,
|
|
121
121
|
redactSshConfig
|
|
122
122
|
} from "./chunk-UGK4TAVK.js";
|
|
123
123
|
import {
|
|
124
124
|
DiscordResource
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-JAGJTM3Q.js";
|
|
126
126
|
import {
|
|
127
127
|
normalizeDiscordConfig,
|
|
128
128
|
redactDiscordConfig
|
|
@@ -134,11 +134,11 @@ import {
|
|
|
134
134
|
import {
|
|
135
135
|
TENCENT_PROMPT,
|
|
136
136
|
TencentResource
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-YAHRT6MB.js";
|
|
138
138
|
import {
|
|
139
139
|
ALIYUN_PROMPT,
|
|
140
140
|
AliyunResource
|
|
141
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-FQ33BYFR.js";
|
|
142
142
|
import {
|
|
143
143
|
redactAliyunConfig,
|
|
144
144
|
resolvedAliyunEndpoint
|
|
@@ -146,7 +146,7 @@ import {
|
|
|
146
146
|
import {
|
|
147
147
|
SCALEWAY_PROMPT,
|
|
148
148
|
ScalewayResource
|
|
149
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-3WIO7NBR.js";
|
|
150
150
|
import {
|
|
151
151
|
redactScalewayConfig,
|
|
152
152
|
resolvedScalewayEndpoint
|
|
@@ -154,7 +154,7 @@ import {
|
|
|
154
154
|
import {
|
|
155
155
|
QINGSTOR_PROMPT,
|
|
156
156
|
QingStorResource
|
|
157
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-QQBJC2FQ.js";
|
|
158
158
|
import {
|
|
159
159
|
redactQingStorConfig,
|
|
160
160
|
resolvedQingStorEndpoint
|
|
@@ -162,15 +162,15 @@ import {
|
|
|
162
162
|
import {
|
|
163
163
|
PostgresResource,
|
|
164
164
|
PostgresStore
|
|
165
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-GS5AUKUO.js";
|
|
166
166
|
import {
|
|
167
167
|
CEPH_PROMPT,
|
|
168
168
|
CephResource
|
|
169
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-IK2L4EN3.js";
|
|
170
170
|
import {
|
|
171
171
|
WASABI_PROMPT,
|
|
172
172
|
WasabiResource
|
|
173
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-47AVIIOT.js";
|
|
174
174
|
import {
|
|
175
175
|
redactWasabiConfig,
|
|
176
176
|
resolvedWasabiEndpoint
|
|
@@ -178,7 +178,7 @@ import {
|
|
|
178
178
|
import {
|
|
179
179
|
BACKBLAZE_PROMPT,
|
|
180
180
|
BackblazeResource
|
|
181
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-X3G37FXT.js";
|
|
182
182
|
import {
|
|
183
183
|
redactBackblazeConfig,
|
|
184
184
|
resolvedBackblazeEndpoint
|
|
@@ -186,7 +186,7 @@ import {
|
|
|
186
186
|
import {
|
|
187
187
|
DIGITALOCEAN_PROMPT,
|
|
188
188
|
DigitalOceanResource
|
|
189
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-KPULTUOK.js";
|
|
190
190
|
import {
|
|
191
191
|
redactDigitalOceanConfig,
|
|
192
192
|
resolvedDigitalOceanEndpoint
|
|
@@ -198,26 +198,26 @@ import {
|
|
|
198
198
|
import {
|
|
199
199
|
HF_DATASETS_PROMPT,
|
|
200
200
|
HfDatasetsResource
|
|
201
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-N5FSLVKO.js";
|
|
202
202
|
import {
|
|
203
203
|
HF_MODELS_PROMPT,
|
|
204
204
|
HfModelsResource
|
|
205
|
-
} from "./chunk-
|
|
205
|
+
} from "./chunk-UINQOUZR.js";
|
|
206
206
|
import {
|
|
207
207
|
HF_SPACES_PROMPT,
|
|
208
208
|
HfSpacesResource
|
|
209
|
-
} from "./chunk-
|
|
209
|
+
} from "./chunk-X5HF2OFP.js";
|
|
210
210
|
import {
|
|
211
211
|
MINIO_PROMPT,
|
|
212
212
|
MinIOResource
|
|
213
|
-
} from "./chunk-
|
|
213
|
+
} from "./chunk-7CW3BMPH.js";
|
|
214
214
|
import {
|
|
215
215
|
redactMinIOConfig
|
|
216
216
|
} from "./chunk-DYXEITK3.js";
|
|
217
217
|
import {
|
|
218
218
|
SEAWEEDFS_PROMPT,
|
|
219
219
|
SeaweedFSResource
|
|
220
|
-
} from "./chunk-
|
|
220
|
+
} from "./chunk-AUHSTJJ3.js";
|
|
221
221
|
import {
|
|
222
222
|
redactSeaweedFSConfig
|
|
223
223
|
} from "./chunk-2CC5VW7K.js";
|
|
@@ -227,21 +227,21 @@ import {
|
|
|
227
227
|
import {
|
|
228
228
|
OCIResource,
|
|
229
229
|
OCI_PROMPT
|
|
230
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-DM4GSE26.js";
|
|
231
231
|
import {
|
|
232
232
|
redactOciConfig
|
|
233
233
|
} from "./chunk-RQK5UPMP.js";
|
|
234
234
|
import {
|
|
235
235
|
R2Resource,
|
|
236
236
|
R2_PROMPT
|
|
237
|
-
} from "./chunk-
|
|
237
|
+
} from "./chunk-ZGSER5TG.js";
|
|
238
238
|
import {
|
|
239
239
|
redactR2Config
|
|
240
240
|
} from "./chunk-LAJJPLEV.js";
|
|
241
241
|
import {
|
|
242
242
|
SUPABASE_PROMPT,
|
|
243
243
|
SupabaseResource
|
|
244
|
-
} from "./chunk-
|
|
244
|
+
} from "./chunk-HGCRXJGP.js";
|
|
245
245
|
import {
|
|
246
246
|
redactSupabaseConfig,
|
|
247
247
|
resolvedSupabaseEndpoint
|
|
@@ -249,7 +249,7 @@ import {
|
|
|
249
249
|
import {
|
|
250
250
|
HF_BUCKETS_PROMPT,
|
|
251
251
|
HfBucketsResource
|
|
252
|
-
} from "./chunk-
|
|
252
|
+
} from "./chunk-HJJMP6IX.js";
|
|
253
253
|
import {
|
|
254
254
|
HF_COMMANDS,
|
|
255
255
|
HF_OPS,
|
|
@@ -259,7 +259,7 @@ import {
|
|
|
259
259
|
HfDatasetsAccessor,
|
|
260
260
|
HfModelsAccessor,
|
|
261
261
|
HfSpacesAccessor
|
|
262
|
-
} from "./chunk-
|
|
262
|
+
} from "./chunk-TURD42QO.js";
|
|
263
263
|
import {
|
|
264
264
|
HF_ENDPOINT,
|
|
265
265
|
assertHfRepoId,
|
|
@@ -273,7 +273,7 @@ import {
|
|
|
273
273
|
DISK_OPS,
|
|
274
274
|
DISK_PROMPT,
|
|
275
275
|
DiskResource
|
|
276
|
-
} from "./chunk-
|
|
276
|
+
} from "./chunk-XWVDS66D.js";
|
|
277
277
|
import "./chunk-U6QSXTUS.js";
|
|
278
278
|
import {
|
|
279
279
|
REDIS_COMMANDS,
|
|
@@ -283,7 +283,7 @@ import {
|
|
|
283
283
|
RedisResource,
|
|
284
284
|
RedisStore,
|
|
285
285
|
stat
|
|
286
|
-
} from "./chunk-
|
|
286
|
+
} from "./chunk-IDYHQQOH.js";
|
|
287
287
|
import {
|
|
288
288
|
loadOptionalPeer
|
|
289
289
|
} from "./chunk-E2ISWXLB.js";
|
|
@@ -291,14 +291,14 @@ import {
|
|
|
291
291
|
DatabricksVolumeResource,
|
|
292
292
|
loadDatabricksProfile,
|
|
293
293
|
parseDatabricksCfg
|
|
294
|
-
} from "./chunk-
|
|
294
|
+
} from "./chunk-RNQN2FOU.js";
|
|
295
295
|
import {
|
|
296
296
|
GCSResource,
|
|
297
297
|
GCS_PROMPT
|
|
298
|
-
} from "./chunk-
|
|
298
|
+
} from "./chunk-I5THIMPP.js";
|
|
299
299
|
import {
|
|
300
300
|
S3Resource
|
|
301
|
-
} from "./chunk-
|
|
301
|
+
} from "./chunk-TA3WMOMU.js";
|
|
302
302
|
import {
|
|
303
303
|
redactConfig
|
|
304
304
|
} from "./chunk-UT2OPSN4.js";
|
|
@@ -312,14 +312,14 @@ export * from "@struktoai/mirage-core";
|
|
|
312
312
|
|
|
313
313
|
// src/workspace.ts
|
|
314
314
|
import { readFileSync } from "fs";
|
|
315
|
-
import { createRequire } from "module";
|
|
315
|
+
import { createRequire as createRequire2 } from "module";
|
|
316
316
|
import {
|
|
317
317
|
createShellParser,
|
|
318
318
|
Workspace as CoreWorkspace
|
|
319
319
|
} from "@struktoai/mirage-core";
|
|
320
320
|
|
|
321
321
|
// src/workspace/fuse.ts
|
|
322
|
-
import {
|
|
322
|
+
import { rmdirSync } from "fs";
|
|
323
323
|
|
|
324
324
|
// src/fuse/mount.ts
|
|
325
325
|
import { execSync } from "child_process";
|
|
@@ -377,6 +377,9 @@ var MirageFS = class {
|
|
|
377
377
|
root;
|
|
378
378
|
prefixes;
|
|
379
379
|
handles = /* @__PURE__ */ new Map();
|
|
380
|
+
// In-memory extended attributes, keyed by FUSE path. Backends have no POSIX
|
|
381
|
+
// xattrs, so these are advisory and never persisted; see setxattr.
|
|
382
|
+
xattrs = /* @__PURE__ */ new Map();
|
|
380
383
|
prefetchCache = /* @__PURE__ */ new Map();
|
|
381
384
|
prefetchInflight = /* @__PURE__ */ new Map();
|
|
382
385
|
nextFh = 1;
|
|
@@ -392,9 +395,9 @@ var MirageFS = class {
|
|
|
392
395
|
this.gid = typeof process.getgid === "function" ? process.getgid() : 0;
|
|
393
396
|
}
|
|
394
397
|
// ── helpers ──────────────────────────────────────────────────────
|
|
395
|
-
resolve(
|
|
396
|
-
if (this.root === "") return
|
|
397
|
-
return
|
|
398
|
+
resolve(path2) {
|
|
399
|
+
if (this.root === "") return path2;
|
|
400
|
+
return path2 === "/" ? this.root : this.root + path2;
|
|
398
401
|
}
|
|
399
402
|
whoamiContent() {
|
|
400
403
|
const lines = [`agent: ${this.agentId}`, "cwd: /", `mounts: ${this.prefixes.join(", ")}`];
|
|
@@ -424,8 +427,8 @@ var MirageFS = class {
|
|
|
424
427
|
gid: this.gid
|
|
425
428
|
};
|
|
426
429
|
}
|
|
427
|
-
isVirtualDir(
|
|
428
|
-
const bare = rstripSlash(
|
|
430
|
+
isVirtualDir(path2) {
|
|
431
|
+
const bare = rstripSlash(path2);
|
|
429
432
|
const normalized = bare + "/";
|
|
430
433
|
for (const p of this.prefixes) {
|
|
431
434
|
const pBare = rstripSlash(p);
|
|
@@ -433,8 +436,8 @@ var MirageFS = class {
|
|
|
433
436
|
}
|
|
434
437
|
return false;
|
|
435
438
|
}
|
|
436
|
-
virtualChildren(
|
|
437
|
-
const normalized =
|
|
439
|
+
virtualChildren(path2) {
|
|
440
|
+
const normalized = path2 === "/" ? "/" : rstripSlash(path2) + "/";
|
|
438
441
|
const children = /* @__PURE__ */ new Set();
|
|
439
442
|
for (const p of this.prefixes) {
|
|
440
443
|
if (p.startsWith(normalized) && p !== normalized) {
|
|
@@ -445,21 +448,21 @@ var MirageFS = class {
|
|
|
445
448
|
}
|
|
446
449
|
return [...children].sort();
|
|
447
450
|
}
|
|
448
|
-
cachedSize(
|
|
451
|
+
cachedSize(path2) {
|
|
449
452
|
for (const ctx of this.handles.values()) {
|
|
450
|
-
if (ctx.path ===
|
|
453
|
+
if (ctx.path === path2 && ctx.data !== void 0) return ctx.data.byteLength;
|
|
451
454
|
}
|
|
452
|
-
const entry = this.prefetchCache.get(
|
|
455
|
+
const entry = this.prefetchCache.get(path2);
|
|
453
456
|
if (entry !== void 0 && entry.expires > Date.now()) return entry.data.byteLength;
|
|
454
457
|
return null;
|
|
455
458
|
}
|
|
456
|
-
cachedData(
|
|
459
|
+
cachedData(path2) {
|
|
457
460
|
for (const ctx of this.handles.values()) {
|
|
458
|
-
if (ctx.path ===
|
|
461
|
+
if (ctx.path === path2 && ctx.data !== void 0) return ctx.data;
|
|
459
462
|
}
|
|
460
|
-
const entry = this.prefetchCache.get(
|
|
463
|
+
const entry = this.prefetchCache.get(path2);
|
|
461
464
|
if (entry !== void 0 && entry.expires > Date.now()) return entry.data;
|
|
462
|
-
if (entry !== void 0) this.prefetchCache.delete(
|
|
465
|
+
if (entry !== void 0) this.prefetchCache.delete(path2);
|
|
463
466
|
return null;
|
|
464
467
|
}
|
|
465
468
|
/**
|
|
@@ -469,23 +472,23 @@ var MirageFS = class {
|
|
|
469
472
|
* libfuse's `direct_io` flag — without a real size from getattr, the kernel
|
|
470
473
|
* decides the file is empty and never issues read().
|
|
471
474
|
*/
|
|
472
|
-
async prefetch(
|
|
473
|
-
const cached = this.cachedData(
|
|
475
|
+
async prefetch(path2) {
|
|
476
|
+
const cached = this.cachedData(path2);
|
|
474
477
|
if (cached !== null) return cached;
|
|
475
|
-
const inflight = this.prefetchInflight.get(
|
|
478
|
+
const inflight = this.prefetchInflight.get(path2);
|
|
476
479
|
if (inflight !== void 0) return inflight;
|
|
477
480
|
const promise = (async () => {
|
|
478
481
|
try {
|
|
479
|
-
const data = await this.ws.fs.readFile(this.resolve(
|
|
480
|
-
this.prefetchCache.set(
|
|
482
|
+
const data = await this.ws.fs.readFile(this.resolve(path2));
|
|
483
|
+
this.prefetchCache.set(path2, { data, expires: Date.now() + PREFETCH_TTL_MS });
|
|
481
484
|
return data;
|
|
482
485
|
} catch {
|
|
483
486
|
return null;
|
|
484
487
|
} finally {
|
|
485
|
-
this.prefetchInflight.delete(
|
|
488
|
+
this.prefetchInflight.delete(path2);
|
|
486
489
|
}
|
|
487
490
|
})();
|
|
488
|
-
this.prefetchInflight.set(
|
|
491
|
+
this.prefetchInflight.set(path2, promise);
|
|
489
492
|
return promise;
|
|
490
493
|
}
|
|
491
494
|
/** Drain and return accumulated op records (mirrors Python's drain_ops). */
|
|
@@ -494,8 +497,8 @@ var MirageFS = class {
|
|
|
494
497
|
this.ws.records.length = 0;
|
|
495
498
|
return records;
|
|
496
499
|
}
|
|
497
|
-
async writeFile(
|
|
498
|
-
await this.ws.dispatch("write", this.resolve(
|
|
500
|
+
async writeFile(path2, data) {
|
|
501
|
+
await this.ws.dispatch("write", this.resolve(path2), [data]);
|
|
499
502
|
}
|
|
500
503
|
// ── FUSE op surface (mirrors mfusepy Operations) ─────────────────
|
|
501
504
|
ops() {
|
|
@@ -519,60 +522,64 @@ var MirageFS = class {
|
|
|
519
522
|
chmod: this.chmod.bind(this),
|
|
520
523
|
chown: this.chown.bind(this),
|
|
521
524
|
access: this.access.bind(this),
|
|
525
|
+
setxattr: this.setxattr.bind(this),
|
|
526
|
+
getxattr: this.getxattr.bind(this),
|
|
527
|
+
listxattr: this.listxattr.bind(this),
|
|
528
|
+
removexattr: this.removexattr.bind(this),
|
|
522
529
|
statfs: this.statfs.bind(this)
|
|
523
530
|
};
|
|
524
531
|
}
|
|
525
|
-
getattr(
|
|
532
|
+
getattr(path2, cb) {
|
|
526
533
|
void (async () => {
|
|
527
|
-
if (
|
|
534
|
+
if (path2 === "/" || path2 === MIRAGE_DIR) {
|
|
528
535
|
cb(0, this.dirStat());
|
|
529
536
|
return;
|
|
530
537
|
}
|
|
531
|
-
if (
|
|
538
|
+
if (path2 === MIRAGE_WHOAMI) {
|
|
532
539
|
cb(0, this.fileStat(this.whoamiContent().byteLength));
|
|
533
540
|
return;
|
|
534
541
|
}
|
|
535
|
-
const name =
|
|
542
|
+
const name = path2.slice(path2.lastIndexOf("/") + 1);
|
|
536
543
|
if (isMacosMetadata(name)) {
|
|
537
544
|
cb(ENOENT);
|
|
538
545
|
return;
|
|
539
546
|
}
|
|
540
|
-
if (this.isVirtualDir(
|
|
547
|
+
if (this.isVirtualDir(path2)) {
|
|
541
548
|
cb(0, this.dirStat());
|
|
542
549
|
return;
|
|
543
550
|
}
|
|
544
551
|
try {
|
|
545
|
-
const s = await this.ws.fs.stat(this.resolve(
|
|
552
|
+
const s = await this.ws.fs.stat(this.resolve(path2));
|
|
546
553
|
if (s.type === FileType.DIRECTORY) {
|
|
547
554
|
cb(0, this.dirStat());
|
|
548
555
|
return;
|
|
549
556
|
}
|
|
550
557
|
let size = s.size;
|
|
551
|
-
size ??= this.cachedSize(
|
|
558
|
+
size ??= this.cachedSize(path2) ?? UNKNOWN_SIZE_SENTINEL;
|
|
552
559
|
cb(0, this.fileStat(size));
|
|
553
560
|
} catch (err) {
|
|
554
561
|
cb(classifyError(err));
|
|
555
562
|
}
|
|
556
563
|
})();
|
|
557
564
|
}
|
|
558
|
-
fgetattr(
|
|
565
|
+
fgetattr(path2, fd, cb) {
|
|
559
566
|
const ctx = this.handles.get(fd);
|
|
560
567
|
if (ctx?.data !== void 0) {
|
|
561
568
|
cb(0, this.fileStat(ctx.data.byteLength));
|
|
562
569
|
return;
|
|
563
570
|
}
|
|
564
|
-
this.getattr(
|
|
571
|
+
this.getattr(path2, cb);
|
|
565
572
|
}
|
|
566
|
-
readdir(
|
|
573
|
+
readdir(path2, cb) {
|
|
567
574
|
void (async () => {
|
|
568
|
-
if (
|
|
575
|
+
if (path2 === MIRAGE_DIR) {
|
|
569
576
|
cb(0, [".", "..", "whoami"]);
|
|
570
577
|
return;
|
|
571
578
|
}
|
|
572
|
-
const names = new Set(this.virtualChildren(
|
|
573
|
-
if (
|
|
579
|
+
const names = new Set(this.virtualChildren(path2));
|
|
580
|
+
if (path2 === "/") names.add(".mirage");
|
|
574
581
|
try {
|
|
575
|
-
const entries = await this.ws.fs.readdir(this.resolve(
|
|
582
|
+
const entries = await this.ws.fs.readdir(this.resolve(path2));
|
|
576
583
|
for (const e of entries) {
|
|
577
584
|
const part = rstripSlash(e).split("/").pop() ?? "";
|
|
578
585
|
if (part !== "" && !isMacosMetadata(part)) names.add(part);
|
|
@@ -586,9 +593,9 @@ var MirageFS = class {
|
|
|
586
593
|
cb(0, [".", "..", ...[...names].sort()]);
|
|
587
594
|
})();
|
|
588
595
|
}
|
|
589
|
-
read(
|
|
596
|
+
read(path2, fd, buf, len, pos, cb) {
|
|
590
597
|
void (async () => {
|
|
591
|
-
if (
|
|
598
|
+
if (path2 === MIRAGE_WHOAMI) {
|
|
592
599
|
const data = this.whoamiContent();
|
|
593
600
|
const slice = data.subarray(pos, pos + len);
|
|
594
601
|
buf.set(slice, 0);
|
|
@@ -598,10 +605,10 @@ var MirageFS = class {
|
|
|
598
605
|
const ctx = this.handles.get(fd);
|
|
599
606
|
try {
|
|
600
607
|
if (ctx !== void 0 && ctx.data === void 0) {
|
|
601
|
-
const cached = this.cachedData(
|
|
602
|
-
ctx.data = cached ?? await this.ws.fs.readFile(this.resolve(
|
|
608
|
+
const cached = this.cachedData(path2);
|
|
609
|
+
ctx.data = cached ?? await this.ws.fs.readFile(this.resolve(path2));
|
|
603
610
|
}
|
|
604
|
-
const data = ctx?.data ?? this.cachedData(
|
|
611
|
+
const data = ctx?.data ?? this.cachedData(path2) ?? await this.ws.fs.readFile(this.resolve(path2));
|
|
605
612
|
const slice = data.subarray(pos, pos + len);
|
|
606
613
|
buf.set(slice, 0);
|
|
607
614
|
cb(slice.byteLength);
|
|
@@ -610,7 +617,7 @@ var MirageFS = class {
|
|
|
610
617
|
}
|
|
611
618
|
})();
|
|
612
619
|
}
|
|
613
|
-
write(
|
|
620
|
+
write(path2, fd, buf, len, pos, cb) {
|
|
614
621
|
const ctx = this.handles.get(fd);
|
|
615
622
|
const data = new Uint8Array(buf.subarray(0, len));
|
|
616
623
|
if (ctx !== void 0) {
|
|
@@ -623,7 +630,7 @@ var MirageFS = class {
|
|
|
623
630
|
try {
|
|
624
631
|
let existing = new Uint8Array(0);
|
|
625
632
|
try {
|
|
626
|
-
existing = await this.ws.fs.readFile(this.resolve(
|
|
633
|
+
existing = await this.ws.fs.readFile(this.resolve(path2), { raw: true });
|
|
627
634
|
} catch {
|
|
628
635
|
}
|
|
629
636
|
let merged = existing;
|
|
@@ -642,45 +649,46 @@ var MirageFS = class {
|
|
|
642
649
|
}
|
|
643
650
|
merged = out;
|
|
644
651
|
}
|
|
645
|
-
await this.writeFile(
|
|
652
|
+
await this.writeFile(path2, merged);
|
|
646
653
|
cb(len);
|
|
647
654
|
} catch {
|
|
648
655
|
cb(0);
|
|
649
656
|
}
|
|
650
657
|
})();
|
|
651
658
|
}
|
|
652
|
-
create(
|
|
659
|
+
create(path2, _mode, cb) {
|
|
653
660
|
void (async () => {
|
|
654
661
|
try {
|
|
655
662
|
try {
|
|
656
|
-
await this.ws.dispatch("create", this.resolve(
|
|
663
|
+
await this.ws.dispatch("create", this.resolve(path2));
|
|
657
664
|
} catch (dispatchErr) {
|
|
658
665
|
const msg = (dispatchErr instanceof Error ? dispatchErr.message : String(dispatchErr)).toLowerCase();
|
|
659
666
|
if (!msg.includes("no op")) throw dispatchErr;
|
|
660
|
-
await this.writeFile(
|
|
667
|
+
await this.writeFile(path2, new Uint8Array(0));
|
|
661
668
|
}
|
|
662
669
|
const fh = this.nextFh++;
|
|
663
|
-
this.handles.set(fh, { path });
|
|
670
|
+
this.handles.set(fh, { path: path2 });
|
|
664
671
|
cb(0, fh);
|
|
665
672
|
} catch (err) {
|
|
666
673
|
cb(classifyError(err));
|
|
667
674
|
}
|
|
668
675
|
})();
|
|
669
676
|
}
|
|
670
|
-
mkdir(
|
|
677
|
+
mkdir(path2, _mode, cb) {
|
|
671
678
|
void (async () => {
|
|
672
679
|
try {
|
|
673
|
-
await this.ws.fs.mkdir(this.resolve(
|
|
680
|
+
await this.ws.fs.mkdir(this.resolve(path2));
|
|
674
681
|
cb(0);
|
|
675
682
|
} catch (err) {
|
|
676
683
|
cb(classifyError(err));
|
|
677
684
|
}
|
|
678
685
|
})();
|
|
679
686
|
}
|
|
680
|
-
unlink(
|
|
687
|
+
unlink(path2, cb) {
|
|
681
688
|
void (async () => {
|
|
682
689
|
try {
|
|
683
|
-
await this.ws.fs.unlink(this.resolve(
|
|
690
|
+
await this.ws.fs.unlink(this.resolve(path2));
|
|
691
|
+
this.xattrs.delete(path2);
|
|
684
692
|
cb(0);
|
|
685
693
|
} catch (err) {
|
|
686
694
|
cb(classifyError(err));
|
|
@@ -691,42 +699,48 @@ var MirageFS = class {
|
|
|
691
699
|
void (async () => {
|
|
692
700
|
try {
|
|
693
701
|
await this.ws.fs.rename(this.resolve(src), this.resolve(dst));
|
|
702
|
+
const moved = this.xattrs.get(src);
|
|
703
|
+
if (moved !== void 0) {
|
|
704
|
+
this.xattrs.delete(src);
|
|
705
|
+
this.xattrs.set(dst, moved);
|
|
706
|
+
}
|
|
694
707
|
cb(0);
|
|
695
708
|
} catch (err) {
|
|
696
709
|
cb(classifyError(err));
|
|
697
710
|
}
|
|
698
711
|
})();
|
|
699
712
|
}
|
|
700
|
-
rmdir(
|
|
713
|
+
rmdir(path2, cb) {
|
|
701
714
|
void (async () => {
|
|
702
715
|
try {
|
|
703
716
|
try {
|
|
704
|
-
const entries = await this.ws.fs.readdir(this.resolve(
|
|
717
|
+
const entries = await this.ws.fs.readdir(this.resolve(path2));
|
|
705
718
|
if (entries.length > 0) {
|
|
706
719
|
cb(ENOTEMPTY);
|
|
707
720
|
return;
|
|
708
721
|
}
|
|
709
722
|
} catch {
|
|
710
723
|
}
|
|
711
|
-
await this.ws.fs.rmdir(this.resolve(
|
|
724
|
+
await this.ws.fs.rmdir(this.resolve(path2));
|
|
725
|
+
this.xattrs.delete(path2);
|
|
712
726
|
cb(0);
|
|
713
727
|
} catch (err) {
|
|
714
728
|
cb(classifyError(err));
|
|
715
729
|
}
|
|
716
730
|
})();
|
|
717
731
|
}
|
|
718
|
-
truncate(
|
|
732
|
+
truncate(path2, size, cb) {
|
|
719
733
|
void (async () => {
|
|
720
734
|
try {
|
|
721
735
|
try {
|
|
722
|
-
await this.ws.dispatch("truncate", this.resolve(
|
|
736
|
+
await this.ws.dispatch("truncate", this.resolve(path2), [size]);
|
|
723
737
|
} catch (dispatchErr) {
|
|
724
738
|
const msg = (dispatchErr instanceof Error ? dispatchErr.message : String(dispatchErr)).toLowerCase();
|
|
725
739
|
if (!msg.includes("no op")) throw dispatchErr;
|
|
726
|
-
const data = await this.ws.fs.readFile(this.resolve(
|
|
740
|
+
const data = await this.ws.fs.readFile(this.resolve(path2), { raw: true }).catch(() => new Uint8Array(0));
|
|
727
741
|
const out = new Uint8Array(size);
|
|
728
742
|
out.set(data.subarray(0, Math.min(data.byteLength, size)), 0);
|
|
729
|
-
await this.writeFile(
|
|
743
|
+
await this.writeFile(path2, out);
|
|
730
744
|
}
|
|
731
745
|
cb(0);
|
|
732
746
|
} catch (err) {
|
|
@@ -750,36 +764,86 @@ var MirageFS = class {
|
|
|
750
764
|
// chmod / chown / utimens / access are no-ops for the filesystem but must
|
|
751
765
|
// validate path existence — callers like `touch`/`chmod` on a missing file
|
|
752
766
|
// should fail with ENOENT, not silently succeed.
|
|
753
|
-
chmod(
|
|
754
|
-
this.getattrValidate(
|
|
767
|
+
chmod(path2, _mode, cb) {
|
|
768
|
+
this.getattrValidate(path2, cb);
|
|
769
|
+
}
|
|
770
|
+
chown(path2, _uid, _gid, cb) {
|
|
771
|
+
this.getattrValidate(path2, cb);
|
|
772
|
+
}
|
|
773
|
+
utimens(path2, _atime, _mtime, cb) {
|
|
774
|
+
this.getattrValidate(path2, cb);
|
|
775
|
+
}
|
|
776
|
+
access(path2, _amode, cb) {
|
|
777
|
+
this.getattrValidate(path2, cb);
|
|
778
|
+
}
|
|
779
|
+
// Mirage backends (S3, etc.) have no POSIX extended attributes, so there is
|
|
780
|
+
// nothing to persist xattrs to. We keep them in memory per mount so tools that
|
|
781
|
+
// probe or set xattrs (sandbox runtimes, rsync -aX, tar --xattrs, cp -p, macOS
|
|
782
|
+
// Finder writing com.apple.*) succeed instead of failing with ENOTSUP. The
|
|
783
|
+
// values live only for the mount's lifetime and are never written to the
|
|
784
|
+
// backend.
|
|
785
|
+
setxattr(path2, name, value, _position, _flags, cb) {
|
|
786
|
+
this.getattr(path2, (code) => {
|
|
787
|
+
if (code !== 0) {
|
|
788
|
+
cb(code);
|
|
789
|
+
return;
|
|
790
|
+
}
|
|
791
|
+
let attrs = this.xattrs.get(path2);
|
|
792
|
+
if (attrs === void 0) {
|
|
793
|
+
attrs = /* @__PURE__ */ new Map();
|
|
794
|
+
this.xattrs.set(path2, attrs);
|
|
795
|
+
}
|
|
796
|
+
attrs.set(name, Buffer.from(value));
|
|
797
|
+
cb(0);
|
|
798
|
+
});
|
|
755
799
|
}
|
|
756
|
-
|
|
757
|
-
this.
|
|
800
|
+
getxattr(path2, name, _position, cb) {
|
|
801
|
+
this.getattr(path2, (code) => {
|
|
802
|
+
if (code !== 0) {
|
|
803
|
+
cb(code);
|
|
804
|
+
return;
|
|
805
|
+
}
|
|
806
|
+
cb(0, this.xattrs.get(path2)?.get(name));
|
|
807
|
+
});
|
|
758
808
|
}
|
|
759
|
-
|
|
760
|
-
this.
|
|
809
|
+
listxattr(path2, cb) {
|
|
810
|
+
this.getattr(path2, (code) => {
|
|
811
|
+
if (code !== 0) {
|
|
812
|
+
cb(code);
|
|
813
|
+
return;
|
|
814
|
+
}
|
|
815
|
+
const attrs = this.xattrs.get(path2);
|
|
816
|
+
cb(0, attrs ? [...attrs.keys()] : []);
|
|
817
|
+
});
|
|
761
818
|
}
|
|
762
|
-
|
|
763
|
-
this.
|
|
819
|
+
removexattr(path2, name, cb) {
|
|
820
|
+
this.getattr(path2, (code) => {
|
|
821
|
+
if (code !== 0) {
|
|
822
|
+
cb(code);
|
|
823
|
+
return;
|
|
824
|
+
}
|
|
825
|
+
this.xattrs.get(path2)?.delete(name);
|
|
826
|
+
cb(0);
|
|
827
|
+
});
|
|
764
828
|
}
|
|
765
|
-
getattrValidate(
|
|
766
|
-
this.getattr(
|
|
829
|
+
getattrValidate(path2, cb) {
|
|
830
|
+
this.getattr(path2, (code) => {
|
|
767
831
|
cb(code);
|
|
768
832
|
});
|
|
769
833
|
}
|
|
770
|
-
open(
|
|
834
|
+
open(path2, _flags, cb) {
|
|
771
835
|
void (async () => {
|
|
772
|
-
if (
|
|
836
|
+
if (path2 === MIRAGE_WHOAMI) {
|
|
773
837
|
const fh = this.nextFh++;
|
|
774
|
-
this.handles.set(fh, { path });
|
|
838
|
+
this.handles.set(fh, { path: path2 });
|
|
775
839
|
cb(0, fh);
|
|
776
840
|
return;
|
|
777
841
|
}
|
|
778
842
|
try {
|
|
779
|
-
const s = await this.ws.fs.stat(this.resolve(
|
|
780
|
-
const ctx = { path };
|
|
843
|
+
const s = await this.ws.fs.stat(this.resolve(path2));
|
|
844
|
+
const ctx = { path: path2 };
|
|
781
845
|
if (s.size === null && s.type !== FileType.DIRECTORY) {
|
|
782
|
-
const data = await this.prefetch(
|
|
846
|
+
const data = await this.prefetch(path2);
|
|
783
847
|
if (data !== null) ctx.data = data;
|
|
784
848
|
}
|
|
785
849
|
const fh = this.nextFh++;
|
|
@@ -794,7 +858,7 @@ var MirageFS = class {
|
|
|
794
858
|
this.handles.delete(fd);
|
|
795
859
|
cb(0);
|
|
796
860
|
}
|
|
797
|
-
flush(
|
|
861
|
+
flush(path2, fd, cb) {
|
|
798
862
|
const ctx = this.handles.get(fd);
|
|
799
863
|
if (ctx?.writeBuf === void 0 || ctx.writeBuf.length === 0) {
|
|
800
864
|
cb(0);
|
|
@@ -806,7 +870,7 @@ var MirageFS = class {
|
|
|
806
870
|
try {
|
|
807
871
|
let existing = new Uint8Array(0);
|
|
808
872
|
try {
|
|
809
|
-
existing = await this.ws.fs.readFile(this.resolve(
|
|
873
|
+
existing = await this.ws.fs.readFile(this.resolve(path2), { raw: true });
|
|
810
874
|
} catch {
|
|
811
875
|
}
|
|
812
876
|
let total = existing.byteLength;
|
|
@@ -818,15 +882,15 @@ var MirageFS = class {
|
|
|
818
882
|
for (const [off, chunk] of writes) {
|
|
819
883
|
merged.set(chunk, off);
|
|
820
884
|
}
|
|
821
|
-
await this.writeFile(
|
|
885
|
+
await this.writeFile(path2, merged);
|
|
822
886
|
cb(0);
|
|
823
887
|
} catch (err) {
|
|
824
888
|
cb(classifyError(err));
|
|
825
889
|
}
|
|
826
890
|
})();
|
|
827
891
|
}
|
|
828
|
-
fsync(
|
|
829
|
-
this.flush(
|
|
892
|
+
fsync(path2, _datasync, fd, cb) {
|
|
893
|
+
this.flush(path2, fd, cb);
|
|
830
894
|
}
|
|
831
895
|
};
|
|
832
896
|
|
|
@@ -859,11 +923,13 @@ function forceUnmount(mountpoint) {
|
|
|
859
923
|
async function mount(ws, options = {}) {
|
|
860
924
|
const Fuse = await loadFuse();
|
|
861
925
|
let mountpoint;
|
|
926
|
+
let ownsMountpoint = false;
|
|
862
927
|
if (options.mountpoint !== void 0) {
|
|
863
928
|
mkdirSync(options.mountpoint, { recursive: true });
|
|
864
929
|
mountpoint = options.mountpoint;
|
|
865
930
|
} else {
|
|
866
931
|
mountpoint = mkdtempSync(join(tmpdir(), "mirage-fuse-"));
|
|
932
|
+
ownsMountpoint = true;
|
|
867
933
|
}
|
|
868
934
|
const agentId = options.agentId;
|
|
869
935
|
const mfs = new MirageFS(ws, {
|
|
@@ -887,6 +953,7 @@ async function mount(ws, options = {}) {
|
|
|
887
953
|
});
|
|
888
954
|
return {
|
|
889
955
|
mountpoint,
|
|
956
|
+
ownsMountpoint,
|
|
890
957
|
unmount: () => new Promise((resolve, reject) => {
|
|
891
958
|
fuse.unmount((err) => {
|
|
892
959
|
if (err === null) resolve();
|
|
@@ -901,6 +968,13 @@ function mountBackground(ws, options = {}) {
|
|
|
901
968
|
|
|
902
969
|
// src/workspace/fuse.ts
|
|
903
970
|
var SIGNALS = ["SIGINT", "SIGTERM", "SIGHUP"];
|
|
971
|
+
function removeMountpointIfOwned(entry) {
|
|
972
|
+
if (!entry.ownsMountpoint) return;
|
|
973
|
+
try {
|
|
974
|
+
rmdirSync(entry.mountpoint);
|
|
975
|
+
} catch {
|
|
976
|
+
}
|
|
977
|
+
}
|
|
904
978
|
var FuseCleanupRegistry = class {
|
|
905
979
|
mounts = /* @__PURE__ */ new Set();
|
|
906
980
|
installed = false;
|
|
@@ -935,10 +1009,7 @@ var FuseCleanupRegistry = class {
|
|
|
935
1009
|
drainSync() {
|
|
936
1010
|
for (const entry of this.mounts) {
|
|
937
1011
|
forceUnmount(entry.mountpoint);
|
|
938
|
-
|
|
939
|
-
rmSync(entry.mountpoint, { recursive: true, force: true });
|
|
940
|
-
} catch {
|
|
941
|
-
}
|
|
1012
|
+
removeMountpointIfOwned(entry);
|
|
942
1013
|
}
|
|
943
1014
|
this.mounts.clear();
|
|
944
1015
|
}
|
|
@@ -946,61 +1017,81 @@ var FuseCleanupRegistry = class {
|
|
|
946
1017
|
var CLEANUP = new FuseCleanupRegistry();
|
|
947
1018
|
var FuseManager = class {
|
|
948
1019
|
handle = null;
|
|
949
|
-
externalMountpoint = null;
|
|
950
|
-
auto = false;
|
|
951
1020
|
cleanupEntry = null;
|
|
952
1021
|
get mountpoint() {
|
|
953
|
-
|
|
954
|
-
return this.externalMountpoint;
|
|
955
|
-
}
|
|
956
|
-
set mountpoint(path) {
|
|
957
|
-
this.externalMountpoint = path;
|
|
1022
|
+
return this.handle?.mountpoint ?? null;
|
|
958
1023
|
}
|
|
959
1024
|
async setup(ws, options = {}) {
|
|
960
1025
|
if (this.handle !== null) return this.handle.mountpoint;
|
|
961
|
-
|
|
962
|
-
this.
|
|
963
|
-
this.
|
|
964
|
-
|
|
1026
|
+
const handle = await mount(ws, options);
|
|
1027
|
+
this.handle = handle;
|
|
1028
|
+
this.cleanupEntry = {
|
|
1029
|
+
mountpoint: handle.mountpoint,
|
|
1030
|
+
handle,
|
|
1031
|
+
// Preserve the ownership decision made by mount(); unmount cleanup must
|
|
1032
|
+
// not infer ownership from path shape or whether the directory exists.
|
|
1033
|
+
ownsMountpoint: handle.ownsMountpoint
|
|
1034
|
+
};
|
|
965
1035
|
CLEANUP.register(this.cleanupEntry);
|
|
966
|
-
|
|
967
|
-
return this.handle.mountpoint;
|
|
1036
|
+
return handle.mountpoint;
|
|
968
1037
|
}
|
|
969
|
-
async unmount(
|
|
1038
|
+
async unmount() {
|
|
970
1039
|
if (this.handle === null) {
|
|
971
|
-
if (ws !== void 0) ws.setFuseMountpoint(null);
|
|
972
|
-
this.externalMountpoint = null;
|
|
973
1040
|
return;
|
|
974
1041
|
}
|
|
975
1042
|
const mp = this.handle.mountpoint;
|
|
976
1043
|
try {
|
|
977
1044
|
await this.handle.unmount();
|
|
978
1045
|
} finally {
|
|
979
|
-
|
|
980
|
-
|
|
1046
|
+
const cleanupEntry = this.cleanupEntry;
|
|
1047
|
+
if (cleanupEntry !== null) {
|
|
1048
|
+
CLEANUP.unregister(cleanupEntry);
|
|
981
1049
|
this.cleanupEntry = null;
|
|
982
1050
|
}
|
|
983
1051
|
this.handle = null;
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
} catch {
|
|
989
|
-
}
|
|
1052
|
+
removeMountpointIfOwned({
|
|
1053
|
+
mountpoint: mp,
|
|
1054
|
+
ownsMountpoint: cleanupEntry?.ownsMountpoint ?? false
|
|
1055
|
+
});
|
|
990
1056
|
}
|
|
991
1057
|
}
|
|
992
|
-
async close(
|
|
993
|
-
|
|
1058
|
+
async close() {
|
|
1059
|
+
await this.unmount();
|
|
994
1060
|
}
|
|
995
1061
|
};
|
|
996
1062
|
|
|
997
|
-
// src/workspace.ts
|
|
1063
|
+
// src/workspace/mount_spec.ts
|
|
1064
|
+
var Mount = class {
|
|
1065
|
+
constructor(resource, options = {}) {
|
|
1066
|
+
this.resource = resource;
|
|
1067
|
+
this.options = options;
|
|
1068
|
+
}
|
|
1069
|
+
resource;
|
|
1070
|
+
options;
|
|
1071
|
+
};
|
|
1072
|
+
|
|
1073
|
+
// src/compression_codecs.ts
|
|
1074
|
+
import { createRequire } from "module";
|
|
1075
|
+
import { registerCompressionCodec } from "@struktoai/mirage-core";
|
|
998
1076
|
var requireCjs = createRequire(import.meta.url);
|
|
1077
|
+
var { Bzip2 } = requireCjs("compressjs");
|
|
1078
|
+
var { xz } = requireCjs("@napi-rs/lzma");
|
|
1079
|
+
registerCompressionCodec("bzip2", {
|
|
1080
|
+
compress: (bytes) => Promise.resolve(Uint8Array.from(Bzip2.compressFile(bytes))),
|
|
1081
|
+
decompress: (bytes) => Promise.resolve(Uint8Array.from(Bzip2.decompressFile(bytes)))
|
|
1082
|
+
});
|
|
1083
|
+
registerCompressionCodec("xz", {
|
|
1084
|
+
compress: async (bytes) => new Uint8Array(await xz.compress(Buffer.from(bytes))),
|
|
1085
|
+
decompress: async (bytes) => new Uint8Array(await xz.decompress(Buffer.from(bytes)))
|
|
1086
|
+
});
|
|
1087
|
+
|
|
1088
|
+
// src/workspace.ts
|
|
1089
|
+
var requireCjs2 = createRequire2(import.meta.url);
|
|
999
1090
|
var cachedParser = null;
|
|
1000
1091
|
function loadShellParser() {
|
|
1001
1092
|
if (cachedParser !== null) return cachedParser;
|
|
1002
|
-
const enginePath =
|
|
1003
|
-
const grammarPath =
|
|
1093
|
+
const enginePath = requireCjs2.resolve("web-tree-sitter/web-tree-sitter.wasm");
|
|
1094
|
+
const grammarPath = requireCjs2.resolve("tree-sitter-bash/tree-sitter-bash.wasm");
|
|
1004
1095
|
cachedParser = createShellParser({
|
|
1005
1096
|
engineWasm: readFileSync(enginePath),
|
|
1006
1097
|
grammarWasm: readFileSync(grammarPath)
|
|
@@ -1008,29 +1099,38 @@ function loadShellParser() {
|
|
|
1008
1099
|
return cachedParser;
|
|
1009
1100
|
}
|
|
1010
1101
|
var Workspace = class extends CoreWorkspace {
|
|
1011
|
-
autoFuseManagers = /* @__PURE__ */ new Map();
|
|
1012
|
-
fuseMountpointsMap = /* @__PURE__ */ new Map();
|
|
1013
1102
|
fuseSetupPromise = null;
|
|
1103
|
+
fuseMountpointsMap = /* @__PURE__ */ new Map();
|
|
1104
|
+
fuseManagers = /* @__PURE__ */ new Map();
|
|
1014
1105
|
constructor(resources, options = {}) {
|
|
1015
|
-
|
|
1106
|
+
const bareResources = {};
|
|
1107
|
+
const modeOverrides = { ...options.modeOverrides ?? {} };
|
|
1108
|
+
const commandSafeguards = {
|
|
1109
|
+
...options.commandSafeguards ?? {}
|
|
1110
|
+
};
|
|
1111
|
+
const fuseTargets = [];
|
|
1112
|
+
for (const [prefix, value] of Object.entries(resources)) {
|
|
1113
|
+
if (value instanceof Mount) {
|
|
1114
|
+
bareResources[prefix] = value.resource;
|
|
1115
|
+
if (value.options.mode !== void 0) modeOverrides[prefix] = value.options.mode;
|
|
1116
|
+
if (value.options.commandSafeguards !== void 0)
|
|
1117
|
+
commandSafeguards[prefix] = value.options.commandSafeguards;
|
|
1118
|
+
if (value.options.fuse !== void 0 && value.options.fuse !== false)
|
|
1119
|
+
fuseTargets.push([prefix, value.options.fuse]);
|
|
1120
|
+
} else {
|
|
1121
|
+
bareResources[prefix] = value;
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
super(bareResources, {
|
|
1016
1125
|
...options,
|
|
1126
|
+
...Object.keys(modeOverrides).length > 0 ? { modeOverrides } : {},
|
|
1127
|
+
...Object.keys(commandSafeguards).length > 0 ? { commandSafeguards } : {},
|
|
1017
1128
|
shellParserFactory: options.shellParserFactory ?? loadShellParser
|
|
1018
1129
|
});
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
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
|
-
},
|
|
1130
|
+
if (fuseTargets.length > 0) {
|
|
1131
|
+
const setups = fuseTargets.map(
|
|
1132
|
+
([prefix, target]) => this.addFuseMount(prefix, typeof target === "string" ? target : void 0).then(
|
|
1133
|
+
() => void 0,
|
|
1034
1134
|
(err) => {
|
|
1035
1135
|
process.stderr.write(
|
|
1036
1136
|
`mirage: FUSE auto-mount failed for ${prefix}, continuing without it: ${err instanceof Error ? err.message : String(err)}
|
|
@@ -1039,41 +1139,226 @@ var Workspace = class extends CoreWorkspace {
|
|
|
1039
1139
|
}
|
|
1040
1140
|
)
|
|
1041
1141
|
);
|
|
1042
|
-
}
|
|
1043
|
-
if (setups.length > 0) {
|
|
1044
1142
|
this.fuseSetupPromise = Promise.all(setups).then(() => void 0);
|
|
1045
1143
|
}
|
|
1046
1144
|
}
|
|
1047
|
-
|
|
1145
|
+
registerFuseMount(prefix, mountpoint) {
|
|
1146
|
+
for (const [otherPrefix, otherMp] of this.fuseMountpointsMap) {
|
|
1147
|
+
if (otherMp === mountpoint && otherPrefix !== prefix) {
|
|
1148
|
+
throw new Error(
|
|
1149
|
+
`FUSE mountpoint ${mountpoint} already used by prefix ${otherPrefix}; mounts need distinct paths`
|
|
1150
|
+
);
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
this.fuseMountpointsMap.set(prefix, mountpoint);
|
|
1154
|
+
}
|
|
1155
|
+
/**
|
|
1156
|
+
* Mount a workspace subtree under FUSE and own its lifecycle. Each mount gets
|
|
1157
|
+
* its own {@link FuseManager}, so a workspace can expose any number of FUSE
|
|
1158
|
+
* subtrees at once. A pinned mountpoint is collision-checked BEFORE mounting,
|
|
1159
|
+
* so a clash never leaves a partial kernel mount.
|
|
1160
|
+
*/
|
|
1161
|
+
async addFuseMount(prefix, mountpoint) {
|
|
1162
|
+
if (mountpoint !== void 0) this.registerFuseMount(prefix, mountpoint);
|
|
1163
|
+
const fm = new FuseManager();
|
|
1164
|
+
this.fuseManagers.set(prefix, fm);
|
|
1165
|
+
try {
|
|
1166
|
+
const mp = await fm.setup(this, {
|
|
1167
|
+
rootPrefix: prefix,
|
|
1168
|
+
...mountpoint !== void 0 ? { mountpoint } : {}
|
|
1169
|
+
});
|
|
1170
|
+
if (mountpoint === void 0) this.registerFuseMount(prefix, mp);
|
|
1171
|
+
return mp;
|
|
1172
|
+
} catch (err) {
|
|
1173
|
+
this.fuseManagers.delete(prefix);
|
|
1174
|
+
this.fuseMountpointsMap.delete(prefix);
|
|
1175
|
+
throw err;
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
async removeFuseMount(prefix) {
|
|
1179
|
+
const fm = this.fuseManagers.get(prefix);
|
|
1180
|
+
this.fuseManagers.delete(prefix);
|
|
1181
|
+
if (fm !== void 0) await fm.unmount();
|
|
1182
|
+
this.fuseMountpointsMap.delete(prefix);
|
|
1183
|
+
}
|
|
1048
1184
|
get fuseMountpoints() {
|
|
1049
1185
|
return Object.fromEntries(this.fuseMountpointsMap);
|
|
1050
1186
|
}
|
|
1051
|
-
|
|
1187
|
+
get fuseMountpoint() {
|
|
1188
|
+
if (this.fuseMountpointsMap.size === 0) return null;
|
|
1189
|
+
if (this.fuseMountpointsMap.size > 1) {
|
|
1190
|
+
throw new Error("multiple FUSE mounts active; use fuseMountpoints to select one by prefix");
|
|
1191
|
+
}
|
|
1192
|
+
return this.fuseMountpointsMap.values().next().value ?? null;
|
|
1193
|
+
}
|
|
1194
|
+
/** Await the eager per-mount fuse mounts started in the constructor. */
|
|
1195
|
+
async fuseReady() {
|
|
1052
1196
|
if (this.fuseSetupPromise !== null) {
|
|
1053
1197
|
await this.fuseSetupPromise;
|
|
1054
1198
|
this.fuseSetupPromise = null;
|
|
1055
1199
|
}
|
|
1056
1200
|
}
|
|
1057
1201
|
async execute(command, options = {}) {
|
|
1058
|
-
await this.
|
|
1202
|
+
await this.fuseReady();
|
|
1059
1203
|
return super.execute(command, options);
|
|
1060
1204
|
}
|
|
1061
1205
|
async close() {
|
|
1062
|
-
await this.
|
|
1063
|
-
for (const fm of this.
|
|
1064
|
-
|
|
1065
|
-
|
|
1206
|
+
await this.fuseReady().catch(() => void 0);
|
|
1207
|
+
for (const fm of this.fuseManagers.values()) await fm.unmount();
|
|
1208
|
+
this.fuseManagers.clear();
|
|
1209
|
+
this.fuseMountpointsMap.clear();
|
|
1066
1210
|
await super.close();
|
|
1067
1211
|
}
|
|
1068
1212
|
};
|
|
1069
1213
|
|
|
1214
|
+
// src/observe/disk_store.ts
|
|
1215
|
+
import { appendFile, mkdir, readdir, readFile, rmdir, unlink, writeFile } from "fs/promises";
|
|
1216
|
+
import path from "path";
|
|
1217
|
+
var DiskObserverStore = class {
|
|
1218
|
+
root;
|
|
1219
|
+
constructor(root) {
|
|
1220
|
+
this.root = root;
|
|
1221
|
+
}
|
|
1222
|
+
abs(key) {
|
|
1223
|
+
return path.join(this.root, key.replace(/^\/+/, ""));
|
|
1224
|
+
}
|
|
1225
|
+
async append(key, data) {
|
|
1226
|
+
const absPath = this.abs(key);
|
|
1227
|
+
await mkdir(path.dirname(absPath), { recursive: true });
|
|
1228
|
+
await appendFile(absPath, data);
|
|
1229
|
+
}
|
|
1230
|
+
async write(key, data) {
|
|
1231
|
+
const absPath = this.abs(key);
|
|
1232
|
+
await mkdir(path.dirname(absPath), { recursive: true });
|
|
1233
|
+
await writeFile(absPath, data);
|
|
1234
|
+
}
|
|
1235
|
+
readAll() {
|
|
1236
|
+
return this.readMatching("");
|
|
1237
|
+
}
|
|
1238
|
+
async readMatching(suffix) {
|
|
1239
|
+
const out = /* @__PURE__ */ new Map();
|
|
1240
|
+
const { files } = await this.walk();
|
|
1241
|
+
for (const absPath of files) {
|
|
1242
|
+
const rel = "/" + path.relative(this.root, absPath);
|
|
1243
|
+
if (!rel.endsWith(suffix)) continue;
|
|
1244
|
+
out.set(rel, new Uint8Array(await readFile(absPath)));
|
|
1245
|
+
}
|
|
1246
|
+
return out;
|
|
1247
|
+
}
|
|
1248
|
+
async clear() {
|
|
1249
|
+
const { files, dirs } = await this.walk();
|
|
1250
|
+
for (const absPath of files) await unlink(absPath);
|
|
1251
|
+
for (const d of [...dirs].reverse()) await rmdir(d);
|
|
1252
|
+
}
|
|
1253
|
+
close() {
|
|
1254
|
+
return Promise.resolve();
|
|
1255
|
+
}
|
|
1256
|
+
async walk() {
|
|
1257
|
+
const files = [];
|
|
1258
|
+
const dirs = [];
|
|
1259
|
+
const stack = [this.root];
|
|
1260
|
+
while (stack.length > 0) {
|
|
1261
|
+
const d = stack.pop();
|
|
1262
|
+
if (d === void 0) break;
|
|
1263
|
+
let entries;
|
|
1264
|
+
try {
|
|
1265
|
+
entries = await readdir(d, { withFileTypes: true });
|
|
1266
|
+
} catch {
|
|
1267
|
+
continue;
|
|
1268
|
+
}
|
|
1269
|
+
dirs.push(d);
|
|
1270
|
+
for (const entry of entries) {
|
|
1271
|
+
const full = path.join(d, entry.name);
|
|
1272
|
+
if (entry.isDirectory()) stack.push(full);
|
|
1273
|
+
else files.push(full);
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
return { files, dirs };
|
|
1277
|
+
}
|
|
1278
|
+
};
|
|
1279
|
+
|
|
1280
|
+
// src/observe/redis_store.ts
|
|
1281
|
+
var RedisObserverStore = class {
|
|
1282
|
+
url;
|
|
1283
|
+
prefix;
|
|
1284
|
+
indexKey;
|
|
1285
|
+
clientPromise = null;
|
|
1286
|
+
constructor(options = {}) {
|
|
1287
|
+
this.url = options.url ?? "redis://localhost:6379/0";
|
|
1288
|
+
this.prefix = options.keyPrefix ?? "mirage:observer:";
|
|
1289
|
+
this.indexKey = `${this.prefix}keys`;
|
|
1290
|
+
}
|
|
1291
|
+
async client() {
|
|
1292
|
+
this.clientPromise ??= (async () => {
|
|
1293
|
+
const mod = await loadOptionalPeer(
|
|
1294
|
+
() => import("redis"),
|
|
1295
|
+
{ feature: "RedisObserverStore", packageName: "redis" }
|
|
1296
|
+
);
|
|
1297
|
+
const c = mod.createClient({
|
|
1298
|
+
url: this.url,
|
|
1299
|
+
socket: { reconnectStrategy: false }
|
|
1300
|
+
});
|
|
1301
|
+
await c.connect();
|
|
1302
|
+
return c;
|
|
1303
|
+
})();
|
|
1304
|
+
return this.clientPromise;
|
|
1305
|
+
}
|
|
1306
|
+
async append(key, data) {
|
|
1307
|
+
const c = await this.client();
|
|
1308
|
+
const buf = Buffer.from(data.buffer, data.byteOffset, data.byteLength);
|
|
1309
|
+
await c.multi().append(`${this.prefix}${key}`, buf).sAdd(this.indexKey, key).exec();
|
|
1310
|
+
}
|
|
1311
|
+
async write(key, data) {
|
|
1312
|
+
const c = await this.client();
|
|
1313
|
+
const buf = Buffer.from(data.buffer, data.byteOffset, data.byteLength);
|
|
1314
|
+
await c.multi().set(`${this.prefix}${key}`, buf).sAdd(this.indexKey, key).exec();
|
|
1315
|
+
}
|
|
1316
|
+
readAll() {
|
|
1317
|
+
return this.readMatching("");
|
|
1318
|
+
}
|
|
1319
|
+
async readMatching(suffix) {
|
|
1320
|
+
const paths = (await this.indexedPaths()).filter((p) => p.endsWith(suffix));
|
|
1321
|
+
return this.readPaths(paths);
|
|
1322
|
+
}
|
|
1323
|
+
async indexedPaths() {
|
|
1324
|
+
const c = await this.client();
|
|
1325
|
+
const members = await c.sMembers(this.indexKey);
|
|
1326
|
+
return [...members].sort();
|
|
1327
|
+
}
|
|
1328
|
+
async readPaths(paths) {
|
|
1329
|
+
const out = /* @__PURE__ */ new Map();
|
|
1330
|
+
if (paths.length === 0) return out;
|
|
1331
|
+
const c = await this.client();
|
|
1332
|
+
const mod = await import("redis");
|
|
1333
|
+
const mapping = { [mod.RESP_TYPES.BLOB_STRING]: Buffer };
|
|
1334
|
+
const typed = c;
|
|
1335
|
+
const values = await typed.withTypeMapping(mapping).mGet(paths.map((p) => `${this.prefix}${p}`));
|
|
1336
|
+
paths.forEach((p, i) => {
|
|
1337
|
+
const raw = values[i];
|
|
1338
|
+
out.set(p, raw === null || raw === void 0 ? new Uint8Array() : new Uint8Array(raw));
|
|
1339
|
+
});
|
|
1340
|
+
return out;
|
|
1341
|
+
}
|
|
1342
|
+
async clear() {
|
|
1343
|
+
const c = await this.client();
|
|
1344
|
+
const paths = await this.indexedPaths();
|
|
1345
|
+
const keys = [...paths.map((p) => `${this.prefix}${p}`), this.indexKey];
|
|
1346
|
+
if (keys.length > 0) await c.del(keys);
|
|
1347
|
+
}
|
|
1348
|
+
async close() {
|
|
1349
|
+
if (this.clientPromise === null) return;
|
|
1350
|
+
const c = await this.clientPromise;
|
|
1351
|
+
await c.quit();
|
|
1352
|
+
}
|
|
1353
|
+
};
|
|
1354
|
+
|
|
1070
1355
|
// src/fs_monkey.ts
|
|
1071
1356
|
import { Buffer as Buffer2 } from "buffer";
|
|
1072
|
-
import { createRequire as
|
|
1357
|
+
import { createRequire as createRequire3 } from "module";
|
|
1073
1358
|
import { FileType as FileType2 } from "@struktoai/mirage-core";
|
|
1074
|
-
var
|
|
1075
|
-
var fs =
|
|
1076
|
-
var fsMonkey =
|
|
1359
|
+
var requireCjs3 = createRequire3(import.meta.url);
|
|
1360
|
+
var fs = requireCjs3("node:fs");
|
|
1361
|
+
var fsMonkey = requireCjs3("fs-monkey");
|
|
1077
1362
|
var { patchFs } = fsMonkey;
|
|
1078
1363
|
function mountedPath(ws, p) {
|
|
1079
1364
|
try {
|
|
@@ -1501,7 +1786,7 @@ var LanceDBStore = class {
|
|
|
1501
1786
|
var REMOTE_SCHEMES = ["s3://", "gs://", "az://", "hf://", "db://"];
|
|
1502
1787
|
var LanceDBResource = class extends BaseResource {
|
|
1503
1788
|
kind = ResourceName.LANCEDB;
|
|
1504
|
-
|
|
1789
|
+
cachesReads;
|
|
1505
1790
|
indexTtl = 0;
|
|
1506
1791
|
prompt = LANCEDB_PROMPT;
|
|
1507
1792
|
config;
|
|
@@ -1511,7 +1796,7 @@ var LanceDBResource = class extends BaseResource {
|
|
|
1511
1796
|
super();
|
|
1512
1797
|
const config = "config" in options ? options.config : options;
|
|
1513
1798
|
this.config = resolveLanceDBConfig(config);
|
|
1514
|
-
this.
|
|
1799
|
+
this.cachesReads = REMOTE_SCHEMES.some((scheme) => this.config.uri.startsWith(scheme));
|
|
1515
1800
|
this.store = new LanceDBStore(this.config);
|
|
1516
1801
|
this.accessor = new LanceDBAccessor(this.store, this.config);
|
|
1517
1802
|
}
|
|
@@ -1546,207 +1831,207 @@ var REGISTRY = {
|
|
|
1546
1831
|
return new RAMResource();
|
|
1547
1832
|
},
|
|
1548
1833
|
disk: async (config) => {
|
|
1549
|
-
const { DiskResource: DiskResource2 } = await import("./disk-
|
|
1834
|
+
const { DiskResource: DiskResource2 } = await import("./disk-XVLBCVKE.js");
|
|
1550
1835
|
const norm = normalizeFields(config);
|
|
1551
1836
|
return new DiskResource2(norm);
|
|
1552
1837
|
},
|
|
1553
1838
|
redis: async (config) => {
|
|
1554
|
-
const { RedisResource: RedisResource2 } = await import("./redis-
|
|
1839
|
+
const { RedisResource: RedisResource2 } = await import("./redis-V5ULXULL.js");
|
|
1555
1840
|
const norm = normalizeFields(config);
|
|
1556
1841
|
return new RedisResource2(norm);
|
|
1557
1842
|
},
|
|
1558
1843
|
s3: async (config) => {
|
|
1559
|
-
const { S3Resource: S3Resource2 } = await import("./s3-
|
|
1844
|
+
const { S3Resource: S3Resource2 } = await import("./s3-4OIOCAAT.js");
|
|
1560
1845
|
const { normalizeS3Config } = await import("./config-QWCY3LBQ.js");
|
|
1561
1846
|
return new S3Resource2(normalizeS3Config(config));
|
|
1562
1847
|
},
|
|
1563
1848
|
gcs: async (config) => {
|
|
1564
|
-
const { GCSResource: GCSResource2 } = await import("./gcs-
|
|
1849
|
+
const { GCSResource: GCSResource2 } = await import("./gcs-EMEYU2XT.js");
|
|
1565
1850
|
const { normalizeGcsConfig } = await import("./config-VM526IKB.js");
|
|
1566
1851
|
return new GCSResource2(normalizeGcsConfig(config));
|
|
1567
1852
|
},
|
|
1568
1853
|
oci: async (config) => {
|
|
1569
|
-
const { OCIResource: OCIResource2 } = await import("./oci-
|
|
1854
|
+
const { OCIResource: OCIResource2 } = await import("./oci-ZLVECXTW.js");
|
|
1570
1855
|
const { normalizeOciConfig } = await import("./config-KYTRXAB2.js");
|
|
1571
1856
|
return new OCIResource2(normalizeOciConfig(config));
|
|
1572
1857
|
},
|
|
1573
1858
|
r2: async (config) => {
|
|
1574
|
-
const { R2Resource: R2Resource2 } = await import("./r2-
|
|
1859
|
+
const { R2Resource: R2Resource2 } = await import("./r2-RPK25ANI.js");
|
|
1575
1860
|
const { normalizeR2Config } = await import("./config-KMVCVBYN.js");
|
|
1576
1861
|
return new R2Resource2(normalizeR2Config(config));
|
|
1577
1862
|
},
|
|
1578
1863
|
hf_buckets: async (config) => {
|
|
1579
|
-
const { HfBucketsResource: HfBucketsResource2 } = await import("./hf_buckets-
|
|
1864
|
+
const { HfBucketsResource: HfBucketsResource2 } = await import("./hf_buckets-DTKXKKFF.js");
|
|
1580
1865
|
const { normalizeHfBucketsConfig: normalizeHfBucketsConfig2 } = await import("./config-CVZ2AGCO.js");
|
|
1581
1866
|
return new HfBucketsResource2(normalizeHfBucketsConfig2(config));
|
|
1582
1867
|
},
|
|
1583
1868
|
hf_datasets: async (config) => {
|
|
1584
|
-
const { HfDatasetsResource: HfDatasetsResource2 } = await import("./hf_datasets-
|
|
1869
|
+
const { HfDatasetsResource: HfDatasetsResource2 } = await import("./hf_datasets-55C4APKR.js");
|
|
1585
1870
|
const { normalizeHfRepoConfig: normalizeHfRepoConfig2 } = await import("./config-CVZ2AGCO.js");
|
|
1586
1871
|
return new HfDatasetsResource2(normalizeHfRepoConfig2(config));
|
|
1587
1872
|
},
|
|
1588
1873
|
hf_models: async (config) => {
|
|
1589
|
-
const { HfModelsResource: HfModelsResource2 } = await import("./hf_models-
|
|
1874
|
+
const { HfModelsResource: HfModelsResource2 } = await import("./hf_models-RO5JR36V.js");
|
|
1590
1875
|
const { normalizeHfRepoConfig: normalizeHfRepoConfig2 } = await import("./config-CVZ2AGCO.js");
|
|
1591
1876
|
return new HfModelsResource2(normalizeHfRepoConfig2(config));
|
|
1592
1877
|
},
|
|
1593
1878
|
hf_spaces: async (config) => {
|
|
1594
|
-
const { HfSpacesResource: HfSpacesResource2 } = await import("./hf_spaces-
|
|
1879
|
+
const { HfSpacesResource: HfSpacesResource2 } = await import("./hf_spaces-ZVZ3EDRX.js");
|
|
1595
1880
|
const { normalizeHfRepoConfig: normalizeHfRepoConfig2 } = await import("./config-CVZ2AGCO.js");
|
|
1596
1881
|
return new HfSpacesResource2(normalizeHfRepoConfig2(config));
|
|
1597
1882
|
},
|
|
1598
1883
|
supabase: async (config) => {
|
|
1599
|
-
const { SupabaseResource: SupabaseResource2 } = await import("./supabase-
|
|
1884
|
+
const { SupabaseResource: SupabaseResource2 } = await import("./supabase-6CFTOKGZ.js");
|
|
1600
1885
|
const { normalizeSupabaseConfig } = await import("./config-GE4W4ZJC.js");
|
|
1601
1886
|
return new SupabaseResource2(normalizeSupabaseConfig(config));
|
|
1602
1887
|
},
|
|
1603
1888
|
databricks_volume: async (config) => {
|
|
1604
|
-
const { DatabricksVolumeResource: DatabricksVolumeResource2 } = await import("./databricks_volume-
|
|
1889
|
+
const { DatabricksVolumeResource: DatabricksVolumeResource2 } = await import("./databricks_volume-7XOUYSTY.js");
|
|
1605
1890
|
const { normalizeDatabricksVolumeConfig } = await import("@struktoai/mirage-core");
|
|
1606
1891
|
return DatabricksVolumeResource2.create(normalizeDatabricksVolumeConfig(config));
|
|
1607
1892
|
},
|
|
1608
1893
|
minio: async (config) => {
|
|
1609
|
-
const { MinIOResource: MinIOResource2 } = await import("./minio-
|
|
1894
|
+
const { MinIOResource: MinIOResource2 } = await import("./minio-HZ576XFQ.js");
|
|
1610
1895
|
const { normalizeMinIOConfig } = await import("./config-34LHOGLM.js");
|
|
1611
1896
|
return new MinIOResource2(normalizeMinIOConfig(config));
|
|
1612
1897
|
},
|
|
1613
1898
|
ceph: async (config) => {
|
|
1614
|
-
const { CephResource: CephResource2 } = await import("./ceph-
|
|
1899
|
+
const { CephResource: CephResource2 } = await import("./ceph-S2VOYO6G.js");
|
|
1615
1900
|
const { normalizeCephConfig } = await import("./config-ZFJYQZCH.js");
|
|
1616
1901
|
return new CephResource2(normalizeCephConfig(config));
|
|
1617
1902
|
},
|
|
1618
1903
|
seaweedfs: async (config) => {
|
|
1619
|
-
const { SeaweedFSResource: SeaweedFSResource2 } = await import("./seaweedfs-
|
|
1904
|
+
const { SeaweedFSResource: SeaweedFSResource2 } = await import("./seaweedfs-QSWKF2FN.js");
|
|
1620
1905
|
const { normalizeSeaweedFSConfig } = await import("./config-GHRUKEQ6.js");
|
|
1621
1906
|
return new SeaweedFSResource2(normalizeSeaweedFSConfig(config));
|
|
1622
1907
|
},
|
|
1623
1908
|
wasabi: async (config) => {
|
|
1624
|
-
const { WasabiResource: WasabiResource2 } = await import("./wasabi-
|
|
1909
|
+
const { WasabiResource: WasabiResource2 } = await import("./wasabi-6Z4DC5S5.js");
|
|
1625
1910
|
const { normalizeWasabiConfig } = await import("./config-QAA646XB.js");
|
|
1626
1911
|
return new WasabiResource2(normalizeWasabiConfig(config));
|
|
1627
1912
|
},
|
|
1628
1913
|
backblaze: async (config) => {
|
|
1629
|
-
const { BackblazeResource: BackblazeResource2 } = await import("./backblaze-
|
|
1914
|
+
const { BackblazeResource: BackblazeResource2 } = await import("./backblaze-TDFD23QO.js");
|
|
1630
1915
|
const { normalizeBackblazeConfig } = await import("./config-WDAZFXYD.js");
|
|
1631
1916
|
return new BackblazeResource2(normalizeBackblazeConfig(config));
|
|
1632
1917
|
},
|
|
1633
1918
|
digitalocean: async (config) => {
|
|
1634
|
-
const { DigitalOceanResource: DigitalOceanResource2 } = await import("./digitalocean-
|
|
1919
|
+
const { DigitalOceanResource: DigitalOceanResource2 } = await import("./digitalocean-3CQ4CPPZ.js");
|
|
1635
1920
|
const { normalizeDigitalOceanConfig } = await import("./config-Q45Y46YT.js");
|
|
1636
1921
|
return new DigitalOceanResource2(normalizeDigitalOceanConfig(config));
|
|
1637
1922
|
},
|
|
1638
1923
|
tencent: async (config) => {
|
|
1639
|
-
const { TencentResource: TencentResource2 } = await import("./tencent-
|
|
1924
|
+
const { TencentResource: TencentResource2 } = await import("./tencent-IWZZOSQ4.js");
|
|
1640
1925
|
const { normalizeTencentConfig } = await import("./config-QNMKWJ4M.js");
|
|
1641
1926
|
return new TencentResource2(normalizeTencentConfig(config));
|
|
1642
1927
|
},
|
|
1643
1928
|
aliyun: async (config) => {
|
|
1644
|
-
const { AliyunResource: AliyunResource2 } = await import("./aliyun-
|
|
1929
|
+
const { AliyunResource: AliyunResource2 } = await import("./aliyun-JMJ3PFYY.js");
|
|
1645
1930
|
const { normalizeAliyunConfig } = await import("./config-HKRMKD76.js");
|
|
1646
1931
|
return new AliyunResource2(normalizeAliyunConfig(config));
|
|
1647
1932
|
},
|
|
1648
1933
|
scaleway: async (config) => {
|
|
1649
|
-
const { ScalewayResource: ScalewayResource2 } = await import("./scaleway-
|
|
1934
|
+
const { ScalewayResource: ScalewayResource2 } = await import("./scaleway-CCWCLUHB.js");
|
|
1650
1935
|
const { normalizeScalewayConfig } = await import("./config-EO23EY62.js");
|
|
1651
1936
|
return new ScalewayResource2(normalizeScalewayConfig(config));
|
|
1652
1937
|
},
|
|
1653
1938
|
qingstor: async (config) => {
|
|
1654
|
-
const { QingStorResource: QingStorResource2 } = await import("./qingstor-
|
|
1939
|
+
const { QingStorResource: QingStorResource2 } = await import("./qingstor-YLP6K3L4.js");
|
|
1655
1940
|
const { normalizeQingStorConfig } = await import("./config-IVY5EQQ2.js");
|
|
1656
1941
|
return new QingStorResource2(normalizeQingStorConfig(config));
|
|
1657
1942
|
},
|
|
1658
1943
|
postgres: async (config) => {
|
|
1659
|
-
const { PostgresResource: PostgresResource2 } = await import("./postgres-
|
|
1944
|
+
const { PostgresResource: PostgresResource2 } = await import("./postgres-P36Z2YN4.js");
|
|
1660
1945
|
const { normalizePostgresConfig } = await import("@struktoai/mirage-core");
|
|
1661
1946
|
return new PostgresResource2(normalizePostgresConfig(config));
|
|
1662
1947
|
},
|
|
1663
1948
|
mongodb: async (config) => {
|
|
1664
|
-
const { MongoDBResource: MongoDBResource2 } = await import("./mongodb-
|
|
1949
|
+
const { MongoDBResource: MongoDBResource2 } = await import("./mongodb-JVR62OIO.js");
|
|
1665
1950
|
const { normalizeMongoDBConfig } = await import("@struktoai/mirage-core");
|
|
1666
1951
|
return new MongoDBResource2(normalizeMongoDBConfig(config));
|
|
1667
1952
|
},
|
|
1668
1953
|
slack: async (config) => {
|
|
1669
|
-
const { SlackResource: SlackResource2 } = await import("./slack-
|
|
1954
|
+
const { SlackResource: SlackResource2 } = await import("./slack-YPS7PII3.js");
|
|
1670
1955
|
const { normalizeSlackConfig: normalizeSlackConfig2 } = await import("./config-ZV6G2ZEC.js");
|
|
1671
1956
|
return new SlackResource2(normalizeSlackConfig2(config));
|
|
1672
1957
|
},
|
|
1673
1958
|
ssh: async (config) => {
|
|
1674
|
-
const { SSHResource: SSHResource2 } = await import("./ssh-
|
|
1959
|
+
const { SSHResource: SSHResource2 } = await import("./ssh-YFP3SMTJ.js");
|
|
1675
1960
|
const { normalizeSshConfig: normalizeSshConfig2 } = await import("./config-KJOLGVB2.js");
|
|
1676
1961
|
return new SSHResource2(normalizeSshConfig2(config));
|
|
1677
1962
|
},
|
|
1678
1963
|
discord: async (config) => {
|
|
1679
|
-
const { DiscordResource: DiscordResource2 } = await import("./discord-
|
|
1964
|
+
const { DiscordResource: DiscordResource2 } = await import("./discord-BG7OSRJG.js");
|
|
1680
1965
|
const { normalizeDiscordConfig: normalizeDiscordConfig2 } = await import("./config-DG65OEG3.js");
|
|
1681
1966
|
return new DiscordResource2(normalizeDiscordConfig2(config));
|
|
1682
1967
|
},
|
|
1683
1968
|
trello: async (config) => {
|
|
1684
|
-
const { TrelloResource: TrelloResource2 } = await import("./trello-
|
|
1969
|
+
const { TrelloResource: TrelloResource2 } = await import("./trello-XYKWZD6P.js");
|
|
1685
1970
|
const { normalizeTrelloConfig: normalizeTrelloConfig2 } = await import("./config-GVH27UPE.js");
|
|
1686
1971
|
return new TrelloResource2(normalizeTrelloConfig2(config));
|
|
1687
1972
|
},
|
|
1688
1973
|
linear: async (config) => {
|
|
1689
|
-
const { LinearResource: LinearResource2 } = await import("./linear-
|
|
1974
|
+
const { LinearResource: LinearResource2 } = await import("./linear-IC37LZV7.js");
|
|
1690
1975
|
const { normalizeLinearConfig: normalizeLinearConfig2 } = await import("./config-GCQK6NJY.js");
|
|
1691
1976
|
return new LinearResource2(normalizeLinearConfig2(config));
|
|
1692
1977
|
},
|
|
1693
1978
|
notion: async (config) => {
|
|
1694
|
-
const { NotionResource: NotionResource2 } = await import("./notion-
|
|
1979
|
+
const { NotionResource: NotionResource2 } = await import("./notion-HKRPQMJS.js");
|
|
1695
1980
|
const { normalizeNotionConfig: normalizeNotionConfig2 } = await import("./config-IJJXGLBQ.js");
|
|
1696
1981
|
return new NotionResource2(normalizeNotionConfig2(config));
|
|
1697
1982
|
},
|
|
1698
1983
|
langfuse: async (config) => {
|
|
1699
|
-
const { LangfuseResource: LangfuseResource2 } = await import("./langfuse-
|
|
1984
|
+
const { LangfuseResource: LangfuseResource2 } = await import("./langfuse-ACASJZ7O.js");
|
|
1700
1985
|
const { normalizeLangfuseConfig: normalizeLangfuseConfig2 } = await import("./config-LHFFXVYI.js");
|
|
1701
1986
|
return new LangfuseResource2(normalizeLangfuseConfig2(config));
|
|
1702
1987
|
},
|
|
1703
1988
|
github: async (config) => {
|
|
1704
|
-
const { GitHubResource: GitHubResource2 } = await import("./github-
|
|
1989
|
+
const { GitHubResource: GitHubResource2 } = await import("./github-DV7E6OFV.js");
|
|
1705
1990
|
const { normalizeGitHubConfig: normalizeGitHubConfig2 } = await import("./config-3BBWD5AB.js");
|
|
1706
1991
|
return GitHubResource2.create(normalizeGitHubConfig2(config));
|
|
1707
1992
|
},
|
|
1708
1993
|
github_ci: async (config) => {
|
|
1709
|
-
const { GitHubCIResource: GitHubCIResource2 } = await import("./github_ci-
|
|
1994
|
+
const { GitHubCIResource: GitHubCIResource2 } = await import("./github_ci-Q554V5PA.js");
|
|
1710
1995
|
const { normalizeGitHubCIConfig: normalizeGitHubCIConfig2 } = await import("./config-EIHSP5DZ.js");
|
|
1711
1996
|
return new GitHubCIResource2(normalizeGitHubCIConfig2(config));
|
|
1712
1997
|
},
|
|
1713
1998
|
gdocs: async (config) => {
|
|
1714
|
-
const { GDocsResource: GDocsResource2 } = await import("./gdocs-
|
|
1999
|
+
const { GDocsResource: GDocsResource2 } = await import("./gdocs-R67TDPON.js");
|
|
1715
2000
|
const { normalizeGDocsConfig: normalizeGDocsConfig2 } = await import("./config-D3RLSPNF.js");
|
|
1716
2001
|
return new GDocsResource2(normalizeGDocsConfig2(config));
|
|
1717
2002
|
},
|
|
1718
2003
|
gsheets: async (config) => {
|
|
1719
|
-
const { GSheetsResource: GSheetsResource2 } = await import("./gsheets-
|
|
2004
|
+
const { GSheetsResource: GSheetsResource2 } = await import("./gsheets-H4RYMQJ5.js");
|
|
1720
2005
|
const { normalizeGSheetsConfig: normalizeGSheetsConfig2 } = await import("./config-OT2TQQCN.js");
|
|
1721
2006
|
return new GSheetsResource2(normalizeGSheetsConfig2(config));
|
|
1722
2007
|
},
|
|
1723
2008
|
gslides: async (config) => {
|
|
1724
|
-
const { GSlidesResource: GSlidesResource2 } = await import("./gslides-
|
|
2009
|
+
const { GSlidesResource: GSlidesResource2 } = await import("./gslides-YLCHKJOM.js");
|
|
1725
2010
|
const { normalizeGSlidesConfig: normalizeGSlidesConfig2 } = await import("./config-IDZMEW73.js");
|
|
1726
2011
|
return new GSlidesResource2(normalizeGSlidesConfig2(config));
|
|
1727
2012
|
},
|
|
1728
2013
|
gdrive: async (config) => {
|
|
1729
|
-
const { GDriveResource: GDriveResource2 } = await import("./gdrive-
|
|
2014
|
+
const { GDriveResource: GDriveResource2 } = await import("./gdrive-PRN2ALRK.js");
|
|
1730
2015
|
const { normalizeGDriveConfig: normalizeGDriveConfig2 } = await import("./config-HXVYIXP5.js");
|
|
1731
2016
|
return new GDriveResource2(normalizeGDriveConfig2(config));
|
|
1732
2017
|
},
|
|
1733
2018
|
dropbox: async (config) => {
|
|
1734
|
-
const { DropboxResource: DropboxResource2 } = await import("./dropbox-
|
|
2019
|
+
const { DropboxResource: DropboxResource2 } = await import("./dropbox-74GYLV3R.js");
|
|
1735
2020
|
const { normalizeDropboxConfig: normalizeDropboxConfig2 } = await import("./config-4UDVSUQJ.js");
|
|
1736
2021
|
return new DropboxResource2(normalizeDropboxConfig2(config));
|
|
1737
2022
|
},
|
|
1738
2023
|
box: async (config) => {
|
|
1739
|
-
const { BoxResource: BoxResource2 } = await import("./box-
|
|
2024
|
+
const { BoxResource: BoxResource2 } = await import("./box-GQ2U2R6R.js");
|
|
1740
2025
|
const { normalizeBoxConfig: normalizeBoxConfig2 } = await import("./config-CMDBAPDH.js");
|
|
1741
2026
|
return new BoxResource2(normalizeBoxConfig2(config));
|
|
1742
2027
|
},
|
|
1743
2028
|
gmail: async (config) => {
|
|
1744
|
-
const { GmailResource: GmailResource2 } = await import("./gmail-
|
|
2029
|
+
const { GmailResource: GmailResource2 } = await import("./gmail-OLN2LT4O.js");
|
|
1745
2030
|
const { normalizeGmailConfig } = await import("./config-NV5WXP64.js");
|
|
1746
2031
|
return new GmailResource2(normalizeGmailConfig(config));
|
|
1747
2032
|
},
|
|
1748
2033
|
email: async (config) => {
|
|
1749
|
-
const { EmailResource: EmailResource2 } = await import("./email-
|
|
2034
|
+
const { EmailResource: EmailResource2 } = await import("./email-5IZ7OBQ4.js");
|
|
1750
2035
|
const { normalizeEmailConfig: normalizeEmailConfig2 } = await import("./config-3IVQJBNW.js");
|
|
1751
2036
|
return new EmailResource2(normalizeEmailConfig2(config));
|
|
1752
2037
|
}
|
|
@@ -1781,6 +2066,7 @@ export {
|
|
|
1781
2066
|
DatabricksVolumeResource,
|
|
1782
2067
|
DigitalOceanResource,
|
|
1783
2068
|
DiscordResource,
|
|
2069
|
+
DiskObserverStore,
|
|
1784
2070
|
DiskResource,
|
|
1785
2071
|
DropboxResource,
|
|
1786
2072
|
EMAIL_COMMANDS,
|
|
@@ -1826,6 +2112,7 @@ export {
|
|
|
1826
2112
|
MirageFS,
|
|
1827
2113
|
MongoDBResource,
|
|
1828
2114
|
MongoDBStore,
|
|
2115
|
+
Mount,
|
|
1829
2116
|
NotionResource,
|
|
1830
2117
|
OCIResource,
|
|
1831
2118
|
OCI_PROMPT,
|
|
@@ -1840,6 +2127,7 @@ export {
|
|
|
1840
2127
|
REDIS_PROMPT,
|
|
1841
2128
|
RedisAccessor,
|
|
1842
2129
|
RedisFileCacheStore,
|
|
2130
|
+
RedisObserverStore,
|
|
1843
2131
|
RedisResource,
|
|
1844
2132
|
RedisStore,
|
|
1845
2133
|
S3Resource,
|