Commit Graph

4710 Commits

Author SHA1 Message Date
Mish Ushakov 7358b6120b Fix global packages permissions error (#967)
<!-- 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 -->
@e2b/python-sdk@2.3.1 e2b@2.3.1
2025-10-16 22:30:13 +02:00
github-actions[bot] ace327e948 [skip ci] Release new versions 2025-10-16 11:50:51 +00:00
Jakub Dobry c05c8c6f24 Build System v2 Introduction (#957) @e2b/cli@2.3.0 @e2b/python-sdk@2.3.0 e2b@2.3.0 2025-10-16 04:41:21 -07:00
Mish Ushakov b0aeeb5222 Revert "Add a postinstall that downloads chromium" (#964) 2025-10-16 11:40:28 +00:00
Mish Ushakov 48acc022f3 SDK reference: display submodules in the sidebar (#960) 2025-10-16 11:32:39 +00:00
Mish Ushakov 1d0d404dc0 Move template exceptions to shared (#953)
Co-authored-by: Jakub Dobry <jakub.dobry8@gmail.com>
2025-10-16 03:57:00 -07:00
Joseph Lombrozo 2942f481ad Use .tool-versions file to sync local dev and github actions (#955)
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 -->
2025-10-15 16:12:30 -07:00
Joseph Lombrozo 5377b855cb Add a postinstall that downloads chromium (#962)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Move Playwright installation to JS SDK postinstall (Chromium) and
remove explicit installs from CI workflows.
> 
> - **Workflows**:
> - Remove `npx playwright install --with-deps` from
`/.github/workflows/js_sdk_tests.yml` and
`/.github/workflows/release_candidates.yml`.
> - **JS SDK (`packages/js-sdk/package.json`)**:
>   - Add `postinstall` script: `pnpm exec playwright install chromium`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
6bc96ae4b8da0e03d98e99e6ecdc4e952d530866. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-15 16:12:16 -07:00
Jakub Novák 844bf1f9ca Bump sharp (#958)
The package wasn't used, but we get rid of these as well
https://github.com/e2b-dev/E2B/security/dependabot/196
https://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 -->
2025-10-15 12:48:13 -07:00
Mish Ushakov d877205874 Implement stack traces override context for fromDockerfile (#959)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Adds a stack trace override context so fromDockerfile errors point to
the caller; enables related tests and bumps patch versions.
> 
> - **Template stack traces**:
>   - JS (`packages/js-sdk/src/template/index.ts`):
>     - Add `stackTracesOverride` and `runInStackTraceOverrideContext`.
> - `fromDockerfile` parses within override using
`getCallerFrame(STACK_TRACE_DEPTH - 1)`.
>     - `collectStackTrace` respects override.
>   - Python (`packages/python-sdk/e2b/template/main.py`):
> - Add `_stack_traces_override` and
`_run_in_stack_trace_override_context`.
> - `from_dockerfile` parses within override using caller frame-derived
`TracebackType`.
>     - `_collect_stack_trace` respects override.
> - **Tests**:
> - Enable stack trace expectations for `fromTemplate` and
`fromDockerfile` in JS and Python (sync/async) stacktrace tests.
> - **Release**:
>   - Patch bumps for `@e2b/python-sdk` and `e2b`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
ef0db209ea968b2cedb39cd56b82f637ede3e4e0. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-15 09:31:50 -07:00
Jakub Dobry 3046491ea9 feat: set default user and workdir when using Dockerfile (#954)
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 -->
2025-10-15 05:51:40 -07:00
Jakub Dobry 86786e578f fix: template tests after infra update (#956)
<!-- 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 -->
2025-10-15 03:26:35 -07:00
Jakub Dobry de771ea3eb feat: keep user and workdir from the template in the sandbox (#944) 2025-10-15 00:23:01 -07:00
github-actions[bot] 75f5a473e5 [skip ci] Release new versions 2025-10-14 21:05:31 +00:00
Jonas Scholz 5943485644 Add auth to MCP (#950)
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 -->
@e2b/python-sdk@2.2.7 e2b@2.2.10
2025-10-14 12:39:17 -07:00
Mish Ushakov 73114272e0 Add docstrings to public-facing template methods (#943)
(Feel free to just suggest edits so it's faster)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Adds extensive docstrings across JS/Python template APIs, updates
default base image versions, and adjusts JS SDK exports and logger
internals.
> 
> - **Docs/Comments**:
> - Add comprehensive docstrings and examples across `template` modules
(JS and Python): `consts`, `errors/exceptions`, `index/main`, `logger`,
`readycmd`, `types`, `utils`, and async/sync builders.
> - **JS SDK**:
> - Re-export `BuildOptions`, `CopyItem`, `TemplateBuilder`,
`TemplateClass` from `template/types` via `src/index.ts`.
>   - Simplify `template` exports to `Template` and `type TemplateBase`.
> - Rename internal build logger to `DefaultBuildLogger` (used by
`defaultBuildLogger`).
> - **Defaults**:
> - Change `fromDebianImage()` default variant to `stable` and
`fromPythonImage()` default to `3` (JS and Python).
> - **Misc**:
> - Add internal documentation for stack tracing, hashing, ready checks;
minor wording/consistency tweaks.
>   - Add changeset for patch releases of `@e2b/python-sdk` and `e2b`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
37d21d8543e1e9c6b61c0b7ad7cd254774767524. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-14 09:04:07 -07:00
Jakub Dobry a121bab60c Trigger releases manually (#952) 2025-10-14 06:22:35 -07:00
github-actions[bot] ff1f37ce9c [skip ci] Release new versions 2025-10-14 12:46:58 +00:00
Jakub Novák 820bbdf88c Simplify codegen generate (#951)
<!-- 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 -->
2025-10-14 05:34:43 -07:00
Jakub Novák bec5b140c8 Update openapi fetch (#929)
<!-- 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 -->
e2b@2.2.9
2025-10-14 05:31:06 -07:00
github-actions[bot] ebb3f08039 [skip ci] Release new versions 2025-10-14 10:07:23 +00:00
Jakub Dobry f12291272d fix: set correct Dockerfile user workdir defaults (#941) @e2b/cli@2.2.10 @e2b/python-sdk@2.2.6 e2b@2.2.8 2025-10-14 09:59:00 +00:00
Joseph Lombrozo 5014ee2609 Upgrade to latest 1.8.x version of poetry (#947)
<!-- 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 -->
2025-10-13 17:35:02 -07:00
github-actions[bot] 5be42d11a5 [skip ci] Release new versions 2025-10-10 12:36:03 +00:00
Mish Ushakov c40eeaac38 Improve regex for fileContextPath (#939)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Improve stack-trace path parsing for caller directory and add
JS/Python tests; publish as patch.
> 
> - **Template utils (JS SDK)**:
> - Add `matchFileDir` to robustly extract file directory from
stack-trace lines (handles anonymous frames).
> - Refactor `getCallerDirectory` to use `matchFileDir` for path
parsing.
> - **Tests**:
>   - Add JS tests for `getCallerDirectory` and `matchFileDir`.
>   - Add Python async/sync tests for `get_caller_directory`.
> - **Release**:
>   - Add changeset marking a patch for `e2b`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
6bd8aa7353479c1657f63c99c732faee042f4c06. 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>
e2b@2.2.7
2025-10-10 12:27:40 +00:00
github-actions[bot] 5b7b3f6a25 [skip ci] Release new versions 2025-10-09 20:55:56 +00:00
Tomas Valenta 498edd876c Remove log in MCP init (#940) @e2b/python-sdk@2.2.5 2025-10-09 20:49:17 +00:00
github-actions[bot] 263f680bab [skip ci] Release new versions 2025-10-09 16:34:42 +00:00
Mish Ushakov faeeb78a3c Skip cache before image in TypeScript (#937)
<!-- 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 -->
e2b@2.2.6
2025-10-09 16:25:47 +00:00
Mish Ushakov 66ee6df13d Update sandbox retention policy details (#933)
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>
2025-10-09 13:04:09 +00:00
github-actions[bot] e5ffc79f7a [skip ci] Release new versions 2025-10-09 12:52:02 +00:00
Jakub Dobry a01c2374a9 feat: pretty default logs for build helper (#925) @e2b/cli@2.2.9 @e2b/python-sdk@2.2.4 e2b@2.2.5 2025-10-09 05:44:03 -07:00
github-actions[bot] fff1ea1173 [skip ci] Release new versions 2025-10-09 08:45:10 +00:00
Tomas Valenta 1203ccbad3 Add MCP experimental feature to beta (#936)
<!-- 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>
@e2b/python-sdk@2.2.3 e2b@2.2.4
2025-10-09 08:37:32 +00:00
github-actions[bot] d7bc0a31d4 [skip ci] Release new versions 2025-10-08 23:00:33 +00:00
Mish Ushakov edfcc63076 Improve method naming and consistency (#934)
<!-- 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>
@e2b/python-sdk@2.2.2 e2b@2.2.3
2025-10-09 00:51:02 +02:00
github-actions[bot] d7ba1e0828 [skip ci] Release new versions 2025-10-08 10:47:40 +00:00
Jakub Dobry a0b6104320 feat: add build v2 command that uses template SDK (#926)
Add template `build-v2` command that uses template SDK

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Introduce `template build-v2` command that builds templates directly
from a Dockerfile via the Template SDK and wire it into the CLI.
> 
> - **CLI - Template**:
> - **New Command**: `template build-v2`
(`packages/cli/src/commands/template/build-v2.ts`)
> - Builds from Dockerfile using SDK:
`Template(...).fromDockerfile(...)` and `Template.build(...)`.
> - Options: `--dockerfile`, `--cmd`, `--ready-cmd`, `--cpu-count`,
`--memory-mb`, `--no-cache`, path via `--path`; alias `bd-v2`.
>     - Validations: template name format, even `memory-mb`.
> - Auth/config: uses access token, API key, domain; streams build logs;
prints success examples.
> - **Wiring**: Add `buildV2Command` to
`packages/cli/src/commands/template/index.ts`.
> - **Release**: Changeset adds patch for `@e2b/cli`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
33578b56dfbcd76c3bb2ecf7fdf6f2cb80c3d0dd. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@e2b/cli@2.2.8
2025-10-08 12:44:21 +02:00
github-actions[bot] fb6dd8303f [skip ci] Release new versions 2025-10-08 01:00:08 +00:00
Tomas Valenta f5cfa6d897 Update node version in SDK and CLI (#935) @e2b/cli@2.2.7 e2b@2.2.2 2025-10-08 00:46:01 +00:00
Tomas Valenta 835f5a0d73 Update CODEOWNERS (#932)
Removed SDK reference ownership from CODEOWNERS.
2025-10-07 12:27:32 +02:00
Meet Kotadiya c66c9cc085 fix(types): make stdin optional in CommandOptions (#931)
This PR fixes a mismatch between the TypeScript types and the
documented/default runtime behavior in the JS SDK.

- The docs indicate `stdin` defaults to `false` (`@default false`).
- The current type declares `stdin: boolean;` (required), which causes
TypeScript errors for callers who rely on the default.
- Change: mark `stdin` as optional (`stdin?: boolean;`) so types match
docs/runtime.
2025-10-04 06:51:31 -07:00
github-actions[bot] 2d62fdcc46 [skip ci] Release new versions 2025-10-03 22:10:01 +00:00
Jonas Scholz ad4b882bff Fix e2b sbx logs -f <id> not following (#930)
This PR fixes 2 bugs that made the follow option in `e2b sbx logs` not
work:

1. `e2b sbx logs -f <id>` failed to follow because the `isRunning`
function was always returning false due to the API call being
unauthenticated if you dont have the `E2B_API_KEY` environment variable
set.

This follows the existing pattern from other API calls:

https://github.com/e2b-dev/E2B/blob/c4ce97e9b9a1809e3419d64499c1e56f9138e3d0/packages/cli/src/commands/sandbox/list.ts#L138-L152

Eventually it would make sense to handle the error here, for now just a
hotfix to fix the --follow usage

2. Once it actually followed, it never stopped following because
`isRunning` was not inside the loop and always true. Now when you kill
the sandbox follow actually stops following

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Fixes `e2b sbx logs -f` by authenticating `isRunning` and re-checking
sandbox state each loop so following works and stops when closed.
> 
> - **CLI — `packages/cli/src/commands/sandbox`**:
>   - **Logs follow behavior (`logs.ts`)**:
> - Re-check `isRunning(sandboxID)` inside the loop (`isSandboxRunning`)
instead of using a cached promise, ensuring follow stops when sandbox is
closed or not found.
>   - **Sandbox state check auth (`utils.ts`)**:
> - Use `ensureAPIKey()` and pass `apiKey` to
`Sandbox.getInfo(getShortID(sandboxID), { apiKey })` so `isRunning` is
authenticated.
> - **Release**:
> - Changeset adds patch for `@e2b/cli` with note: fix sbx logs follow
option.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
5fbd87166b70aca7229ccc1ff8fa2c27f12b1641. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@e2b/cli@2.2.6
2025-10-03 15:06:17 -07:00
github-actions[bot] c4ce97e9b9 [skip ci] Release new versions 2025-10-01 12:45:57 +00:00
Mish Ushakov b1e2701931 Correct file hashing logic in the SDK (#916)
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Jakub Dobry <jakub.dobry8@gmail.com>
@e2b/python-sdk@2.2.1 e2b@2.2.1
2025-10-01 05:37:58 -07:00
github-actions[bot] 64e8f057d2 [skip ci] Release new versions 2025-09-30 15:53:06 +00:00
Jakub Dobry 4da865c1f3 fix: add queue for terminal input (#924) @e2b/cli@2.2.5 2025-09-30 08:49:39 -07:00
github-actions[bot] 25526ff928 [skip ci] Release new versions 2025-09-29 12:53:44 +00:00
Jakub Novák e142c23c31 Set stdin to /dev/null by default (#919)
Disable stdin (setting it to `/dev/null` for `command.run()`, but enable
to setting it to pipe, which you can send the input via
`command.sendStdin()`
This fixes issues with tools checking for stdin and then hanging
indefinitely

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Disables stdin by default and introduces a new `StartRequest.stdin`
flag to opt-in to stdin piping, updating JS/Python SDKs, version gating,
and tests.
> 
> - **Spec/Protobuf**:
> - Add `optional bool stdin` to `process.StartRequest` in
`spec/envd/process/process.proto` and regenerate JS/Python protos.
> - **JS SDK**:
> - Add `ENVD_COMMANDS_STDIN = '0.3.0'` and version check; error if
`stdin === false` on older envd.
> - Extend `CommandStartOpts` with `stdin` (default `false`); pass
`stdin` to `rpc.start`.
> - **Python SDK**:
> - Add `ENVD_COMMANDS_STDIN = Version("0.3.0")` and version check
mirroring JS.
> - Extend async/sync `commands.run()` with `stdin` (default `False`);
pass to `StartRequest`.
>   - Update generated `process_pb2`/`.pyi` with `StartRequest.stdin`.
> - **Tests**:
> - Update send-stdin tests to run commands with `stdin:
true`/`stdin=True`.
> - **Changeset**:
>   - Minor bump for `@e2b/python-sdk` and `e2b`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
458a15187e6eadccd43540e6b8972c4d45e1bb78. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@e2b/python-sdk@2.2.0 e2b@2.2.0
2025-09-29 05:34:16 -07:00