@mastra/e2b 0.9.0-alpha.0 → 0.10.0-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 +22 -0
- package/README.md +13 -0
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/sandbox/index.d.ts +14 -1
- package/dist/sandbox/index.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -651,6 +651,7 @@ var E2BSandbox = class E2BSandbox extends MastraSandbox {
|
|
|
651
651
|
env;
|
|
652
652
|
metadata;
|
|
653
653
|
network;
|
|
654
|
+
lifecycle;
|
|
654
655
|
connectionOpts;
|
|
655
656
|
_instructionsOverride;
|
|
656
657
|
_constructorOptions;
|
|
@@ -670,6 +671,7 @@ var E2BSandbox = class E2BSandbox extends MastraSandbox {
|
|
|
670
671
|
this.env = options.env ?? {};
|
|
671
672
|
this.metadata = options.metadata ?? {};
|
|
672
673
|
this.network = options.network;
|
|
674
|
+
this.lifecycle = options.lifecycle ?? { onTimeout: "pause" };
|
|
673
675
|
this.connectionOpts = {
|
|
674
676
|
...options.domain && { domain: options.domain },
|
|
675
677
|
...options.apiUrl && { apiUrl: options.apiUrl },
|
|
@@ -759,7 +761,7 @@ var E2BSandbox = class E2BSandbox extends MastraSandbox {
|
|
|
759
761
|
try {
|
|
760
762
|
this._sandbox = await Sandbox.create(resolvedTemplateId, {
|
|
761
763
|
...this.connectionOpts,
|
|
762
|
-
lifecycle:
|
|
764
|
+
lifecycle: this.lifecycle,
|
|
763
765
|
metadata: {
|
|
764
766
|
...this.metadata,
|
|
765
767
|
"mastra-sandbox-id": this.id
|
|
@@ -776,7 +778,7 @@ var E2BSandbox = class E2BSandbox extends MastraSandbox {
|
|
|
776
778
|
this.logger.debug(`${LOG_PREFIX} Retrying sandbox creation with rebuilt template: ${rebuiltTemplateId}`);
|
|
777
779
|
this._sandbox = await Sandbox.create(rebuiltTemplateId, {
|
|
778
780
|
...this.connectionOpts,
|
|
779
|
-
lifecycle:
|
|
781
|
+
lifecycle: this.lifecycle,
|
|
780
782
|
metadata: {
|
|
781
783
|
...this.metadata,
|
|
782
784
|
"mastra-sandbox-id": this.id
|