Skip to content

Releases: e2b-dev/E2B

e2b@2.38.0

Choose a tag to compare

@github-actions github-actions released this 03 Aug 19:46

Minor Changes

  • 2821fb0: Route volume content requests to a team's custom (BYOC) cluster. When a team is connected to a custom cluster, the volume create and get endpoints now return that cluster's domain, and the SDK uses it as the destination for volume content requests instead of the default api.<E2B_DOMAIN> host. Teams on the default cluster are unaffected and keep their configured domain.

@e2b/python-sdk@2.37.0

Choose a tag to compare

Minor Changes

  • 2821fb0: Route volume content requests to a team's custom (BYOC) cluster. When a team is connected to a custom cluster, the volume create and get endpoints now return that cluster's domain, and the SDK uses it as the destination for volume content requests instead of the default api.<E2B_DOMAIN> host. Teams on the default cluster are unaffected and keep their configured domain.

e2b@2.37.0

Choose a tag to compare

@github-actions github-actions released this 31 Jul 19:40

Minor Changes

  • 1504fbc: Add fromFedoraImage, fromAlpineImage, and fromArchImage base-image helpers to the Template builder (from_fedora_image, from_alpine_image, from_arch_image in the Python SDK), alongside the existing fromUbuntuImage/fromDebianImage/etc. Templates can now start from Fedora, Alpine, and Arch base images (the orchestrator identifies the distro from /etc/os-release). Fedora and Alpine default to pinned tags (fedora:44, alpine:3.24) so builds stay reproducible; Arch defaults to latest because it is a rolling release and provisioning runs pacman -Syu regardless.

