@mastra/e2b 0.4.0 → 0.4.1-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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @mastra/e2b
2
2
 
3
+ ## 0.4.1-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Make concurrent S3 and GCS mounts reliable in the same sandbox ([#18512](https://github.com/mastra-ai/mastra/pull/18512))
8
+
9
+ Mounting several buckets at once, or restoring mounts after a pause/resume, could previously fail or pick up the wrong credentials because every mount shared one temporary credentials file and overwrote each other's. Each mount now gets its own credentials file, so they no longer interfere. (Azure already worked this way.)
10
+
11
+ - Updated dependencies [[`0200e75`](https://github.com/mastra-ai/mastra/commit/0200e7552d02d4221cd6040bf4eddf189a97a156), [`06e0d63`](https://github.com/mastra-ai/mastra/commit/06e0d63d42bc2a202e18bc091f3781f409f5e6fb), [`438a971`](https://github.com/mastra-ai/mastra/commit/438a9715c8b4398e5eaf8914a1f19dc8a85dc1de), [`77518cc`](https://github.com/mastra-ai/mastra/commit/77518ccb5bb8cc684875081e64213dc85cffdbee), [`bb2a13b`](https://github.com/mastra-ai/mastra/commit/bb2a13bb4b32e6bb807200fe7b18ae8fa4322118), [`a73cd1a`](https://github.com/mastra-ai/mastra/commit/a73cd1a62a5e4ca023dcc39ba150029f4f1f74c1), [`0b5cc47`](https://github.com/mastra-ai/mastra/commit/0b5cc4726dc18d9a685a27520db39ff1b36bb89a), [`87f38a3`](https://github.com/mastra-ai/mastra/commit/87f38a3de03e24731f2dd6f8ed6a60b6722b85a1), [`d5fa3cd`](https://github.com/mastra-ai/mastra/commit/d5fa3cda1788c3cb93a361a3c6ec47de6ba21e98), [`fe98ef2`](https://github.com/mastra-ai/mastra/commit/fe98ef2e66dbfcbd7d645c88c9ee1e67b458a136), [`793ea0f`](https://github.com/mastra-ai/mastra/commit/793ea0f52f831178837f21c83af6af93bf4ce638), [`507a5c4`](https://github.com/mastra-ai/mastra/commit/507a5c461bdc3136ad80744c0efbb55ce1f18f97), [`79b3626`](https://github.com/mastra-ai/mastra/commit/79b3626f8d647307eb07c8da14c9073c2699719d)]:
12
+ - @mastra/core@1.47.0-alpha.6
13
+
3
14
  ## 0.4.0
4
15
 
5
16
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -102,7 +102,8 @@ Error details: ${installResult.stderr || installResult.stdout}`
102
102
  const idResult = await sandbox.commands.run("id -u && id -g");
103
103
  const [uid, gid] = idResult.stdout.trim().split("\n");
104
104
  const hasCredentials = config.accessKeyId && config.secretAccessKey;
105
- const credentialsPath = "/tmp/.passwd-s3fs";
105
+ const mountHash = crypto.createHash("md5").update(mountPath).digest("hex").slice(0, 8);
106
+ const credentialsPath = `/tmp/.passwd-s3fs-${mountHash}`;
106
107
  if (!hasCredentials && config.endpoint) {
107
108
  throw new Error(
108
109
  `S3-compatible storage requires credentials. Detected endpoint: ${config.endpoint}. The public_bucket option only works for AWS S3 public buckets, not R2, MinIO, etc.`
@@ -165,8 +166,6 @@ Error details: ${installResult.stderr || installResult.stdout}`
165
166
  );
166
167
  }
167
168
  }
168
-
169
- // src/sandbox/mounts/gcs.ts
170
169
  async function mountGCS(mountPath, config, ctx) {
171
170
  const { sandbox, logger } = ctx;
172
171
  validateBucketName(config.bucket);
@@ -186,7 +185,8 @@ async function mountGCS(mountPath, config, ctx) {
186
185
  const hasCredentials = !!config.serviceAccountKey;
187
186
  let mountCmd;
188
187
  if (hasCredentials) {
189
- const keyPath = "/tmp/gcs-key.json";
188
+ const mountHash = crypto.createHash("md5").update(mountPath).digest("hex").slice(0, 8);
189
+ const keyPath = `/tmp/gcs-key-${mountHash}.json`;
190
190
  await sandbox.commands.run(`sudo rm -f ${keyPath}`);
191
191
  await sandbox.files.write(keyPath, config.serviceAccountKey);
192
192
  await sandbox.commands.run(`sudo chown root:root ${keyPath} && sudo chmod 600 ${keyPath}`);