@mastra/e2b 0.15.0 → 0.15.1-alpha.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.js CHANGED
@@ -1,4 +1,4 @@
1
- import { DirectoryNotEmptyError, DirectoryNotFoundError, FactorySandbox, FileExistsError, FileNotFoundError, IsDirectoryError, MastraFilesystem, MastraSandbox, NotDirectoryError, ProcessHandle, SandboxError, SandboxNotReadyError, SandboxProcessManager, UnsupportedStdinCloseError, assertModesUnsupported } from "@mastra/core/workspace";
1
+ import { DirectoryNotEmptyError, DirectoryNotFoundError, FactorySandbox, FileExistsError, FileNotFoundError, IsDirectoryError, MastraFilesystem, MastraSandbox, NotDirectoryError, ProcessHandle, SandboxError, SandboxNotReadyError, SandboxProcessManager, UnsupportedStdinCloseError, assertModesUnsupported, getMimeType } from "@mastra/core/workspace";
2
2
  import { ApiClient, ConnectionConfig, InvalidArgumentError, NotFoundError, Sandbox, SandboxNotFoundError, Template } from "e2b";
3
3
  import { createHash } from "crypto";
4
4
  import { posix } from "path";
@@ -13,7 +13,7 @@ import { transformSync } from "esbuild";
13
13
  * contents can never drift under a stable identity hash; bump deliberately
14
14
  * (each bump builds new templates).
15
15
  */
16
- const DEFAULT_NODE_VERSION = "24.20.0";
16
+ const DEFAULT_NODE_VERSION = "24.22.1";
17
17
  const NODE_VERSION_PATTERN = /^\d+\.\d+\.\d+$/;
