@mastra/e2b 0.12.1-alpha.1 → 0.12.1
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/dist/index.cjs +8 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1262,7 +1262,10 @@ var E2BSandbox = class E2BSandbox extends MastraSandbox {
|
|
|
1262
1262
|
const owner = info.metadata?.["mastra-sandbox-id"];
|
|
1263
1263
|
if (owner !== void 0 && owner !== this.id) throw new Error(`${LOG_PREFIX} Provider sandbox ${preferredSandboxId} belongs to logical sandbox id "${owner}", refusing to attach it to "${this.id}"`);
|
|
1264
1264
|
try {
|
|
1265
|
-
return await Sandbox.connect(preferredSandboxId,
|
|
1265
|
+
return await Sandbox.connect(preferredSandboxId, {
|
|
1266
|
+
...this.connectionOpts,
|
|
1267
|
+
timeoutMs: this.timeout
|
|
1268
|
+
});
|
|
1266
1269
|
} catch (e) {
|
|
1267
1270
|
if (this.isSandboxDeadError(e)) {
|
|
1268
1271
|
this.logger.debug(`${LOG_PREFIX} Preferred sandbox ${preferredSandboxId} vanished before connect, falling back:`, e);
|
|
@@ -1280,7 +1283,10 @@ var E2BSandbox = class E2BSandbox extends MastraSandbox {
|
|
|
1280
1283
|
const info = await this.lookupExistingSandboxInfo();
|
|
1281
1284
|
if (!info) return null;
|
|
1282
1285
|
try {
|
|
1283
|
-
return await this.connectSdkSandbox(info.sandboxId,
|
|
1286
|
+
return await this.connectSdkSandbox(info.sandboxId, {
|
|
1287
|
+
...this.connectionOpts,
|
|
1288
|
+
timeoutMs: this.timeout
|
|
1289
|
+
});
|
|
1284
1290
|
} catch (e) {
|
|
1285
1291
|
this.logger.debug(`${LOG_PREFIX} Error connecting to existing sandbox:`, e);
|
|
1286
1292
|
return null;
|