Patch Changes

  • 6733f36: Align the Python SDK's from_fedora_image and from_alpine_image defaults with the JS SDK: fedora:44 and alpine:3.24, replacing fedora:42 (end-of-life, so its repositories leave the normal mirror network and provisioning can fail) and alpine:3.22. Callers that omit the variant now get the same base image in both SDKs, and both tags are the ones the orchestrator's distro build tests cover. Also corrects the JS TemplateFromImage type docs, which still named the old defaults.
  • 1ebe925: Recognize web platform objects by what they are, not by which class minted them. Libraries replace the web globals the same way they replace globalThis.fetch (@hono/node-server installs its own Request, remix's installGlobals() swaps Request/Blob/File, web-streams-polyfill swaps ReadableStream, jsdom-style test environments bring their own copies), and values also cross realms — so a perfectly good Request, Blob or ReadableStream could fail the SDK's instanceof checks and take the wrong branch. This fixes: every API call crashing with Failed to parse URL from [object Request]; the abort signal of such a Request being ignored while it waited for an in-flight slot; uploads of a foreign Blob or ReadableStream — including the body of such a Request — silently containing the text "[object Blob]"/"[object ReadableStream]"; gzipped uploads of a foreign stream hanging; a foreign stream being buffered into memory instead of streamed; and volume.readFile() returning empty data.
  • ee0ad25: Update snapshot docstrings to use project terminology instead of team (e.g. "my-project/my-snapshot", project slug)

@e2b/python-sdk@2.36.0

Choose a tag to compare

Minor Changes

  • 1504fbc: Add fromFedoraImage, fromAlpineImage, and fromArchImage base-image helpers to the Template builder (from_fedora_image, from_alpine_image, from_arch_image in the Python SDK), alongside the existing fromUbuntuImage/fromDebianImage/etc. Templates can now start from Fedora, Alpine, and Arch base images (the orchestrator identifies the distro from /etc/os-release). Fedora and Alpine default to pinned tags (fedora:44, alpine:3.24) so builds stay reproducible; Arch defaults to latest because it is a rolling release and provisioning runs pacman -Syu regardless.

Patch Changes

  • 6733f36: Align the Python SDK's from_fedora_image and from_alpine_image defaults with the JS SDK: fedora:44 and alpine:3.24, replacing fedora:42 (end-of-life, so its repositories leave the normal mirror network and provisioning can fail) and alpine:3.22. Callers that omit the variant now get the same base image in both SDKs, and both tags are the ones the orchestrator's distro build tests cover. Also corrects the JS TemplateFromImage type docs, which still named the old defaults.
  • 45d2679: Regenerate e2b/sandbox/mcp.py with datamodel-code-generator 0.64.0: the MCP server option types now use builtin generics (list[str], dict[str, Any]) and are closed TypedDicts, mirroring the spec's additionalProperties: false. Raises the typing-extensions floor to >=4.10.0, the first release accepting PEP 728's closed.
  • ee0ad25: Update snapshot docstrings to use project terminology instead of team (e.g. "my-project/my-snapshot", project slug)

@e2b/cli@2.16.1

Choose a tag to compare

@github-actions github-actions released this 31 Jul 19:40

Patch Changes

  • 9e3e52b: Add --user, --cwd, and --env flags to e2b sandbox create (and the deprecated spawn alias) and e2b sandbox connect. These are forwarded to the underlying PTY session so the connected terminal starts as the given user, in the given working directory, and with the given environment variables. --env accepts repeatable KEY=VALUE pairs.
  • 2c061eb: Point the --project flag help at the dashboard's ?tab=general entrypoint (was ?tab=team)
  • 05b7a79: Depend on e2b through pnpm's workspace:^ protocol instead of a registry range. pnpm publish rewrites it to the same concrete ^<version> it had before, so the published package is unchanged — but the lockfile no longer has to be re-resolved against the tarballs a release uploads, which is what forced the release tags onto the commit before their own version bump.
  • Updated dependencies [6733f36]
  • Updated dependencies [1ebe925]
  • Updated dependencies [1504fbc]
  • Updated dependencies [ee0ad25]
    • e2b@2.37.0

e2b@2.36.1

Choose a tag to compare

@github-actions github-actions released this 27 Jul 13:35
48e9249

Patch Changes

  • 178e267: Bump the glob dependency from ^11.1.0 to ^13.0.6. glob 11 is deprecated on npm, so every install of a project depending on e2b printed a npm warn deprecated glob@11.1.0 warning that downstream packages could not silence (overrides and shrinkwrap only apply to the top-level project). glob 12 and 13 only changed the CLI — the --shell option and the glob bin, which moved to a separate glob-bin package — so the programmatic API the SDK uses (glob(pattern, { ignore, withFileTypes, dot, cwd }) plus Path#isDirectory()/fullpath()/relative()) is unchanged. glob 13 also drops the CLI's transitive dependencies, cutting a fresh npm install e2b from 37 to 26 packages.
  • b511953: Remove the new Function('return import(...)') trick from undici loading. loadUndici now uses the shared dynamicImport helper, whose dynamic import is kept opaque to downstream bundlers with webpackIgnore/@vite-ignore annotations instead of runtime code generation. Environments that disallow code generation from strings (CSP, --disallow-code-generation-from-strings) now load undici normally instead of silently falling back to the global fetch.
  • b511953: Fix the lazy fetcher loading in api/http2.ts and envd/http2.ts: a failed fetcher build is no longer cached forever (the next request retries instead of replaying the stale rejection), and the no-undici fallback now late-binds globalThis.fetch so fetch replacements installed after the first request (msw, instrumentation) are picked up. The previously duplicated loading logic is shared in undici.ts.

@e2b/cli@2.16.0

Choose a tag to compare

@github-actions github-actions released this 27 Jul 13:35
48e9249

Minor Changes

  • 48e9249: Bump @npmcli/package-json from ^5.2.1 to ^7.0.5, clearing the last npm warn deprecated glob@10.5.0 warning printed on every @e2b/cli install (@npmcli/package-json@5 pinned glob@10; 7.0.4 moved to glob@13). Together with the e2b glob bump, a fresh npm install @e2b/cli is now warning-free and drops from 183 to 145 packages.

    @npmcli/package-json@7 requires Node ^20.17.0 || >=22.9.0, so the CLI's Node 22 floor moves from >=22 to >=22.9.0. Node 20 support is unchanged (>=20.18.1 <21). Only the PackageJson.load/create/update/save API used by e2b template init is touched, and it is unchanged across the bump.

Patch Changes

  • Updated dependencies [178e267]
  • Updated dependencies [b511953]
  • Updated dependencies [b511953]
    • e2b@2.36.1

e2b@2.36.0

Choose a tag to compare

@github-actions github-actions released this 24 Jul 14:45
4fcf7cb

Minor Changes

  • 4fcf7cb: Add FileType.SYMLINK to the sandbox filesystem types. Newer envd versions report symlinks with a dedicated FILE_TYPE_SYMLINK entry type; previously the SDKs treated it as unknown, so files.list() silently omitted symlink entries and getInfo()/get_info() returned an undefined/None type for them. Symlinks now surface as FileType.SYMLINK ('symlink') with symlinkTarget/symlink_target populated, in JS and both sync and async Python.

Patch Changes

  • 3f46d56: Select template build-step stack-trace frames by SDK boundary instead of fixed depth. The caller's frame is now the first one whose file lies outside the SDK package, so traces stay correct when transpilers inject extra frames (e.g. TS class-field initializers) or runtimes elide delegating frames (e.g. Bun's tail-call elision). The suppress/override stack-trace collection machinery this made redundant (runInNewStackTraceContext, runInStackTraceOverrideContext and their Python equivalents) is removed.
  • 1ae3f92: Recognize Cloudflare Workers' Network connection lost as a dropped sandbox connection so a sandbox killed mid-request surfaces as the health-checked TimeoutError (matching Node/Bun/Deno), and fix streaming downloads releasing their pooled connection twice when cancelled while a read was in flight
  • 9ee4414: Fix template file uploads under Deno. Deno's native fetch ignores a Content-Length header on stream bodies and fell back to Transfer-Encoding: chunked, which S3-compatible presigned upload URLs reject (see #1243). Template.build uploads now stream the spooled archive through undici's fetch, which honors the header on every runtime, falling back to the global fetch where undici isn't resolvable.
  • 5e141a7: Fix the Sandbox.getHost() documentation example so it can be copy-pasted. The @example called sandbox.commands.exec(...), which is not a method on the Commands class (it exposes run), so running the snippet threw TypeError: sandbox.commands.exec is not a function. It now uses sandbox.commands.run(..., { background: true }), allowing the long-running HTTP server to start before the example calls getHost(). Documentation only, no behavior change.
  • 4fcf7cb: Regenerate API clients from the latest specs, which are now synced with Copybara from their source-of-truth repositories (e2b-dev/infra@e2255f0 for the REST and envd specs, belt for the volume-content spec) instead of being copied by hand. Picks up the latest spec changes: named SandboxTimeoutRequest/SandboxSnapshotRequest/SandboxRefreshRequest request schemas, SandboxNetworkConfig and SandboxIam workload-identity models, the FILE_TYPE_SYMLINK filesystem entry type, and deprecation of access-token auth in favor of API keys. Anything the upstream specs mark x-not-implemented: true (currently the SOCKS5 egress-proxy config) is excluded from the generated clients. Generated Python client models now list fields in spec order instead of alphabetical order (the tag filtering moved from a custom script to Redocly CLI); construct them with keyword arguments if you don't already
  • 5417dd4: Bump the minimum tar dependency to 7.5.19 to pull in upstream fixes for node-tar denial-of-service vulnerabilities (GHSA advisories covering PAX parsing, negative entry sizes, and unbounded decompression)

@e2b/python-sdk@2.35.0

Choose a tag to compare

@github-actions github-actions released this 24 Jul 14:45
4fcf7cb

Minor Changes

  • 00253c3: Migrate the sandbox RPC layer (commands, PTY, filesystem watch) from the
    vendored e2b_connect client to the official Connect RPC client for Python
    (connectrpc), whose HTTP transport
    is pyqwest (Rust reqwest/hyper), and switch the envd protobuf messages from
    Google's protobuf runtime to Buf's
    protobuf-py.

    Closing a command or watch stream early now sends RST_STREAM to the server,
    so abandoned streams no longer leak on the shared HTTP/2 connection, and peer
    resets surface as typed errors instead of ambiguous EOFs. The REST API and
    file upload/download keep using httpx.

    Notes:

    • The SDK no longer depends on the protobuf package, removing a common
      source of dependency conflicts with other libraries that pin it.
    • The e2b_connect module is no longer shipped with the package. Code that
      imported it directly should use connectrpc (ConnectError, Code)
      instead; SDK exception types (SandboxException, TimeoutException, ...)
      are unchanged.
    • The generated e2b.envd.*.*_pb2 modules were replaced by protobuf-py
      equivalents (e2b.envd.process.process_pb,
      e2b.envd.filesystem.filesystem_pb) with a different message API.
    • Connection retries for sandbox RPC calls (E2B_CONNECTION_RETRIES, default 3) now retry only failures establishing the connection — before the request
      could have reached envd — with exponential backoff. Unary RPCs are no
      longer replayed when the connection drops mid-request, which could
      re-execute a delivered call (e.g. re-send process input); such drops
      surface as errors immediately, the way they always did for streaming calls.
    • The proxy option applies to sandbox RPC calls the same way it does to the
      REST API and file transfer requests. URL strings, httpx.URL, and
      httpx.Proxy values keep working (credentials in the URL or in
      httpx.Proxy(auth=...)); httpx.Proxy custom headers and ssl_context
      are not supported for RPC calls and raise InvalidArgumentException.
    • CommandResult.error (and CommandHandle.error) is now None when a
      command finishes without an error, matching the declared Optional[str]
      type and the JS SDK's error?: string. It used to be "" on success —
      code comparing result.error == "" or treating it as always-str should
      check for None/falsiness instead.
    • For async streaming calls (commands.run/connect, PTY,
      files.watch_dir), request_timeout now bounds opening the stream — the
      wait until envd confirms with a start event, matching the JS SDK's
      requestTimeoutMs — and raises TimeoutException when exceeded. The
      running stream is bounded by the command/watch timeout (as before). In
      the sync SDK there is no way to interrupt the blocking wait, so
      request_timeout is not applied to opening the stream — both stream setup
      and the running stream are bounded by timeout (unlimited when 0).
    • E2B_MAX_CONNECTIONS no longer applies to sandbox RPC traffic: the new
      transport bounds only idle connections per host (E2B_KEEPALIVE_EXPIRY,
      E2B_MAX_KEEPALIVE_CONNECTIONS), not the total number of open
      connections. It still applies to the REST API and file transfers.
  • 4fcf7cb: Add FileType.SYMLINK to the sandbox filesystem types. Newer envd versions report symlinks with a dedicated FILE_TYPE_SYMLINK entry type; previously the SDKs treated it as unknown, so files.list() silently omitted symlink entries and getInfo()/get_info() returned an undefined/None type for them. Symlinks now surface as FileType.SYMLINK ('symlink') with symlinkTarget/symlink_target populated, in JS and both sync and async Python.

Patch Changes

  • 3f46d56: Select template build-step stack-trace frames by SDK boundary instead of fixed depth. The caller's frame is now the first one whose file lies outside the SDK package, so traces stay correct when transpilers inject extra frames (e.g. TS class-field initializers) or runtimes elide delegating frames (e.g. Bun's tail-call elision). The suppress/override stack-trace collection machinery this made redundant (runInNewStackTraceContext, runInStackTraceOverrideContext and their Python equivalents) is removed.
  • 4fcf7cb: Regenerate API clients from the latest specs, which are now synced with Copybara from their source-of-truth repositories (e2b-dev/infra@e2255f0 for the REST and envd specs, belt for the volume-content spec) instead of being copied by hand. Picks up the latest spec changes: named SandboxTimeoutRequest/SandboxSnapshotRequest/SandboxRefreshRequest request schemas, SandboxNetworkConfig and SandboxIam workload-identity models, the FILE_TYPE_SYMLINK filesystem entry type, and deprecation of access-token auth in favor of API keys. Anything the upstream specs mark x-not-implemented: true (currently the SOCKS5 egress-proxy config) is excluded from the generated clients. Generated Python client models now list fields in spec order instead of alphabetical order (the tag filtering moved from a custom script to Redocly CLI); construct them with keyword arguments if you don't already

@e2b/cli@2.15.1

Choose a tag to compare

@github-actions github-actions released this 24 Jul 14:45
4fcf7cb

Patch Changes

  • 5417dd4: Rebuild the CLI so the bundled tar picks up 7.5.19+, fixing the node-tar denial-of-service vulnerabilities (the CLI bundles the SDK and its dependencies into dist/index.js)
  • Updated dependencies [3f46d56]
  • Updated dependencies [1ae3f92]
  • Updated dependencies [9ee4414]
  • Updated dependencies [5e141a7]
  • Updated dependencies [4fcf7cb]
  • Updated dependencies [5417dd4]
  • Updated dependencies [4fcf7cb]
    • e2b@2.36.0