@mastra/e2b 0.12.1-alpha.1 → 0.12.1-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1263,7 +1263,10 @@ var E2BSandbox = class E2BSandbox extends _mastra_core_workspace.MastraSandbox {
|
|
|
1263
1263
|
const owner = info.metadata?.["mastra-sandbox-id"];
|
|
1264
1264
|
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}"`);
|
|
1265
1265
|
try {
|
|
1266
|
-
return await e2b.Sandbox.connect(preferredSandboxId,
|
|
1266
|
+
return await e2b.Sandbox.connect(preferredSandboxId, {
|
|
1267
|
+
...this.connectionOpts,
|
|
1268
|
+
timeoutMs: this.timeout
|
|
1269
|
+
});
|
|
1267
1270
|
} catch (e) {
|
|
1268
1271
|
if (this.isSandboxDeadError(e)) {
|
|
1269
1272
|
this.logger.debug(`${LOG_PREFIX} Preferred sandbox ${preferredSandboxId} vanished before connect, falling back:`, e);
|
|
@@ -1281,7 +1284,10 @@ var E2BSandbox = class E2BSandbox extends _mastra_core_workspace.MastraSandbox {
|
|
|
1281
1284
|
const info = await this.lookupExistingSandboxInfo();
|
|
1282
1285
|
if (!info) return null;
|
|
1283
1286
|
try {
|
|
1284
|
-
return await this.connectSdkSandbox(info.sandboxId,
|
|
1287
|
+
return await this.connectSdkSandbox(info.sandboxId, {
|
|
1288
|
+
...this.connectionOpts,
|
|
1289
|
+
timeoutMs: this.timeout
|
|
1290
|
+
});
|
|
1285
1291
|
} catch (e) {
|
|
1286
1292
|
this.logger.debug(`${LOG_PREFIX} Error connecting to existing sandbox:`, e);
|
|
1287
1293
|
return null;
|