Commit Graph

4581 Commits

Author SHA1 Message Date
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
Jakub Dobry 1c34e5dd0b fix: npm install and pip install helpers (#923) @e2b/python-sdk@2.1.5 e2b@2.1.6 2025-09-29 05:33:46 -07:00
Jakub Dobry ad7ad6f101 Scope template build for typescript and python (#922) 2025-09-29 04:47:24 -07:00
Jakub Novák edc138cbf9 Improve envd version handling (#920)
The envd is always present, so we can simplify the handling + pass it to
filesystem module as a preparation for stdin
2025-09-26 14:59:34 -07:00
github-actions[bot] 4de9dabca0 [skip ci] Release new versions 2025-09-26 13:44:26 +00:00
Jakub Dobry 2ec9ea8a44 feat: add template init for new template SDK (#881) @e2b/cli@2.2.4 2025-09-26 06:40:58 -07:00
github-actions[bot] ae19d941f0 [skip ci] Release new versions 2025-09-26 12:09:44 +00:00
Jakub Novák d90c201cf3 Update docstring in toml after CLI template build (#868)
Forgotten text with old way how to create sandbox in sync Python
@e2b/cli@2.2.3
2025-09-26 12:06:27 +00:00
Jakub Dobry 4b463bd09b Fix template SDK tests (#918) 2025-09-26 05:01:41 -07:00
github-actions[bot] 0726589667 [skip ci] Release new versions 2025-09-25 09:12:18 +00:00
Jakub Dobry b43793ceb9 Fix CLI template migrate copy target (#915) @e2b/cli@2.2.2 2025-09-25 02:09:04 -07:00
Tomas Valenta a730bff1f1 Fix sandbox auto-pause doc syntax (#914)
This PR includes the changes from
https://github.com/e2b-dev/E2B/pull/913, as the workflows there are not
properly configured to handle external PRs without any change.

---------

Co-authored-by: wong2 <wonderfuly@gmail.com>
2025-09-23 11:31:33 -07:00
uucloud 2fc839197d fix: resuming sandbox docs can't print sandbox id (#912) 2025-09-22 00:37:39 -07:00
github-actions[bot] 138f85dd07 [skip ci] Release new versions 2025-09-19 19:03:53 +00:00
Jakub Dobry e81c59be8c Fix template folder copy (#911) @e2b/python-sdk@2.1.4 e2b@2.1.5 2025-09-19 18:55:07 +00:00
github-actions[bot] 2eeca3f807 [skip ci] Release new versions 2025-09-19 15:44:52 +00:00
Jakub Dobry b9c4b16baa feat: add template migration to CLI (#880)
## 🔄 Add Template Migration to CLI

### Summary

This PR introduces a new `migrate` command to the E2B CLI that helps
users transition from the legacy Dockerfile + TOML configuration format
to the new Template SDK format. The migration tool automatically
converts existing `e2b.Dockerfile` and `e2b.toml` configurations into
SDK-compatible template files using Handlebars templates.

### What's Changed

####  New Features

- **Template Migration Command**: Added `e2b template migrate` command
for converting legacy configurations to SDK format
- **Multi-Language Support**: Supports migration to TypeScript, Python
(sync), and Python (async) formats
- **Interactive Language Selection**: CLI prompts for target language
when not specified
- **Multi-stage Dockerfile Support**: Added fallback handling for
complex multi-stage Dockerfiles

#### 🔧 Technical Improvements

- **Enhanced ENV Handling**: Improved parsing of multiple environment
variables from single ENV instructions
- **File Name Conflict Resolution**: Automatic unique filename
generation to prevent overwriting existing files
- **Comprehensive Template Generation**: Creates both development and
production build files

#### 📁 New Template Files

- `typescript-template.hbs` - TypeScript template generation
- `typescript-build.hbs` - TypeScript build script template
- `python-template.hbs` - Python template generation (supports both
sync/async)
- `python-build-async.hbs` - Python async build script template
- `python-build-sync.hbs` - Python sync build script template

### Usage

```bash
# Migrate with interactive language selection
e2b template migrate

# Migrate to specific language
e2b template migrate --language typescript
e2b template migrate --language python-sync
e2b template migrate --language python-async

# Custom paths
e2b template migrate --dockerfile custom.dockerfile --config custom.toml
```

### Generated Output

The migration command generates three files per target:
- `template.{ts|py}` - Template definition using SDK
- `build{.|_}dev.{ts|py}` - Development build script
- `build{.|_}prod.{ts|py}` - Production build script

### Migration Process

1. **Parse Configuration**: Reads `e2b.toml` for template settings
2. **Dockerfile Analysis**: Uses E2B SDK to parse Dockerfile
instructions
3. **Transformation**: Converts Docker instructions to SDK method calls
4. **Code Generation**: Uses Handlebars templates to generate target
language files
5. **File Creation**: Writes template and build files with conflict
resolution

### Error Handling

- **Graceful Dockerfile Parsing**: Falls back to custom image reference
for unparseable Dockerfiles
- **Clear User Guidance**: Provides manual build instructions when
automatic conversion fails
- **Validation**: Ensures required configuration files exist before
migration
@e2b/cli@2.2.1
2025-09-19 17:41:28 +02:00
github-actions[bot] 8255ba42c0 [skip ci] Release new versions 2025-09-19 10:40:39 +00:00
Mish Ushakov 9f9e2a8f20 Render failed layer stack traces on build error (#901)
### Changelog

- Added traces for Python and JavaScript SDK.
- Added methods for stack trace collection, stack trace context
- Updated file upload mechanism for tracing
- Changed API handling to support throwing API errors with traces

> **Note**
> For functions like `aptInstall`, `fromRegistry` which call `.run` and
`.fromImage`, the stack trace has to be replaced so it throws correctly
from parent.

> **Note**
> There are no build logs in the trace, we can add this at later point.

### Examples

Keep in mind that the way the traces are rendered entirely depends on
environment (Bun, Node, Deno, Vitest, Pytest)

**Standard Python**

```
Traceback (most recent call last):
  File "/Users/mish/Documents/Projects/E2B/E2B/packages/python-sdk/tests/sync/template_sync/test_stacktrace.py", line 17, in <module>
    Template.build(
    ~~~~~~~~~~~~~~^
        template,
        ^^^^^^^^^
    ...<2 lines>...
        memory_mb=1024,
        ^^^^^^^^^^^^^^^
    )
    ^
  File "/Users/mish/Documents/Projects/E2B/E2B/packages/python-sdk/e2b/template_sync/main.py", line 157, in build
    wait_for_build_finish(
    ~~~~~~~~~~~~~~~~~~~~~^
        api_client,
        ^^^^^^^^^^^
    ...<4 lines>...
        stack_traces=template._template._stack_traces,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/Users/mish/Documents/Projects/E2B/E2B/packages/python-sdk/e2b/template_sync/build_api.py", line 199, in wait_for_build_finish
    raise BuildException(error_message).with_traceback(stack_trace)
  File "/Users/mish/Documents/Projects/E2B/E2B/packages/python-sdk/tests/sync/template_sync/test_stacktrace.py", line 12, in <module>
    .run_cmd("cat non_existing_file.txt")
     ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
e2b.template.exceptions.BuildException: failed to run command: exit status 1
```

**Pytest**

```
[gw0] darwin -- Python 3.13.3 /Users/mish/Library/Caches/pypoetry/virtualenvs/e2b-e6GdLxLZ-py3.13/bin/python

    @pytest.mark.skip_debug()
    def test_build():
        template = (
            Template()
            .from_image("ubuntu:22.04")
            .run_cmd("cat non_existing_file.txt")
            .set_workdir("/app")
            .set_start_cmd("echo 'Hello, world!'", wait_for_timeout(10_000))
        )
    
        # try:
>       Template.build(
            template,
            alias=str(uuid4()),
            cpu_count=1,
            memory_mb=1024,
        )

tests/sync/template_sync/test_stacktrace.py:18: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
e2b/template_sync/main.py:157: in build
    wait_for_build_finish(
e2b/template_sync/build_api.py:199: in wait_for_build_finish
    raise BuildException(error_message).with_traceback(stack_trace)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    @pytest.mark.skip_debug()
    def test_build():
        template = (
            Template()
            .from_image("ubuntu:22.04")
>           .run_cmd("cat non_existing_file.txt")
            .set_workdir("/app")
            .set_start_cmd("echo 'Hello, world!'", wait_for_timeout(10_000))
        )
E       e2b.template.exceptions.BuildException: failed to run command: exit status 1

tests/sync/template_sync/test_stacktrace.py:12: BuildException
========================================================== short test summary info ==========================================================
FAILED tests/sync/template_sync/test_stacktrace.py::test_build - e2b.template.exceptions.BuildException: failed to run command: exit status 1
```

**Node**

```
node:internal/modules/run_main:104
    triggerUncaughtException(
    ^

    at file:///Users/mish/Documents/Projects/E2B/E2B/packages/js-sdk/tests/template/trace.test.mts:8:4
    at ModuleJob.run (node:internal/modules/esm/module_job:274:25)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:644:26)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:98:5) {
  name: 'BuildError'
}

Node.js v23.11.0
```

**Bun**

```
1 | export class BuildError extends Error {
2 |   constructor(message: string, stackTrace?: string) {
3 |     super(message)
        ^
BuildError: failed to run command: exit status 1
      at /Users/mish/Documents/Projects/E2B/E2B/packages/js-sdk/src/template/errors.ts:3:5

Bun v1.2.4 (macOS arm64)
```

**Vitest**

```
BuildError: failed to run command: exit status 1
 ❯ tests/template/trace.test.ts:8:6
      6|   const template = Template()
      7|     .fromImage('ubuntu:22.04')
      8|     .runCmd('cat folder/test.txt')
       |      ^
      9|     .setWorkdir('/app')
     10|     .setStartCmd('echo "Hello, world!"', waitForTimeout(10_000))
```

---------

Co-authored-by: Jakub Dobry <jakub.dobry8@gmail.com>
@e2b/python-sdk@2.1.3 e2b@2.1.4
2025-09-19 12:34:08 +02:00
Tomas Valenta 345b2c4b4e Fix outdated example in docs (#910) 2025-09-16 18:27:29 +00:00
github-actions[bot] fba88a7aea [skip ci] Release new versions 2025-09-15 05:30:29 +00:00
Mish Ushakov c6efe1f26c CLI: format table > pretty to match rest of DX, added docs (#905)
Follow up my last PR, improves DX consistency and added docs.

Changelog

- format "table" > "pretty" to match other commands (metrics, logs)
- added doc section
@e2b/cli@2.2.0
2025-09-14 22:27:29 -07:00
github-actions[bot] 742ed67a80 [skip ci] Release new versions 2025-09-12 19:51:16 +00:00
Mish Ushakov 2a346bfcd2 Added format option to CLI sandbox + templates list (#903)
This PR is based on https://github.com/e2b-dev/E2B/pull/902, please
proceed with that first

**Changelog**

- Added `--format` option to "e2b sandbox list" and "e2b template list".
Can either be "table" or "json"

Sandboxes list in JSON format

<img width="471" height="341" alt="Screenshot 2025-09-12 at 11 17 45"
src="https://github.com/user-attachments/assets/13455b62-5efb-4b11-8fe3-a39b3fb6dffc"
/>

Templates list in JSON format

<img width="449" height="377" alt="Screenshot 2025-09-12 at 11 18 55"
src="https://github.com/user-attachments/assets/47fa3c2b-2e4c-4854-a87f-65c325261521"
/>
2025-09-12 21:47:07 +02:00
Mish Ushakov a116679b87 CLI: Refactored sandbox kill command (#904)
**Changelog**

- Added ability to pass multiple sandbox ids to "sbx kill id1 id2 id3"
- Added ability to filter sandboxes to be killed by metadata and by
state using --state, --metadata (requires --all)
- Fixed metadata parser and moved to utils
@e2b/cli@2.1.0
2025-09-12 21:45:25 +02:00
github-actions[bot] 9cbcaa40c4 [skip ci] Release new versions 2025-09-09 19:57:39 +00:00
Mish Ushakov 3d6418184f Add custom registries support for pulling base images (#897)
### Changelog

- added support for pulling base images from AWS, Docker, GCP
registries.
- removed unnecessary conversion in build_api.py.
- synced serialize implementation in TypeScript and Python.
- added Cursor Pylance config (side-effect, can delete if unwanted).

### Examples

**TypeScript**

```ts
import { Template } from 'e2b'

// Generic Docker registry
Template().fromRegistry('ubuntu:22.04', {
  username: 'jirka',
  password: 'password',
})

// AWS ECR registry
Template().fromAWSRegistry('ubuntu:22.04', {
  accessKeyId: '123',
  secretAccessKey: '456',
  region: 'eu-west-1',
})

// GCP GCR registry from file path
Template().fromGCPRegistry('ubuntu:22.04', {
  serviceAccountJSON: './service_account.json',
})

// GCP GCR registry from object
Template().fromGCPRegistry('ubuntu:22.04', {
  serviceAccountJSON: { project_id: '123', private_key_id: '456' },
})
```

**Python**

```py
from e2b import Template

# Generic Docker registry
Template().from_registry(
    image="ubuntu:22.04",
    username="jirka",
    password="password",
)

# AWS ECR registry
Template().from_aws_registry(
    image="ubuntu:22.04",
    access_key_id="123",
    secret_access_key="456",
    region="eu-west-1",
)

# GCP GCR registry from file path
Template().from_gcp_registry(
    image="ubuntu:22.04",
    service_account_json="./service_account.json",
)

# GCP GCR registry from object
Template().from_gcp_registry(
    image="ubuntu:22.04",
    service_account_json={"project_id": "123", "private_key_id": "456"},
)
```
@e2b/python-sdk@2.1.2 e2b@2.1.3
2025-09-09 19:51:40 +00:00
Jakub Novák 155db28189 Add title for Sandbox persistence in docs (#900) 2025-09-09 09:12:28 -07:00
dependabot[bot] 50b9c92498 Bump the npm_and_yarn group across 2 directories with 1 update (#789)
Bumps the npm_and_yarn group with 1 update in the / directory:
[next](https://github.com/vercel/next.js).
Bumps the npm_and_yarn group with 1 update in the /apps/web directory:
[next](https://github.com/vercel/next.js).

Updates `next` from 14.2.26 to 14.2.30
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vercel/next.js/releases">next's
releases</a>.</em></p>
<blockquote>
<h2>v14.2.30</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>Backport <code>config.allowedDevOrigins</code> (<a
href="https://redirect.github.com/vercel/next.js/issues/80410">#80410</a>)
(<a
href="https://nextjs.org/docs/app/api-reference/config/next-config-js/allowedDevOrigins">Learn
More</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/ijjk"><code>@​ijjk</code></a> and <a
href="https://github.com/ztanner"><code>@​ztanner</code></a> for
helping!</p>
<h2>v14.2.29</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>Only share incremental cache for edge in next start (<a
href="https://redirect.github.com/vercel/next.js/issues/79389">#79389</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/ijjk"><code>@​ijjk</code></a> for helping!</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vercel/next.js/commit/243072b7a8b7fb3be74a8d9256847669b131ea7e"><code>243072b</code></a>
v14.2.30</li>
<li><a
href="https://github.com/vercel/next.js/commit/f523d4a142913fa9f9f743241cc6132a39f6883b"><code>f523d4a</code></a>
[backport]: config.allowedDevOrigins (<a
href="https://redirect.github.com/vercel/next.js/issues/80410">#80410</a>)</li>
<li><a
href="https://github.com/vercel/next.js/commit/ca9211576c9a21c15980dcc6f022c2cd21542561"><code>ca92115</code></a>
v14.2.29</li>
<li><a
href="https://github.com/vercel/next.js/commit/ec9ee8749e9c6820148ead09a20983afd7ba9482"><code>ec9ee87</code></a>
Only share incremental cache for edge in next start (<a
href="https://redirect.github.com/vercel/next.js/issues/79389">#79389</a>)</li>
<li><a
href="https://github.com/vercel/next.js/commit/e65628a237ea76d77d911aedb12d5137fddd90fb"><code>e65628a</code></a>
v14.2.28</li>
<li><a
href="https://github.com/vercel/next.js/commit/3f5d77418da40d1e7766cbf46668dae0db268776"><code>3f5d774</code></a>
fix: node.js module import error when using middleware (<a
href="https://redirect.github.com/vercel/next.js/issues/77945">#77945</a>)</li>
<li><a
href="https://github.com/vercel/next.js/commit/43f10b8ead008ba36ddf0a955353949e200c409a"><code>43f10b8</code></a>
v14.2.27</li>
<li><a
href="https://github.com/vercel/next.js/commit/649ba863b3ea92436ff1136231d38138535853a9"><code>649ba86</code></a>
backport: fix dynamic route interception not working when deployed with
middl...</li>
<li>See full diff in <a
href="https://github.com/vercel/next.js/compare/v14.2.26...v14.2.30">compare
view</a></li>
</ul>
</details>
<br />

Updates `next` from 14.2.26 to 14.2.30
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vercel/next.js/releases">next's
releases</a>.</em></p>
<blockquote>
<h2>v14.2.30</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>Backport <code>config.allowedDevOrigins</code> (<a
href="https://redirect.github.com/vercel/next.js/issues/80410">#80410</a>)
(<a
href="https://nextjs.org/docs/app/api-reference/config/next-config-js/allowedDevOrigins">Learn
More</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/ijjk"><code>@​ijjk</code></a> and <a
href="https://github.com/ztanner"><code>@​ztanner</code></a> for
helping!</p>
<h2>v14.2.29</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>Only share incremental cache for edge in next start (<a
href="https://redirect.github.com/vercel/next.js/issues/79389">#79389</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/ijjk"><code>@​ijjk</code></a> for helping!</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vercel/next.js/commit/243072b7a8b7fb3be74a8d9256847669b131ea7e"><code>243072b</code></a>
v14.2.30</li>
<li><a
href="https://github.com/vercel/next.js/commit/f523d4a142913fa9f9f743241cc6132a39f6883b"><code>f523d4a</code></a>
[backport]: config.allowedDevOrigins (<a
href="https://redirect.github.com/vercel/next.js/issues/80410">#80410</a>)</li>
<li><a
href="https://github.com/vercel/next.js/commit/ca9211576c9a21c15980dcc6f022c2cd21542561"><code>ca92115</code></a>
v14.2.29</li>
<li><a
href="https://github.com/vercel/next.js/commit/ec9ee8749e9c6820148ead09a20983afd7ba9482"><code>ec9ee87</code></a>
Only share incremental cache for edge in next start (<a
href="https://redirect.github.com/vercel/next.js/issues/79389">#79389</a>)</li>
<li><a
href="https://github.com/vercel/next.js/commit/e65628a237ea76d77d911aedb12d5137fddd90fb"><code>e65628a</code></a>
v14.2.28</li>
<li><a
href="https://github.com/vercel/next.js/commit/3f5d77418da40d1e7766cbf46668dae0db268776"><code>3f5d774</code></a>
fix: node.js module import error when using middleware (<a
href="https://redirect.github.com/vercel/next.js/issues/77945">#77945</a>)</li>
<li><a
href="https://github.com/vercel/next.js/commit/43f10b8ead008ba36ddf0a955353949e200c409a"><code>43f10b8</code></a>
v14.2.27</li>
<li><a
href="https://github.com/vercel/next.js/commit/649ba863b3ea92436ff1136231d38138535853a9"><code>649ba86</code></a>
backport: fix dynamic route interception not working when deployed with
middl...</li>
<li>See full diff in <a
href="https://github.com/vercel/next.js/compare/v14.2.26...v14.2.30">compare
view</a></li>
</ul>
</details>
<br />

Updates `next` from 14.2.26 to 14.2.30
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vercel/next.js/releases">next's
releases</a>.</em></p>
<blockquote>
<h2>v14.2.30</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>Backport <code>config.allowedDevOrigins</code> (<a
href="https://redirect.github.com/vercel/next.js/issues/80410">#80410</a>)
(<a
href="https://nextjs.org/docs/app/api-reference/config/next-config-js/allowedDevOrigins">Learn
More</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/ijjk"><code>@​ijjk</code></a> and <a
href="https://github.com/ztanner"><code>@​ztanner</code></a> for
helping!</p>
<h2>v14.2.29</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>Only share incremental cache for edge in next start (<a
href="https://redirect.github.com/vercel/next.js/issues/79389">#79389</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/ijjk"><code>@​ijjk</code></a> for helping!</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vercel/next.js/commit/243072b7a8b7fb3be74a8d9256847669b131ea7e"><code>243072b</code></a>
v14.2.30</li>
<li><a
href="https://github.com/vercel/next.js/commit/f523d4a142913fa9f9f743241cc6132a39f6883b"><code>f523d4a</code></a>
[backport]: config.allowedDevOrigins (<a
href="https://redirect.github.com/vercel/next.js/issues/80410">#80410</a>)</li>
<li><a
href="https://github.com/vercel/next.js/commit/ca9211576c9a21c15980dcc6f022c2cd21542561"><code>ca92115</code></a>
v14.2.29</li>
<li><a
href="https://github.com/vercel/next.js/commit/ec9ee8749e9c6820148ead09a20983afd7ba9482"><code>ec9ee87</code></a>
Only share incremental cache for edge in next start (<a
href="https://redirect.github.com/vercel/next.js/issues/79389">#79389</a>)</li>
<li><a
href="https://github.com/vercel/next.js/commit/e65628a237ea76d77d911aedb12d5137fddd90fb"><code>e65628a</code></a>
v14.2.28</li>
<li><a
href="https://github.com/vercel/next.js/commit/3f5d77418da40d1e7766cbf46668dae0db268776"><code>3f5d774</code></a>
fix: node.js module import error when using middleware (<a
href="https://redirect.github.com/vercel/next.js/issues/77945">#77945</a>)</li>
<li><a
href="https://github.com/vercel/next.js/commit/43f10b8ead008ba36ddf0a955353949e200c409a"><code>43f10b8</code></a>
v14.2.27</li>
<li><a
href="https://github.com/vercel/next.js/commit/649ba863b3ea92436ff1136231d38138535853a9"><code>649ba86</code></a>
backport: fix dynamic route interception not working when deployed with
middl...</li>
<li>See full diff in <a
href="https://github.com/vercel/next.js/compare/v14.2.26...v14.2.30">compare
view</a></li>
</ul>
</details>
<br />

Updates `next` from 14.2.26 to 14.2.30
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vercel/next.js/releases">next's
releases</a>.</em></p>
<blockquote>
<h2>v14.2.30</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>Backport <code>config.allowedDevOrigins</code> (<a
href="https://redirect.github.com/vercel/next.js/issues/80410">#80410</a>)
(<a
href="https://nextjs.org/docs/app/api-reference/config/next-config-js/allowedDevOrigins">Learn
More</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/ijjk"><code>@​ijjk</code></a> and <a
href="https://github.com/ztanner"><code>@​ztanner</code></a> for
helping!</p>
<h2>v14.2.29</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>Only share incremental cache for edge in next start (<a
href="https://redirect.github.com/vercel/next.js/issues/79389">#79389</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/ijjk"><code>@​ijjk</code></a> for helping!</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vercel/next.js/commit/243072b7a8b7fb3be74a8d9256847669b131ea7e"><code>243072b</code></a>
v14.2.30</li>
<li><a
href="https://github.com/vercel/next.js/commit/f523d4a142913fa9f9f743241cc6132a39f6883b"><code>f523d4a</code></a>
[backport]: config.allowedDevOrigins (<a
href="https://redirect.github.com/vercel/next.js/issues/80410">#80410</a>)</li>
<li><a
href="https://github.com/vercel/next.js/commit/ca9211576c9a21c15980dcc6f022c2cd21542561"><code>ca92115</code></a>
v14.2.29</li>
<li><a
href="https://github.com/vercel/next.js/commit/ec9ee8749e9c6820148ead09a20983afd7ba9482"><code>ec9ee87</code></a>
Only share incremental cache for edge in next start (<a
href="https://redirect.github.com/vercel/next.js/issues/79389">#79389</a>)</li>
<li><a
href="https://github.com/vercel/next.js/commit/e65628a237ea76d77d911aedb12d5137fddd90fb"><code>e65628a</code></a>
v14.2.28</li>
<li><a
href="https://github.com/vercel/next.js/commit/3f5d77418da40d1e7766cbf46668dae0db268776"><code>3f5d774</code></a>
fix: node.js module import error when using middleware (<a
href="https://redirect.github.com/vercel/next.js/issues/77945">#77945</a>)</li>
<li><a
href="https://github.com/vercel/next.js/commit/43f10b8ead008ba36ddf0a955353949e200c409a"><code>43f10b8</code></a>
v14.2.27</li>
<li><a
href="https://github.com/vercel/next.js/commit/649ba863b3ea92436ff1136231d38138535853a9"><code>649ba86</code></a>
backport: fix dynamic route interception not working when deployed with
middl...</li>
<li>See full diff in <a
href="https://github.com/vercel/next.js/compare/v14.2.26...v14.2.30">compare
view</a></li>
</ul>
</details>
<br />


You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/e2b-dev/E2B/network/alerts).

</details>

> **Note**
> Automatic rebases have been disabled on this pull request as it has
been open for over 30 days.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-09 01:52:32 -07:00
0div 0c1a67722f Add webhooks docs and update routes (#877)
Adds the docs on the RESTful API point to manage webhooks.

---------

Co-authored-by: Vasek Mlejnsky <vasek@e2b.dev>
2025-09-08 15:09:52 -07:00