@mastra/e2b 0.12.2 → 0.12.3-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/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { MastraSandbox, ProcessHandle, SandboxNotReadyError, SandboxProcessManager, UnsupportedStdinCloseError, assertModesUnsupported } from "@mastra/core/workspace";
2
2
  import { Sandbox, Template } from "e2b";
3
- import { createHash, randomBytes } from "crypto";
3
+ import { createHash } from "crypto";
4
4
  import { execFile } from "child_process";
5
5
  import { promisify } from "util";
6
6
  import { FRAME_PREFIX, buildProgramModule, buildRunner, sanitizeToolId } from "@mastra/core/tools";
@@ -2053,7 +2053,7 @@ var E2BCodeModeTransport = class {
2053
2053
  externalName: sanitizeToolId(toolId)
2054
2054
  }));
2055
2055
  const allowList = new Set(toolIds);
2056
- const suffix = randomBytes(4).toString("hex");
2056
+ const suffix = Buffer.from(globalThis.crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(4))).toString("hex");
2057
2057
  const dir = `${SANDBOX_TMP}/${suffix}`;
2058
2058
  const programPath = `${dir}/program-${suffix}.mjs`;
2059
2059
  const runnerPath = `${dir}/runner-${suffix}.mjs`;