Skip to content

Releases: e2b-dev/E2B

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

e2b@2.35.3

Choose a tag to compare

@github-actions github-actions released this 23 Jul 12:34
2defe39

Patch Changes

  • a406f78: Fix fetch handling on non-Node runtimes (Bun, Deno, browsers, edge):

    • The SDK now late-binds globalThis.fetch instead of capturing the reference at client creation, so a fetch replaced afterwards (msw, instrumentation) is picked up, and per-proxy fetcher cache entries stay distinct.
    • Request/idle timeout abort reasons are pinned to their AbortController to work around Bun dropping weakly-held AbortSignal.reason values, so timeouts on Bun surface as TimeoutError instead of an undefined reason.
  • d417e9c: Detect the Cloudflare Workers runtime before the generic Node check so Node compatibility shims (workerd's nodejs_compat, @cloudflare/vitest-pool-workers) no longer make the SDK load undici inside Workers

e2b@2.35.2

Choose a tag to compare

@github-actions github-actions released this 23 Jul 10:53
f109898

Patch Changes

  • f109898: Fix ESM bundle crashing at import time in Cloudflare Workers (and other edge runtimes) with The argument 'path' must be a file URL object, a file URL string, or an absolute path string. Received 'undefined'. Bare require calls in the SDK source made the bundler emit an eager createRequire(import.meta.url) shim at module scope, which throws in workerd where import.meta.url is undefined. SHA-256 hashing now uses WebCrypto directly, node:url is imported statically like the other Node.js built-ins, and a bundle test fails if a require shim ever reappears in the ESM bundle.

@e2b/cli@2.15.0

Choose a tag to compare

@github-actions github-actions released this 23 Jul 12:34
2defe39

Minor Changes

  • 2defe39: Rename the team fields in ~/.e2b/config.json to project: the config format version is bumped to 2 and teamName, teamId, and teamApiKey become projectName, projectId, and projectApiKey. Existing v1 configs keep working — they are converted to the new format in memory on read, and the file on disk is only rewritten in the new format when the config is persisted anyway (login, e2b auth configure, token refresh), so older CLI versions can still read it in the meantime. Unrecognized configs are no longer deleted; the CLI treats them as signed out and e2b auth login overwrites them. Tools that read the config file directly must handle the new field names. CLI output and flags are unchanged and still say "team".

Patch Changes

  • Updated dependencies [a406f78]
  • Updated dependencies [d417e9c]
    • e2b@2.35.3

@e2b/cli@2.14.0

Choose a tag to compare

@github-actions github-actions released this 23 Jul 11:03
a16dcdf

Minor Changes

  • a16dcdf: Rename the --team flag to --project on template list, template publish, template unpublish, and template delete. The --team flag keeps working but is hidden from help and prints a deprecation warning. The project ID can also be set via the new E2B_PROJECT_ID environment variable; E2B_TEAM_ID is still supported and is used when E2B_PROJECT_ID is not set.

Patch Changes

  • Updated dependencies [f109898]
    • e2b@2.35.2

e2b@2.35.1

Choose a tag to compare

@github-actions github-actions released this 22 Jul 18:40
e5a4bd6

Patch Changes

  • e5a4bd6: Prefer Undici 8 on Node 22.19 and newer so graceful HTTP/2 GOAWAY frames drain accepted requests instead of failing them, while retaining Undici 7 as the Node 20 fallback.

@e2b/cli@2.13.4

Choose a tag to compare

@github-actions github-actions released this 22 Jul 18:40
e5a4bd6

Patch Changes

  • c0fe608: Rename user-visible "team" wording to "project" in CLI terminal output: auth login confirmation and hints, auth info status line and fallback, auth configure picker and confirmation, error messages, and the template publish/unpublish visibility prompt. Copy-only change — no flag, env var, config key, or API behavior changes.
  • 36639f5: Remove the per-command e2b-cli-command/<command> tag from the User-Agent integration attribution; CLI requests are now attributed with the e2b-cli/<version> tag only
  • be1ffa1: Rebuild with patched transitive dependencies to resolve Dependabot security alerts (brace-expansion, js-yaml, and others bundled into the CLI executable)
  • 4990471: Fix sandbox list sorting sandboxes by locale-formatted date string instead of the underlying timestamp, which broke chronological order across single-digit/double-digit month and day boundaries
  • 04827ab: Remove dead e2b.toml code paths — the CLI no longer writes the file, so saveConfig is gone, and the unused team_id field is no longer part of the config schema or team ID resolution. Parsing stays for legacy projects (template migrate, template publish, template delete, sandbox create)
  • Updated dependencies [e5a4bd6]
    • e2b@2.35.1

e2b@2.35.0

Choose a tag to compare

@github-actions github-actions released this 17 Jul 09:59
95e4dc2

Minor Changes

  • 95e4dc2: Add sandbox.fork() and Sandbox.fork(sandboxId) for forking a running sandbox. The sandbox is checkpointed in place (briefly paused, snapshotted with its full memory state, and resumed — its ID and expiration stay untouched) and count new sandboxes are created from that snapshot. Each fork succeeds or fails independently: the returned array contains one entry per requested fork, either a running Sandbox instance or an Error (Promise.allSettled-style). Per-fork error codes map to the same error classes as other API errors (e.g. 429 to RateLimitError).

    const sandbox = await Sandbox.create()
    
    const [fork1, fork2] = await sandbox.fork({ count: 2, timeoutMs: 60_000 })
    if (fork1 instanceof Sandbox) {
      await fork1.commands.run('echo "hello from fork"')
    }