<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Expand Release Candidates workflow to run on PR label, open, reopen,
and sync events.
>
> - **CI/CD**:
> - Update `on.pull_request.types` in
`.github/workflows/release_candidates.yml` to include `labeled`,
`opened`, `reopened`, and `synchronize` so the Release Candidate
workflow runs on these events.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
a0842f5d6e0902ed04f9d42fa9b258dd098d56da. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
This will help for local development
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Add support to override the API base URL via `api_url` parameter or
`E2B_API_URL` env var with clear precedence.
>
> - **Python SDK**:
> - **ConnectionConfig**:
> - Add `api_url` parameter and `_api_url()` env lookup (`E2B_API_URL`).
> - Resolve `api_url` in order: constructor arg > `E2B_API_URL` >
`debug` localhost or `https://api.<domain>`.
> - **API Params**:
> - Include `api_url` in `ApiParams` and propagate via `get_api_params`.
> - **Tests** (`packages/python-sdk/tests/test_connection_config.py`):
> - Verify default, arg override, env override, and precedence.
> - **Changeset**: Patch release for `@e2b/python-sdk`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
9be6d4e85bb0ad8ea52ad61c77530ac72f231c54. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Fix Dockerfile generation to properly render `RUN` and `COPY`
instructions using only relevant args, and add patch changesets.
>
> - **Template to Dockerfile generation**:
> - JS (`packages/js-sdk/src/template/index.ts`): Special-case `RUN` and
`COPY` so Dockerfile emits `RUN <cmd>` and `COPY <src> <dest>` instead
of joining all args.
> - Python (`packages/python-sdk/e2b/template/main.py`): Same
special-casing for `RUN` and `COPY` during Dockerfile rendering.
> - **Release**:
> - Changeset: patch bumps for `@e2b/python-sdk` and `e2b` with note
"fix RUN and COPY handling in to_dockerfile".
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
04b2dbbda34f0845f3d4ec9963cc478b7b7b7f01. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Previously the gateway was just fire and forget which lead to a race
condition when you immediately tried to access the mcp server, changed
the template to launch a daemon with healthcheck.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Start MCP gateway synchronously with error checks and bump default MCP
template to `mcp-gateway-v0-2` across JS and Python SDKs.
>
> - **MCP Gateway startup**:
> - JS (`packages/js-sdk/src/sandbox/index.ts`): Start `mcp-gateway`
without background mode; validate exit code and throw on failure.
> - Python Async (`packages/python-sdk/e2b/sandbox_async/main.py`):
Await `mcp-gateway` start, remove background/timeout flags; raise on
non-zero exit.
> - Python Sync (`packages/python-sdk/e2b/sandbox_sync/main.py`): Run
`mcp-gateway` synchronously; check exit code and raise on failure.
> - **Defaults**:
> - Update `default_mcp_template` from `mcp-gateway-v0-1` to
`mcp-gateway-v0-2` in JS and Python SDKs.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
79e431c78bf384c970a5b1fede55071116a089c5. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Adds `mcp` config support for sandbox creation across API, JS, and
Python SDKs, and updates timeout tests to use explicit request timeouts.
>
> - **API/OpenAPI**:
> - Add `McpConfig` schema and `mcp` field to `NewSandbox` in
`spec/openapi.yml` and generated TS `schema.gen.ts`.
> - **JS SDK**:
> - `SandboxApi.createSandbox` sends `mcp` in POST body
(`packages/js-sdk/src/sandbox/sandboxApi.ts`).
> - Types updated to include `components["schemas"]["McpConfig"]`.
> - **Python SDK**:
> - Extend `NewSandbox` model and sandbox create flow to accept/pass
`mcp`; async/sync APIs propagate `mcp` to POST `/sandboxes`.
> - **Tests**:
> - Increase `is_running` request timeouts in timeout tests to reduce
flakiness (JS and Python).
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
04ad4e6d4947e33523b74aba2f703fa1e9c05e72. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Global installs for pip/npm now run as root; pip gains an option to
install per-user instead.
>
> - **Template SDKs**:
> - **JavaScript (`packages/js-sdk/src/template`)**:
> - `pipInstall` now supports `options: { g?: boolean }` (default
`true`); when `g` is `true`, runs as `root`, when `false`, adds `--user`
and runs as current user.
> - `npmInstall` runs as `root` when `options.g` is `true`.
> - **Python (`packages/python-sdk/e2b/template/main.py`)**:
> - `pip_install` now accepts `g: bool = True`; when `True`, runs as
`root`, when `False`, adds `--user` and runs as current user.
> - `npm_install` runs as `root` when `g` is `True`.
> - **Changeset**: patch bump for `@e2b/python-sdk` and `e2b` with note:
install global packages as sudo.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
6be5ba211f7d200d50ffca50c1751d455b3e2cfa. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
This way a version bump in the `.tool-versions` file is automatically
used in tests, linters, releases, and local dev. It also helps make it
clear which version we expect people to use locally.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Add .tool-versions and update GitHub Actions to parse and use its
values for pnpm, Node.js, Python, Poetry, and Deno.
>
> - **CI Workflows**:
> - Add parsing of `.tool-versions` via
`wistia/parse-tool-versions@v2.1.1` in `cli_tests.yml`,
`generated_files.yml`, `js_sdk_tests.yml`, `lint.yml`,
`publish_packages.yml`, `python_sdk_tests.yml`, `release.yml`,
`release_candidates.yml`.
> - Replace hardcoded versions with `${{ env.TOOL_VERSION_* }}`:
> - `pnpm`: `TOOL_VERSION_PNPM`
> - `node-version`: `TOOL_VERSION_NODEJS`
> - `python-version`: `TOOL_VERSION_PYTHON`
> - `poetry` installer `version`: `TOOL_VERSION_POETRY`
> - `deno-version`: `TOOL_VERSION_DENO`
> - **Tooling**:
> - Add `.tool-versions` specifying `deno 1.46.3`, `nodejs 20.19.5`,
`pnpm 9.15.5`, `python 3.9`, `poetry 1.8.3`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
358b62f586f3dfa164ad331f0ee7c7372e96bfac. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
The package wasn't used, but we get rid of these as well
https://github.com/e2b-dev/E2B/security/dependabot/196https://github.com/e2b-dev/E2B/security/dependabot/197
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Updates sharp to 0.34.4 in apps/web and refreshes lockfile with new
platform-specific sharp packages and related transitive changes.
>
> - **Dependencies**:
> - Bump `apps/web` devDependency `sharp` from `^0.32.x` to `^0.34.4`.
> - Lockfile updates:
> - Add `@img/sharp-*` platform-specific packages and `@img/colour`.
> - Update `detect-libc`.
> - Remove legacy native build/transitive deps (e.g.,
`prebuild-install`, `node-addon-api`, `node-abi`, `tar-fs`, `pump`,
related packages).
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
85226e063515f8371093bd403da334a556b09aa2. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Set default user for Dockerfiles. Includes also small migrate fixes.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Defaults Dockerfile-based templates to user 'user' and workdir
'/home/user', updates CLI templates (sudo start/ready, relative Python
import), and allows template migration without a config file.
>
> - **SDKs (Dockerfile parsing)**:
> - JS (`packages/js-sdk/src/template/dockerfileParser.ts`) and Python
(`packages/python-sdk/e2b/template/dockerfile_parser.py`): after
parsing, set defaults `setUser('user')` and `setWorkdir('/home/user')`.
> - **CLI Templates**:
> - Python build scripts: switch to relative import `from .template
import template`.
> - Generated template hbs: start/ready commands now prefixed with
`sudo`; removed explicit root/workdir before start/ready.
> - **CLI Migrate**:
> - Supports migration without `e2b.toml`; uses default config values
and prints a warning instead of exiting.
> - Initializes default config when missing; success messaging adjusted.
> - **Tests**:
> - Update fixtures to reflect new defaults (`set_user('user')`,
`set_workdir('/home/user')`, `sudo` start/ready, relative imports).
> - Relax error case to succeed with warning when config is missing.
> - Comment out stacktrace tests for `fromDockerfile` in JS/Python until
fixed.
> - **Changesets**: Patch bumps for `@e2b/cli`, `@e2b/python-sdk`, and
`e2b`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
934dc3b23b5607f70d4a4f5b7a9413a9d04df28a. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Updates stacktrace tests to use root-owned paths for workdir/dir ops
and a more explicit failing set_user command in JS and Python
(async/sync) SDKs.
>
> - **Tests (stacktrace)**:
> - **JS SDK (`packages/js-sdk/tests/template/stacktrace.test.ts`)**:
> - `setWorkdir`: set user to `root` and change path to `/root/.bashrc`.
> - `setUser`: use `; exit 1` as the failing command.
> - **Python SDK**:
> - Async
(`packages/python-sdk/tests/async/template_async/test_stacktrace.py`):
> - `make_dir`, `set_workdir`: set user to `root` and target
`/root/.bashrc`.
> - `set_user`: use `; exit 1` as the failing command.
> - Sync
(`packages/python-sdk/tests/sync/template_sync/test_stacktrace.py`):
> - `make_dir`, `set_workdir`: set user to `root` and target
`/root/.bashrc`.
> - `set_user`: use `; exit 1` as the failing command.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
780023b3819f19ba908ccd794195e630bab2741b. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Changed to use commands instead of API and added auth.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Introduce MCP auth by launching mcp-gateway with an access token and
exposing a token getter; replace HTTP config with command execution and
bump default MCP template to v0-1.
>
> - **SDKs**:
> - **MCP auth**:
> - Launch `mcp-gateway` via `commands.run` with `GATEWAY_ACCESS_TOKEN`
set to a generated token (JS/TS and Python, async/sync).
> - Expose token retrieval: `betaGetMcpToken()` (JS) and
`beta_get_mcp_token()` (Python) reading `/etc/mcp-gateway/.token` if
needed.
> - **Configuration flow**:
> - Replace HTTP `POST /config` setup with command-based startup; remove
retry logic (JS and Python).
> - **Defaults**:
> - Update `defaultMcpTemplate`/`default_mcp_template` to
`mcp-gateway-v0-1` (JS and Python).
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4456a1822d87fa32110f6659c3bf9135bff71045. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Simplifies the `Makefile` `codegen` target to explicitly build
`codegen-env` and run generation, removing the dynamic image variable
logic.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4dc584dc94870657c82902c0911d10d013fa5ab6. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Upgrade openapi-fetch to v0.14 and openapi-typescript to v7.9 with
required API/middleware changes, adjust multipart upload, and extend Bun
test with file I/O.
>
> - **JS SDK**:
> - **Dependencies**: Bump `openapi-fetch` to `^0.14.1` and
`openapi-typescript` to `^7.9.1`.
> - **API Client (`src/envd/api.ts`)**:
> - Update `handleEnvdApiError` to accept `{ error, response }` per new
client response shape; remove `FetchResponse` generic import.
> - **Logging (`src/logs.ts`)**:
> - Update `Middleware` usage to new signatures: `onRequest({ request
})` and `onResponse({ response })` and return `request`/`response`.
> - **Filesystem (`src/sandbox/filesystem/index.ts`)**:
> - Adjust `POST /files` multipart upload: use `bodySerializer()` with
`FormData`; remove manual `Content-Type` headers; minor comment typo
fix.
> - **Tests**:
> - Extend Bun runtime test to write/read a file via `sbx.files`.
> - **Release**: Add patch changeset.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
03afbac2fdcf761368bc91040f1d715711994c6c. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Update CI to use Poetry 1.8.3 across workflows and add
`.tool-versions` (Python 3.9.24, Poetry 1.8.3) for the Python SDK.
>
> - **CI/Workflows**:
> - Bump Poetry from `1.5.1` to `1.8.3` in
`/.github/workflows/{lint.yml,publish_packages.yml,python_sdk_tests.yml,release_candidates.yml}`.
> - **Tooling**:
> - Add `packages/python-sdk/.tool-versions` specifying `python 3.9.24`
and `poetry 1.8.3`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
9ae519772a9cd62333313dcc594edcc90a591c0a. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Adjusts `skipCache` to return `this` in types and aligns
implementation for proper fluent chaining.
>
> - **JS SDK – `template`**:
> - **Types**: Change `skipCache` return type from `TemplateBuilder` to
`this` in `types.ts` (`TemplateFromImage`, `TemplateBuilder`).
> - **Implementation**: Align `skipCache` in `index.ts` by removing
explicit return type annotation to match `this` chaining.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
58131d1e5c8caaddc3a23523f99c069ac00a32a7. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Clarified sandbox data retention policy and error handling.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Clarifies that sandbox data retention is 30 days from creation (not
extended by resumes) and specifies NotFound errors when resuming
deleted/nonexistent sandboxes.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
8f9706f3f0d90c89dc95c8ede407e86a378e0a97. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Vasek Mlejnsky <vasek@e2b.dev>
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Adds beta MCP support to JS/Python SDKs with template auto-selection,
config POST, MCP URL helpers, and codegen for MCP types/schemas.
>
> - **SDKs (Beta MCP support)**:
> - **JS SDK**:
> - Add `McpServer` types and export; extend `Sandbox.betaCreate` with
`mcp` option that auto-selects `mcp-gateway-v0`, configures MCP via POST
`/config` on port `50005` with retries, and expose `betaGetMcpUrl()`.
> - Add `wait(ms)` util; generate MCP types from `spec/mcp-server.json`;
new `generate:mcp` script and dev dep `json-schema-to-typescript`.
> - **Python SDK**:
> - Generate and export `McpServer` (TypedDict); extend sync/async
`beta_create` with `mcp` option, auto-select default MCP template, POST
MCP config with retries, and add `beta_get_mcp_url()`; define `mcp_port`
and `default_mcp_template`.
> - Makefile: add `generate-mcp` target; include
`datamodel-code-generator` in tooling; update lockfile/pyproject deps.
> - **Tooling**:
> - Add `spec/mcp-server.json` schema; update codegen Dockerfile to
install `datamodel-code-generator`.
> -
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
cf3f175d310d4c242cd2e867efd801f5c04f2099. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Jonas Scholz <Jonas.Scholz@bbscholz.de>
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Unifies Template APIs across JS/Python with PathLike support, new
copyItems, option/name tweaks, and simpler registry auth via
credentials; updates parser, exports, and tests.
>
> - **Template API (JS + Python)**
> - Add PathLike support for paths in `copy`, `remove`, `rename`,
`makeDir`, `makeSymlink`, `setWorkdir`, and `gitClone`.
> - Introduce `copyItems` and corresponding `CopyItem` typing; adjust
Dockerfile parser to use `copyItems` overload.
> - Simplify registry auth: `fromImage(baseImage, credentials)` accepts
`{username,password}`; remove `fromRegistry`; update
`fromAWSRegistry`/`fromGCPRegistry` to take credentials and set config
internally.
> - Rename options: `ignoreFilePaths` -> `fileIgnorePatterns`;
`fileContextPath` can be `PathLike`.
> - Ensure internal hashing/upload use stringified paths; minor
enum/type tweaks (e.g., `InstructionType` as string enum, `forceUpload?:
true`).
> - **Exports**
> - Export `CopyItem` from JS `index.ts` and Python `__init__.py`.
> - **Tests**
> - Update stacktrace and build tests to new method names/signatures
(e.g., registry via `fromImage` credentials, new `copyItems` tests,
optional `skipCache` param).
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
95391030550a340fe99ebaac4494867b3e3e9507. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Jakub Dobry <jakub.dobry8@gmail.com>