18
18
  function isNamedTemplateSpec(spec) {
19
19
  return typeof spec === "object" && spec !== null && "ref" in spec && "template" in spec;
@@ -55,7 +55,7 @@ function createDefaultMountableTemplate(options) {
55
55
  const aptPackages = ["s3fs", "fuse"];
56
56
  const cpuCount = options?.cpuCount ?? 2;
57
57
  const memoryMB = options?.memoryMB ?? 1024;
58
- const nodeVersion = options?.nodeVersion ?? "24.20.0";
58
+ const nodeVersion = options?.nodeVersion ?? "24.22.1";
59
59
  if (!NODE_VERSION_PATTERN.test(nodeVersion)) throw new Error(`Invalid nodeVersion "${nodeVersion}": expected an exact version like "24.20.0"`);
60
60
  const config = {
61
61
  version: "v4",
@@ -75,8 +75,7 @@ function createDefaultMountableTemplate(options) {
75
75
  }
76
76
  };
77
77
  }
78
- //#endregion
79
- //#region ../../packages/_internals/workspace/dist/index.js
78
+ // ../../packages/_internals/workspace/dist/index.js
80
79
  /** Directory, relative to the template's build cwd, that holds every marker below. */
81
80
  const SETUP_MARKER_DIR = ".mastra-sandbox";
82
81
  /**
@@ -476,7 +475,8 @@ var FilesApiFilesystem = class extends MastraFilesystem {
476
475
  type: info.type === "dir" ? "directory" : "file",
477
476
  size: info.type === "dir" ? 0 : info.size,
478
477
  createdAt: modifiedAt,
479
- modifiedAt
478
+ modifiedAt,
479
+ ...info.type !== "dir" && { mimeType: getMimeType(abs) }
480
480
  };
481
481
  });
482
482
  }
@@ -527,8 +527,202 @@ var FilesApiFilesystem = class extends MastraFilesystem {
527
527
  throw new Error(`${operation} ${subject} failed (exit ${result.exitCode}): ${result.stderr.trim()}`);
528
528
  }
529
529
  };
530
- //#endregion
531
- //#region src/sandbox/filesystem.ts
530
+ /**
531
+ * Output callbacks for `run`/`connect` that hold output until the handle
532
+ * exists. The SDK's handle reads events from construction, before `run()`
533
+ * returns, so output that arrives with the start event reaches the
534
+ * callbacks first.
535
+ */
536
+ function outputUntilHandled() {
537
+ let handle;
538
+ const early = [];
539
+ return {
540
+ onStdout: (data) => {
541
+ if (handle) handle.emitStdout(data);
542
+ else early.push({
543
+ stream: "stdout",
544
+ data
545
+ });
546
+ },
547
+ onStderr: (data) => {
548
+ if (handle) handle.emitStderr(data);
549
+ else early.push({
550
+ stream: "stderr",
551
+ data
552
+ });
553
+ },
554
+ handledBy(created) {
555
+ for (const { stream, data } of early) if (stream === "stdout") created.emitStdout(data);
556
+ else created.emitStderr(data);
557
+ early.length = 0;
558
+ handle = created;
559
+ return created;
560
+ }
561
+ };
562
+ }
563
+ /** envd runs every command as `/bin/bash -l -c <command>`; show the command itself. */
564
+ function commandOf(proc) {
565
+ const [flag, c, command] = proc.args;
566
+ if (proc.cmd === "/bin/bash" && flag === "-l" && c === "-c" && command !== void 0 && proc.args.length === 3) return command;
567
+ return [proc.cmd, ...proc.args].join(" ");
568
+ }
569
+ /**
570
+ * A process started or attached through a {@link CommandsApi}. `kill` and
571
+ * `sendStdin` go back through the manager, so they use whatever commands
572
+ * handle the provider currently supplies.
573
+ */
574
+ var CommandsApiProcessHandle = class extends ProcessHandle {
575
+ inner;
576
+ manager;
577
+ startTime;
578
+ stdinMode;
579
+ pid;
580
+ /** The exit code `wait()` saw, for a handle that doesn't update its own. */
581
+ waitedExitCode;
582
+ constructor(inner, manager, startTime, stdinMode, options) {
583
+ super(options);
584
+ this.inner = inner;
585
+ this.manager = manager;
586
+ this.startTime = startTime;
587
+ this.stdinMode = stdinMode;
588
+ this.pid = String(inner.pid);
589
+ }
590
+ /** Read from the commands handle, so it reflects server-side state without `wait()`. */
591
+ get exitCode() {
592
+ return this.inner.exitCode ?? this.waitedExitCode;
593
+ }
594
+ /** Wait for the process to exit. Providers whose output stream can drop while the process runs override this. */
595
+ waitForExit() {
596
+ return this.inner.wait();
597
+ }
598
+ async wait() {
599
+ try {
600
+ const result = await this.waitForExit();
601
+ this.waitedExitCode = result.exitCode;
602
+ return {
603
+ success: result.exitCode === 0,
604
+ exitCode: result.exitCode,
605
+ stdout: this.stdout,
606
+ stderr: this.stderr,
607
+ executionTimeMs: Date.now() - this.startTime
608
+ };
609
+ } catch (error) {
610
+ const errorObj = error;
611
+ const reportedExitCode = errorObj.result?.exitCode ?? errorObj.exitCode;
612
+ if (reportedExitCode !== void 0) this.waitedExitCode = reportedExitCode;
613
+ const exitCode = reportedExitCode ?? this.exitCode ?? 1;
614
+ const attachedStdout = errorObj.result?.stdout || errorObj.stdout;
615
+ const attachedStderr = errorObj.result?.stderr || errorObj.stderr;
616
+ if (!this.stdout && !this.stdoutTruncated && attachedStdout) this.emitStdout(attachedStdout);
617
+ if (!this.stderr && !this.stderrTruncated && attachedStderr) this.emitStderr(attachedStderr);
618
+ const stdout = this.stdout;
619
+ const stderr = this.stderr;
620
+ const terminalError = errorObj.result?.error || errorObj.error || (error instanceof Error ? error.message : String(error));
621
+ return {
622
+ success: false,
623
+ exitCode,
624
+ stdout,
625
+ stderr: [stderr, terminalError && !stderr.includes(terminalError) ? `Error: ${terminalError}` : ""].filter(Boolean).join("\n"),
626
+ executionTimeMs: Date.now() - this.startTime
627
+ };
628
+ }
629
+ }
630
+ async kill() {
631
+ if (this.exitCode !== void 0) return false;
632
+ return this.manager.runCommands("kill", (commands) => commands.kill(this.inner.pid));
633
+ }
634
+ async sendStdin(data) {
635
+ if (this.exitCode !== void 0) throw new Error(`Process ${this.pid} has already exited with code ${this.exitCode}`);
636
+ if (this.stdinMode === "ignore") throw new Error(`Process ${this.pid} was not started with stdin support`);
637
+ await this.manager.runCommands("sendStdin", (commands) => commands.sendStdin(this.inner.pid, data));
638
+ }
639
+ async closeStdin() {
640
+ throw new UnsupportedStdinCloseError("The commands API does not expose a way to close stdin for a running command");
641
+ }
642
+ };
643
+ /**
644
+ * A process manager over E2B's envd commands API. Providers supply the
645
+ * commands handle through {@link runCommands}; everything else is shared.
646
+ */
647
+ var CommandsApiProcessManager = class extends SandboxProcessManager {
648
+ defaultTimeout;
649
+ constructor({ defaultTimeout, ...options } = {}) {
650
+ super(options);
651
+ this.defaultTimeout = defaultTimeout;
652
+ }
653
+ /** Wrap a started or attached command. Providers override this to supply their own handle. */
654
+ createHandle(inner, stdinMode, options) {
655
+ return new CommandsApiProcessHandle(inner, this, Date.now(), stdinMode, options);
656
+ }
657
+ /** Where a command runs when the caller gives no `cwd`. */
658
+ defaultCwd() {
659
+ return this.sandbox.workingDirectory;
660
+ }
661
+ async spawn(command, options = {}) {
662
+ const envs = Object.fromEntries(Object.entries({ ...options.env }).filter((entry) => entry[1] !== void 0));
663
+ return this.runCommands("spawn", async (commands) => {
664
+ const output = outputUntilHandled();
665
+ const inner = await commands.run(command, {
666
+ background: true,
667
+ stdin: options.stdinMode !== "ignore",
668
+ cwd: options.cwd ?? this.defaultCwd(),
669
+ envs,
670
+ timeoutMs: options.timeout ?? this.defaultTimeout,
671
+ onStdout: output.onStdout,
672
+ onStderr: output.onStderr
673
+ });
674
+ const handle = output.handledBy(this.createHandle(inner, options.stdinMode, options));
675
+ this._tracked.set(handle.pid, handle);
676
+ return handle;
677
+ });
678
+ }
679
+ /**
680
+ * Running processes as the VM reports them, plus exited processes this
681
+ * manager still holds, so a finished command stays visible until it is released.
682
+ */
683
+ async list() {
684
+ const infos = (await this.runCommands("list", (commands) => commands.list())).map((proc) => ({
685
+ pid: String(proc.pid),
686
+ command: commandOf(proc),
687
+ running: true
688
+ }));
689
+ const listed = new Set(infos.map((info) => info.pid));
690
+ for (const [pid, handle] of this._tracked) {
691
+ if (handle.exitCode === void 0 || listed.has(pid)) continue;
692
+ infos.push({
693
+ pid,
694
+ command: handle.command,
695
+ running: false,
696
+ exitCode: handle.exitCode
697
+ });
698
+ }
699
+ return infos;
700
+ }
701
+ /**
702
+ * A tracked process, or one this manager didn't start, attached through
703
+ * `connect`. Output from before attaching is not available.
704
+ */
705
+ async get(pid, _options) {
706
+ const tracked = this._tracked.get(pid);
707
+ if (tracked) return tracked;
708
+ const numericPid = /^\d+$/.test(pid) ? Number(pid) : void 0;
709
+ if (numericPid === void 0) return void 0;
710
+ const output = outputUntilHandled();
711
+ try {
712
+ const inner = await this.runCommands("connect", (commands) => commands.connect(numericPid, {
713
+ onStdout: output.onStdout,
714
+ onStderr: output.onStderr,
715
+ timeoutMs: 0
716
+ }));
717
+ const handle = output.handledBy(this.createHandle(inner, void 0));
718
+ this._tracked.set(handle.pid, handle);
719
+ return handle;
720
+ } catch {
721
+ return;
722
+ }
723
+ }
724
+ };
725
+ // src/sandbox/filesystem.ts
532
726
  /**
533
727
  * envd's edge answers a paused or missing sandbox with a 404 that the SDK
534
728
  * reports as `FileNotFoundError`. Same pattern as `E2BSandbox`'s dead-sandbox
@@ -583,8 +777,7 @@ var E2BSandboxFilesystem = class extends FilesApiFilesystem {
583
777
  if (error instanceof InvalidArgumentError) return "invalid-argument";
584
778
  }
585
779
  };
586
- //#endregion
587
- //#region src/sandbox/mounts/types.ts
780
+ // src/sandbox/mounts/types.ts
588
781
  const LOG_PREFIX = "[@mastra/e2b]";
589
782
  const SAFE_S3_BUCKET_NAME = /^[a-z0-9][a-z0-9.\-]{1,61}[a-z0-9]$/;
590
783
  const SAFE_GCS_BUCKET_NAME = /^[a-z0-9][a-z0-9._-]{1,61}[a-z0-9]$/;
@@ -628,8 +821,7 @@ function validatePrefix(prefix) {
628
821
  if (/[\x00-\x1f\x7f]/.test(normalized)) throw new Error(`Invalid mount prefix: "${prefix}". Control characters are not allowed.`);
629
822
  return normalized;
630
823
  }
631
- //#endregion
632
- //#region src/utils/shell-quote.ts
824
+ // src/utils/shell-quote.ts
633
825
  /**
634
826
  * Shell-quote a single argument for safe use in a command string.
635
827
  *
@@ -640,8 +832,7 @@ function shellQuote(arg) {
640
832
  if (/^[a-zA-Z0-9._\-/@:=]+$/.test(arg)) return arg;
641
833
  return "'" + arg.replace(/'/g, "'\\''") + "'";
642
834
  }
643
- //#endregion
644
- //#region src/sandbox/mounts/s3.ts
835
+ // src/sandbox/mounts/s3.ts
645
836
  /**
646
837
  * Mount an S3 bucket using s3fs-fuse.
647
838
  */
@@ -748,8 +939,7 @@ Error details: ${installResult.stderr || installResult.stdout}`);
748
939
  }
749
940
  if ((await sandbox.commands.run(`mountpoint -q ${shellQuote(mountPath)}`)).exitCode !== 0) throw new Error(`s3fs returned exit 0 but ${mountPath} is not a mountpoint. The s3fs daemon likely failed during FUSE init (common causes: region mismatch, invalid credentials, or an S3-compatible endpoint that rejects the signature). Re-run inside the sandbox with '-f -o dbglevel=info' to see the underlying error.`);
750
941
  }
751
- //#endregion
752
- //#region src/sandbox/mounts/gcs.ts
942
+ // src/sandbox/mounts/gcs.ts
753
943
  /**
754
944
  * Mount a GCS bucket using gcsfuse.
755
945
  *
@@ -800,8 +990,7 @@ async function mountGCS(mountPath, config, ctx) {
800
990
  throw new Error(`Failed to mount GCS bucket: ${stderr || stdout || error}`);
801
991
  }
802
992
  }
803
- //#endregion
804
- //#region src/sandbox/mounts/azure.ts
993
+ // src/sandbox/mounts/azure.ts
805
994
  const SAFE_CONTAINER_NAME = /^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/;
806
995
  const BLOBFUSE2_GITHUB_DEB = "https://github.com/Azure/azure-storage-fuse/releases/download/blobfuse2-2.5.1/blobfuse2-2.5.1-Ubuntu-22.04.x86_64.deb";
807
996
  function validateContainerName(name) {
@@ -998,143 +1187,24 @@ Error details: ${verifyResult.stderr || verifyResult.stdout || installResult?.st
998
1187
  throw new Error(`Failed to mount Azure Blob container: ${stderr || stdout || error}`);
999
1188
  }
1000
1189
  }
1001
- //#endregion
1002
- //#region src/sandbox/process-manager.ts
1190
+ // src/sandbox/process-manager.ts
1003
1191
  /**
1004
1192
  * E2B Process Manager
1005
1193
  *
1006
- * Implements SandboxProcessManager for E2B cloud sandboxes.
1007
- * Wraps the E2B SDK's commands API (background mode, sendStdin, kill, list).
1194
+ * Implements SandboxProcessManager for E2B cloud sandboxes over the E2B SDK's
1195
+ * commands API. The process handling itself is shared with other envd-backed
1196
+ * providers in `@internal/workspace`.
1008
1197
  */
1009
- /**
1010
- * Wraps an E2B CommandHandle to conform to Mastra's ProcessHandle.
1011
- * Not exported — internal to this module.
1012
- *
1013
- * Listener dispatch is handled by the base class. The manager's spawn()/get()
1014
- * methods wire E2B's constructor-time callbacks to handle.emitStdout/emitStderr.
1015
- */
1016
- var E2BProcessHandle = class extends ProcessHandle {
1017
- pid;
1018
- _e2bHandle;
1019
- _sandbox;
1020
- _startTime;
1021
- _stdinMode;
1022
- constructor(e2bHandle, sandbox, startTime, options) {
1023
- super(options);
1024
- this.pid = String(e2bHandle.pid);
1025
- this._e2bHandle = e2bHandle;
1026
- this._sandbox = sandbox;
1027
- this._startTime = startTime;
1028
- this._stdinMode = options?.stdinMode;
1029
- }
1030
- /** Delegates to E2B's handle so exitCode reflects server-side state without needing wait(). */
1031
- get exitCode() {
1032
- return this._e2bHandle.exitCode;
1033
- }
1034
- async wait() {
1035
- try {
1036
- const result = await this._e2bHandle.wait();
1037
- return {
1038
- success: result.exitCode === 0,
1039
- exitCode: result.exitCode,
1040
- stdout: this.stdout,
1041
- stderr: this.stderr,
1042
- executionTimeMs: Date.now() - this._startTime
1043
- };
1044
- } catch (error) {
1045
- const errorObj = error;
1046
- const exitCode = errorObj.result?.exitCode ?? errorObj.exitCode ?? this.exitCode ?? 1;
1047
- const attachedStdout = errorObj.result?.stdout || errorObj.stdout;
1048
- const attachedStderr = errorObj.result?.stderr || errorObj.stderr;
1049
- if (!this.stdout && !this.stdoutTruncated && attachedStdout) this.emitStdout(attachedStdout);
1050
- if (!this.stderr && !this.stderrTruncated && attachedStderr) this.emitStderr(attachedStderr);
1051
- const stdout = this.stdout;
1052
- const stderr = this.stderr;
1053
- const terminalError = errorObj.result?.error || errorObj.error || (error instanceof Error ? error.message : String(error));
1054
- return {
1055
- success: false,
1056
- exitCode,
1057
- stdout,
1058
- stderr: [stderr, terminalError && !stderr.includes(terminalError) ? `Error: ${terminalError}` : ""].filter(Boolean).join("\n"),
1059
- executionTimeMs: Date.now() - this._startTime
1060
- };
1061
- }
1062
- }
1063
- async kill() {
1064
- if (this.exitCode !== void 0) return false;
1065
- return this._e2bHandle.kill();
1066
- }
1067
- async sendStdin(data) {
1068
- if (this.exitCode !== void 0) throw new Error(`Process ${this.pid} has already exited with code ${this.exitCode}`);
1069
- if (this._stdinMode === "ignore") throw new Error(`Process ${this.pid} was not started with stdin support`);
1070
- await this._sandbox.commands.sendStdin(this._e2bHandle.pid, data);
1071
- }
1072
- async closeStdin() {
1073
- throw new UnsupportedStdinCloseError("E2B SDK does not expose a way to close stdin for a running command");
1074
- }
1075
- };
1076
- var E2BProcessManager = class extends SandboxProcessManager {
1077
- _defaultTimeout;
1198
+ var E2BProcessManager = class extends CommandsApiProcessManager {
1078
1199
  constructor(opts = {}) {
1079
- super();
1080
- this._defaultTimeout = opts.defaultTimeout;
1081
- }
1082
- async spawn(command, options = {}) {
1083
- return this.sandbox.retryOnDead(async () => {
1084
- const e2b = this.sandbox.e2b;
1085
- const mergedEnv = { ...options.env };
1086
- const envs = Object.fromEntries(Object.entries(mergedEnv).filter((entry) => entry[1] !== void 0));
1087
- let handle;
1088
- handle = new E2BProcessHandle(await e2b.commands.run(command, {
1089
- background: true,
1090
- stdin: options.stdinMode !== "ignore",
1091
- cwd: options.cwd ?? this.sandbox.workingDirectory,
1092
- envs,
1093
- timeoutMs: options.timeout ?? this._defaultTimeout,
1094
- onStdout: (data) => handle.emitStdout(data),
1095
- onStderr: (data) => handle.emitStderr(data)
1096
- }), e2b, Date.now(), options);
1097
- this._tracked.set(handle.pid, handle);
1098
- return handle;
1099
- });
1200
+ super({ defaultTimeout: opts.defaultTimeout });
1100
1201
  }
1101
- /**
1102
- * List processes by querying E2B's commands API.
1103
- * E2B manages all state server-side — no local tracking needed.
1104
- */
1105
- async list() {
1106
- return (await this.sandbox.e2b.commands.list()).map((proc) => ({
1107
- pid: String(proc.pid),
1108
- command: [proc.cmd, ...proc.args].join(" "),
1109
- running: true
1110
- }));
1111
- }
1112
- /**
1113
- * Get a handle to a process by PID.
1114
- * Checks base class tracking first, then falls back to commands.connect()
1115
- * for processes spawned externally or before reconnection.
1116
- */
1117
- async get(pid) {
1118
- const tracked = this._tracked.get(pid);
1119
- if (tracked) return tracked;
1120
- const numericPid = /^\d+$/.test(pid) ? Number(pid) : void 0;
1121
- if (numericPid === void 0) return void 0;
1122
- const e2b = this.sandbox.e2b;
1123
- let handle;
1124
- try {
1125
- handle = new E2BProcessHandle(await e2b.commands.connect(numericPid, {
1126
- onStdout: (data) => handle.emitStdout(data),
1127
- onStderr: (data) => handle.emitStderr(data)
1128
- }), e2b, Date.now());
1129
- this._tracked.set(handle.pid, handle);
1130
- return handle;
1131
- } catch {
1132
- return;
1133
- }
1202
+ runCommands(operation, fn) {
1203
+ if (operation === "spawn") return this.sandbox.retryOnDead(() => fn(this.sandbox.e2b.commands));
1204
+ return fn(this.sandbox.e2b.commands);
1134
1205
  }
1135
1206
  };
1136
- //#endregion
1137
- //#region src/sandbox/index.ts
1207
+ // src/sandbox/index.ts
1138
1208
  /** Allowlist pattern for mount paths — absolute path with safe characters only. */
1139
1209
  const SAFE_MOUNT_PATH = /^\/[a-zA-Z0-9_.\-/]+$/;
1140
1210
  function validateMountPath(mountPath) {
@@ -2126,8 +2196,7 @@ var E2BSandbox = class E2BSandbox extends MastraSandbox {
2126
2196
  }
2127
2197
  }
2128
2198
  };
2129
- //#endregion
2130
- //#region src/utils/repo-template.ts
2199
+ // src/utils/repo-template.ts
2131
2200
  /**
2132
2201
  * Sha-tagged repo templates.
2133
2202
  *
@@ -2540,8 +2609,7 @@ function assertWorkingDirectory(dir) {
2540
2609
  if (!(/^\/[A-Za-z0-9._/-]*$/.test(dir) && !dir.split("/").includes(".."))) throw new Error(`Repo template workingDirectory must be an absolute path of plain path characters (got ${JSON.stringify(dir)}); ~ and $HOME are not expanded.`);
2541
2610
  return dir;
2542
2611
  }
2543
- //#endregion
2544
- //#region src/provider.ts
2612
+ // src/provider.ts
2545
2613
  const e2bSandboxProvider = {
2546
2614
  id: "e2b",
2547
2615
  name: "E2B Sandbox",
@@ -2588,8 +2656,7 @@ const e2bSandboxProvider = {
2588
2656
  },
2589
2657
  createSandbox: (config) => new E2BSandbox(config)
2590
2658
  };
2591
- //#endregion
2592
- //#region src/factory-sandbox.ts
2659
+ // src/factory-sandbox.ts
2593
2660
  /** Applied when neither the environment setting nor a host default is set. */
2594
2661
  const DEFAULT_SETTINGS = {
2595
2662
  cpuCount: 2,
@@ -2824,8 +2891,7 @@ function mapStatus(status) {
2824
2891
  default: return "unknown";
2825
2892
  }
2826
2893
  }
2827
- //#endregion
2828
- //#region src/code-mode/transport.ts
2894
+ // src/code-mode/transport.ts
2829
2895
  /**
2830
2896
  * Code Mode — E2B transport
2831
2897
  *
@@ -2965,9 +3031,7 @@ var E2BCodeModeTransport = class {
2965
3031
  };
2966
3032
  resolveDone();
2967
3033
  return;
2968
- case "rpc":
2969
- serveRpc(frame.id, frame.tool, frame.args).catch(() => {});
2970
- return;
3034
+ case "rpc": serveRpc(frame.id, frame.tool, frame.args).catch(() => {});
2971
3035
  }
2972
3036
  };
2973
3037
  handle = await sandbox.processes.spawn(`node ${runnerPath}`, {
@@ -3029,7 +3093,6 @@ var E2BCodeModeTransport = class {
3029
3093
  }
3030
3094
  }
3031
3095
  };
3032
- //#endregion
3033
3096
  export { DEFAULT_NODE_VERSION, E2BCodeModeTransport, E2BFactorySandbox, E2BProcessManager, E2BSandbox, E2BSandboxFilesystem, createDefaultMountableTemplate, createRepoTemplate, e2bSandboxProvider, isDeferredNamedTemplateSpec, isNamedTemplateSpec, refreshRepoTemplate, repoTemplateRef };
3034
3097
 
3035
3098
  //# sourceMappingURL=index.js.map