Commit Graph

4901 Commits

Author SHA1 Message Date
Matt Brockman 7c8d29839a feat (api): Sandbox info lifecycle network (#1213)
extracts the `allow_internet_access`, `lifecycle`, and `network` configs
to the get info responses from the api when present.

Create a sandbox with lifecycle and network rules, check info while
running, pause it, and check info again. Network rules, lifecycle
config, and `allowInternetAccess` all returned while running and paused

```
$ e2b sandbox info xxx --format json

# running
{
  "sandboxId": "xxx",
  "templateId": "xxx",
  "name": "stdin",
  "metadata": {},
  "allowInternetAccess": true,
  "envdVersion": "0.4.3",
  "startedAt": "2026-03-19T01:39:56.238Z",
  "endAt": "2026-03-19T01:44:56.238Z",
  "state": "running",
  "cpuCount": 2,
  "memoryMB": 1024,
  "network": {
    "allowOut": ["api.example.com", "cdn.example.com"],
    "denyOut": ["0.0.0.0/0"],
    "allowPublicTraffic": true
  },
  "lifecycle": {
    "onTimeout": "pause",
    "autoResume": true
  }
}

# paused
{
  "sandboxId": "xxx",
  "templateId": "xxx",
  "metadata": {},
  "allowInternetAccess": true,
  "envdVersion": "0.4.3",
  "startedAt": "2026-03-19T01:39:56.238Z",
  "endAt": "2026-03-19T01:40:27.964Z",
  "state": "paused",
  "cpuCount": 2,
  "memoryMB": 1024,
  "network": {
    "allowOut": ["api.example.com", "cdn.example.com"],
    "denyOut": ["0.0.0.0/0"],
    "allowPublicTraffic": true
  },
  "lifecycle": {
    "onTimeout": "pause",
    "autoResume": true
  }
}
```



<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Updates the public `sandbox info` response shape across OpenAPI, JS,
and Python SDKs, which may impact downstream consumers that assume the
previous schema. Risk is moderate since changes are additive/optional
but touch generated models and response mapping logic.
> 
> **Overview**
> **Sandbox info responses now include network and lifecycle
configuration when present.** The OpenAPI spec and generated JS schema
extend `SandboxDetail` with `allowInternetAccess`, `network`, and a new
`lifecycle` object (with `SandboxOnTimeout` and `SandboxLifecycle`).
> 
> The JS SDK updates `SandboxApi.getFullInfo()` and exported types to
return these fields, introducing `SandboxInfoLifecycle` for info
responses. The Python SDK updates generated client models accordingly,
adds `SandboxLifecycle`/`SandboxOnTimeout` models, and maps
`SandboxDetail.network`/`SandboxDetail.lifecycle` into `SandboxInfo`
(plus exports `SandboxInfoLifecycle`).
> 
> A changeset bumps `@e2b/python-sdk` and `e2b` as minor for the
expanded info payload.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
adb22292c08b1db9c8fe60c702f83fee2695af97. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2026-03-23 14:48:02 -07:00
Ben Fornefeld 1c55083de0 Fix: Missing default connection config propagation (#1179)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> **Medium Risk**
> Changes how instance methods merge and forward connection options (api
key/domain/headers/timeouts) to API calls in both JS and Python SDKs,
which can affect request routing and auth headers. Regression tests
reduce risk but behavior changes could impact callers relying on
previous (incorrect) defaults.
> 
> **Overview**
> Fixes **missing propagation of instance `connectionConfig`** when
calling sandbox instance methods (notably `pause`/`betaPause`/`connect`,
plus related methods) so default config is always forwarded and per-call
overrides still win.
> 
> In the JS SDK this centralizes option merging via a new
`resolveApiOpts()` helper and updates multiple `SandboxApi.*` calls to
use it; in the Python SDK it updates `Sandbox.connect()` and
`Sandbox.pause()` (sync + async) to pass
`self.connection_config.get_api_params(**opts)`.
> 
> Adds regression tests in both SDKs to assert defaults are forwarded
and overrides are applied correctly.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
60aa6ca1c386d99613976269106298267d5dbfbe. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2026-03-23 18:27:29 +01:00
github-actions[bot] fd7fb51474 [skip ci] Release new versions 2026-03-23 16:11:58 +00:00
Jakub Novák 5a673d15c8 chore: distinguish between Sandbox and file not found (#1231)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> **Medium Risk**
> Changes public error/exception types in both JS and Python SDKs by
introducing new subclasses and remapping 404/NotFound conditions, which
may affect downstream error handling despite deprecation shims.
> 
> **Overview**
> **Distinguishes “sandbox not found” from “file/directory not found”
across the SDKs.** Adds `FileNotFound*` and `SandboxNotFound*`
error/exception types (with `NotFound*` marked deprecated) and updates
sandbox lifecycle APIs to throw `SandboxNotFound*` for
missing/non-running sandboxes.
> 
> Refactors envd HTTP/RPC error handling in both JS and Python to
support overridable status/code→error maps, and wires filesystem
operations to map 404/`NotFound` into `FileNotFound*`. Tests are updated
accordingly, and patch changesets are added for both packages.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
73da92694c02f71355b1f8625845c82865bf3b1d. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@e2b/cli@2.8.2 @e2b/python-sdk@2.16.0 e2b@2.15.0
2026-03-23 08:59:29 -07:00
dependabot[bot] 1d8431d0df chore(deps): bump tar from 7.5.9 to 7.5.11 in the npm_and_yarn group across 1 directory (#1208)
Bumps the npm_and_yarn group with 1 update in the / directory:
[tar](https://github.com/isaacs/node-tar).

Updates `tar` from 7.5.9 to 7.5.11
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/isaacs/node-tar/commit/bf776f673164215074b62749e0fe80e5834588f4"><code>bf776f6</code></a>
7.5.11</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/f48b5fa3b7985ddab96dc0f2125a4ffc9911b6ad"><code>f48b5fa</code></a>
prevent escaping symlinks with drive-relative paths</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/97cff15d3539a37a4095eb3d287147d9d77c2dc3"><code>97cff15</code></a>
docs: more security info</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/2b72abc1d47c3570e1ad95c9ab557fc4c2e6e4b1"><code>2b72abc</code></a>
7.5.10</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/7bc755dd85e623c0279e08eb3784909e6d7e4b9f"><code>7bc755d</code></a>
parse root off paths before sanitizing .. parts</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/c8cb84629dee649feedde03f2f4ea48f2e44e778"><code>c8cb846</code></a>
update deps</li>
<li>See full diff in <a
href="https://github.com/isaacs/node-tar/compare/v7.5.9...v7.5.11">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tar&package-manager=npm_and_yarn&previous-version=7.5.9&new-version=7.5.11)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually 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 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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-23 09:07:30 +00:00
Mish Ushakov 8abfa627cb fix(cli): use latest Template.build API with name parameter (#1209)
## Summary
- Updates `e2b template init` to generate code using the current
Template.build() API with the `name` parameter
- Replaces deprecated `alias` parameter usage throughout build templates
and generator code
- Maintains support for all languages (TypeScript, Python sync/async)

## Changes
- Renamed `alias` to `name` in generator functions and templates (8
files)
- Updated CLI option description and prompts to reference "template
name" consistently
- Added changeset for patch release

## Testing
All 79 template init tests pass, including validation of generated build
files.

🤖 Generated with Claude Code

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: changes are limited to CLI template-code generation and
user-facing prompts, primarily a rename from deprecated `alias` to
`name` in generated build/README templates.
> 
> **Overview**
> Updates `e2b template init`/`migrate` code generation to pass a `name`
parameter (and `name-dev` for dev builds) instead of the deprecated
`alias`, across the Handlebars generator APIs and the TypeScript/Python
build and README templates.
> 
> Cleans up CLI UX copy to consistently refer to *template name* (option
help text and interactive prompt), and adds a changeset for a patch
release.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
d6e291df259a62efa4e59244b44ef8b4044d26dd. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-20 23:43:21 -07:00
Travis Marceau 0b976beedc docs: update self-hosting cloud provider support wording (#1217)
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
## Summary
- update the self-hosting cloud provider list in `README.md`
- explicitly mark Google Cloud (GCP) as supported
- align provider list formatting/capitalization (`General Linux
machine`)

## Validation
- `pnpm run format`
- `pnpm run lint`
- `pnpm run typecheck`
- `pnpm run test` *(fails in existing python async tests:
`tests/async/sandbox_async/test_create.py::test_auto_pause_without_auto_resume_requires_connect`
with `AsyncApiClient` missing `raise_on_unexpected_status`)*
<!-- CURSOR_AGENT_PR_BODY_END -->

[Slack
Thread](https://e2b-team.slack.com/archives/C080PPTP2DP/p1773953026690659?thread_ts=1773953026.690659&cid=C080PPTP2DP)

<div><a
href="https://cursor.com/agents/bc-3a9b191f-6491-5746-bf8e-ba09a270b1e1"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-3a9b191f-6491-5746-bf8e-ba09a270b1e1"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-03-19 14:35:33 -07:00
Mish Ushakov ca856201f5 feat(templates): add fixMissing option to aptInstall (#1205)
## Summary
- Added `fixMissing` option to `aptInstall()` in JS SDK
- Added `fix_missing` parameter to `apt_install()` in Python SDK
- Enables `--fix-missing` flag for `apt-get install` command

🤖 Generated with Claude Code

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: adds an optional flag passthrough to the generated `apt-get
install` command in both SDKs, with no behavior change unless explicitly
enabled.
> 
> **Overview**
> Adds an optional `fixMissing` (JS) / `fix_missing` (Python) parameter
to template `apt` install helpers so callers can emit `apt-get install
--fix-missing` when builds hit transient package download issues.
> 
> Updates the JS type definitions/docs accordingly and includes a
changeset bumping `e2b` and `@e2b/python-sdk` as a minor release.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4c0b897e192c3ec6b880ab4e3f1695f1b1289d7b. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-18 14:21:01 +00:00
Mish Ushakov db000a20e8 fix(cli): log update check errors in debug mode (#1212)
## Summary
- Add `.catch()` to the update check promise to prevent unhandled
rejections from crashing the CLI process (Node.js >= 15)
- Log caught errors only when `DEBUG` env var is set, keeping normal
output clean

## Test plan
- [ ] Run CLI normally — no error output on update check failure
- [ ] Run with `DEBUG=1` — update check errors are logged to stderr

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: only changes error handling around the update-notifier
promise, affecting logging/observability but not CLI command behavior.
> 
> **Overview**
> Makes the CLI’s update-notification check **fail-safe** by catching
promise rejections instead of silently ignoring them.
> 
> When `DEBUG` is set, the caught error is now logged to stderr (`Update
check failed:`), keeping normal CLI output unchanged.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
88dcf26c56012520bf7b1bd8f5065c102769442e. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 14:05:38 +00:00
Mish Ushakov ba7caa5959 fix(cli): replace update-notifier with simple-update-notifier (#1210)
## Summary
Replaced `update-notifier` v6 with `simple-update-notifier` v2 to fix
the bundled CLI.

`update-notifier` v6 is ESM-only and spawns a child process (`check.js`)
using `import.meta.url`. When tsup bundles the CLI into a single CJS
file, these file paths become invalid and the update check silently
fails. `simple-update-notifier` is CJS-compatible, checks inline without
spawning, and has an identical API surface.

## Test plan
- ✓ All 79 existing CLI tests pass
- ✓ TypeScript, linting, and formatting checks pass
- ✓ Update check banner still displays with same interval

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: swaps the CLI update-check library and tweaks startup flow
to run the check asynchronously; behavior should be equivalent but could
affect when/if the banner prints.
> 
> **Overview**
> Fixes the CLI update banner by replacing `update-notifier` with
`simple-update-notifier`, dropping the old dependency (and its types)
and adding the new one.
> 
> Updates the CLI entrypoint to use `parseAsync()` and run the update
check via an async `main()` function after argument parsing, and adds a
changeset bumping `@e2b/cli` as a patch release.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
a2ddaeec0b4d0324f388d088916a9fcc7ba17432. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-18 06:50:24 -07:00
github-actions[bot] a206ddb6f8 [skip ci] Release new versions 2026-03-18 08:05:53 +00:00
Mish Ushakov 224d1b6230 Remove e2b-docs from changeset ignore (#1211)
Removes e2b-docs from the changeset ignore configuration in
.changeset/config.json.

This change allows e2b-docs to trigger changelog generation during the
release process.

🤖 Generated with Claude Code

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk config-only change that affects release/changelog generation
behavior by including `e2b-docs` in Changesets processing.
> 
> **Overview**
> Removes `e2b-docs` from the Changesets `ignore` list by setting
`ignore` to an empty array in `.changeset/config.json`, so changes in
`e2b-docs` will now be considered during versioning/changelog
generation.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
afe51b41ac9d4f9e6e629886d6cd0ccd1d1e1de3. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
@e2b/python-sdk@2.15.3
2026-03-18 00:42:44 -07:00
Tomas Valenta 710fae6fa1 Limit hanging stream timeout (#1197)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> **Medium Risk**
> Changes request timeout semantics for server-stream calls by adding
`write` and conditional `read` timeouts, which could alter behavior for
long-running/slow streams but is limited to client-side networking
configuration.
> 
> **Overview**
> **Improves timeout handling for server-stream requests in the Python
SDK.** `Client._prepare_server_stream_request` now builds a richer
`httpcore` timeout extension: `request_timeout` applies to `connect`,
`pool`, and `write`, and the separate `timeout` parameter is mapped to a
`read` timeout (to help prevent hanging streams).
> 
> Adds a changeset to publish a patch release documenting the updated
`request_timeout` behavior.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e66ef8e5056cfdb81892222881519e5e63f9e514. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Matt Brockman <matt.brockman@e2b.dev>
2026-03-18 05:25:12 +00:00
Ben Fornefeld 089b8b9805 Remove: SDK Reference artifacts and apps/web (#1199)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> **Medium Risk**
> Medium risk because it deletes a large subtree (`apps/web`) and
removes SDK-reference generation/commit steps from the package publish
workflow, which may affect downstream docs/release expectations.
> 
> **Overview**
> **Removes the docs web app and generated SDK reference content.** The
PR deletes `apps/web` configs/scripts (Next.js/MDX setup, Sentry config,
prebuild/sitemap generation) and removes the committed `sdk-reference`
MDX pages.
> 
> **Simplifies repo automation and ownership.** The package publish
workflow no longer generates/clones/commits SDK reference docs,
`CODEOWNERS` drops web/docs ownership entries, and the root ESLint
config removes `@stylistic/ts` in favor of the built-in `semi` rule.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4158d777b5f3d3fa30b538e434d34ce0e697d473. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2026-03-17 10:08:28 -07:00
github-actions[bot] 0d5cfd1301 [skip ci] Release new versions 2026-03-09 22:23:14 +00:00
Jakub Novák b0ab7f7ec8 fix(cli): add implicit limit to sandbox list (#1164)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> **Low Risk**
> Low risk: CLI-only behavior change that adds a default cap and minor
output messaging; main risk is surprising users who previously relied on
unlimited listing unless they pass `--limit 0`.
> 
> **Overview**
> Adds an **implicit default limit** to `sandbox list` (now defaults to
`1000`, with `--limit 0` meaning no limit) to avoid unbounded sandbox
listing.
> 
> Updates `listSandboxes` to return `{ sandboxes, hasMore }` and prints
a note in pretty output when results are truncated, while keeping API
pagination capped at `100` per page.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
3a291032c379822cb4065321f2d3db4a81a19086. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@e2b/cli@2.8.1 @e2b/python-sdk@2.15.2
2026-03-09 13:16:08 -07:00
joe-lombrozo-s-bot[bot] 16c86d17d0 fix(python-sdk): use per-event-loop transport for async client (#1178) 2026-03-09 19:45:00 +00:00
github-actions[bot] d289772df0 [skip ci] Release new versions 2026-03-06 13:35:12 +00:00
Mish Ushakov 3c5684275c fix(js-sdk): pass sandbox headers to EnvdApiClient (#1175)
## Summary
- Fixes `Sandbox.create()` failing in self-hosted environments because
`sandboxHeaders` were not propagated to `EnvdApiClient`
- Spreads `sandboxHeaders` (`E2b-Sandbox-Id`, `E2b-Sandbox-Port`) into
the headers passed to the envd API client

Closes #1158
Based on #1159 by @ajuijas

## Test plan
- [ ] Verify sandbox creation works in self-hosted environments
- [ ] Verify sandbox headers are correctly passed to EnvdApiClient

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> <sup>[Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) is
generating a summary for commit
f78d8b53196ced16dc48916720f02a1cb957884b. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Signed-off-by: ajuijas <ijas.ahmd.ap@gmail.com>
Co-authored-by: ajuijas <ijas.ahmd.ap@gmail.com>
@e2b/python-sdk@2.15.1 e2b@2.14.1
2026-03-06 14:22:09 +01:00
Mish Ushakov 222105dc8f fix: include dotfiles in template file uploads (#1162)
## Summary
- Enable glob patterns to match files starting with dot (e.g., `.env`,
`.gitignore`)
- JS SDK: Add `dot: true` to glob calls in `getAllFilesInPath`
- Python SDK: Add `glob.DOTMATCH` flag to glob calls in
`get_all_files_in_path`
- Add comprehensive tests for dotfile handling in both SDKs

Previously, the glob library defaults prevented dotfiles from being
matched, preventing upload of configuration files like `.env`. This fix
enables proper handling of dotfiles in template file uploads.

## Test plan
-  All 16 JS SDK tests pass (4 new dotfile tests)
-  All 17 Python SDK tests pass (4 new dotfile tests)
-  `pnpm run format` passes
-  `pnpm run lint` passes
-  `pnpm run typecheck` passes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Small, well-scoped change to glob options that only broadens matched
file sets; main risk is unintentionally including hidden files unless
excluded via ignore patterns.
> 
> **Overview**
> Template file collection now includes dot-prefixed files and
directories (e.g., `.env`, `.gitignore`, `.hidden/**`) when
building/uploading templates.
> 
> This updates globbing in the JS SDK’s `getAllFilesInPath` to set `dot:
true` (including recursive directory expansion) and the Python SDK’s
`get_all_files_in_path` to add `glob.DOTMATCH`, and adds targeted tests
in both SDKs to verify dotfile inclusion and that ignore patterns still
exclude specified dotfiles. A changeset bumps both `e2b` and
`@e2b/python-sdk` as patch releases.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
fc3cbcc232bc28559d38bb267162d3f55138b558. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 08:16:16 -08:00
github-actions[bot] d8559492d0 [skip ci] Release new versions 2026-03-04 21:43:16 +00:00
Matt Brockman 7027f369a3 autoresume: lifecycle component in sdk (#1146)
Implements the `lifecycle` prop on `Sandbox.create`, taking over and
deprecating the `beta_pause` functionality.

Currently supports:
- `on_timeout`: `kill` (default) | `pause`. Controls what should happen
to the sandbox when it hits end of life. Pause allows for resuming
- `auto_resume`: False (default) | True. Whether the sandbox should
autoresume on traffic

Intended for additional functionality as we update the backend to
support additional props. Blocked from deploying until the API and
client-proxy are deployed but for pre-approval.

(Meant to be extended later as add more capabilities to the API)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes the API contract and request payload shape for sandbox
auto-resume and alters lifecycle/timeout behavior mapping, which could
break older integrations if backend/client versions are mismatched.
> 
> **Overview**
> Adds a new `lifecycle` configuration on `Sandbox.create` (JS + Python)
to control what happens at timeout (`kill` vs `pause`) and whether
paused sandboxes auto-resume on traffic (`auto_resume`).
> 
> Deprecates `betaPause`/`beta_pause` and the JS `autoPause` create
option in favor of the new lifecycle semantics, updates connect/pause
call paths accordingly, and expands tests to cover resume-on-connect and
auto-resume behaviors.
> 
> Updates the OpenAPI contract and generated clients so `autoResume` is
now an object with an `enabled: boolean` flag (removing the previous
policy enum), and bumps SDK versions via a changeset.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
515f9b7fc13a5ec13db75450e8f6252e3c7bcf03. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@e2b/python-sdk@2.15.0 e2b@2.14.0
2026-03-04 13:23:08 -08:00
github-actions[bot] e04780fafb [skip ci] Release new versions 2026-03-04 14:59:03 +00:00
Berry e83cf86454 feat: add getTags/get_tags to list all tags for a template (#1132)
## Summary
- Add `GET /templates/{templateID}/tags` endpoint to the OpenAPI spec
- Add `Template.getTags()` to JS/TS SDK
- Add `Template.get_tags()` (sync) and `AsyncTemplate.get_tags()`
(async) to Python SDK
- Returns a list of `TemplateTag` objects with `tag`, `buildId`, and
`createdAt` fields

## Test plan
- Added unit tests for JS SDK (`Template.getTags` happy path + 404
error)
- Added unit tests for Python SDK (sync + async, happy path + error)
@e2b/cli@2.8.0 @e2b/python-sdk@2.14.1 e2b@2.13.1
2026-03-03 16:38:39 +01:00
Mish Ushakov 0ed060f341 Added keep alive (notice) (#1094)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Clarifies connection behavior in JS SDK API clients; no functional
changes.
> 
> - Adds inline comments in `api/index.ts` and `envd/api.ts` noting that
undici keeps connections alive by default and leaves `keepalive`
commented out
> - No code path, config, or runtime behavior modified
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
127f6fe57151e86a0a5280af58902f1efb1e46ee. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2026-03-03 12:26:56 +00:00
Jakub Dobry 6371d0c1ce fix: remove 'Paused' from sandbox not found error in set_timeout (#1174) 2026-03-02 14:54:27 -08:00
joe-lombrozo-s-bot[bot] bcc6ea867a feat(cli): add pause and resume commands for sandboxes (#1170)
Co-authored-by: djeebot <djeebot@users.noreply.github.com>
Co-authored-by: Joseph Lombrozo <joe.lombrozo@e2b.dev>
2026-03-02 14:51:51 -08:00
Jakub Novák 01f5713d7a chore(js): update deps (#1172)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> **Medium Risk**
> Primarily dependency/lockfile updates across the JS monorepo; risk
comes from transitive runtime changes and potential build/lint behavior
shifts after the version bumps.
> 
> **Overview**
> Updates JS dependencies across the repo and refreshes the
`pnpm-lock.yaml` to match.
> 
> Also bumps tooling-related versions (notably `pnpm` via
`packageManager` and the ESLint/TypeScript ESLint toolchain) and
adds/keeps a `pnpm.overrides` pin for `@next/eslint-plugin-next`'s
`glob` dependency.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
eceea9624f031c7d3ba74000018f01c71cfc510e. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2026-02-28 11:09:06 -08:00
Jakub Novák afd4e4a4d6 chore: update tar (#1171)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> **Low Risk**
> Low risk dependency-only change; behavior should be unchanged aside
from upstream `tar` bugfixes/patches that could subtly affect archive
creation in the JS SDK.
> 
> **Overview**
> Updates the JS SDK dependency on `tar` from `^7.5.4` to `^7.5.9` in
`packages/js-sdk/package.json`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
664f95865263fe5f42b60bc3516240bb89fb879e. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2026-02-28 10:12:15 -08:00
Jakub Dobry 59a0f0478a chore: use template versioning in tests (#1151) 2026-02-26 20:58:20 -08:00
github-actions[bot] e0ae721232 [skip ci] Release new versions 2026-02-26 19:55:13 +00:00
Jakub Dobry b989b29847 fix: handle invalid status codes gracefully in error handler (#1167) @e2b/cli@2.7.3 2026-02-26 11:49:29 -08:00
Jakub Dobry 51582e8315 fix: update kill test to use valid sandbox ID format (#1169)
The infra now validates sandbox ID format (^[a-z0-9]+$), allowing only
lowercase alphanumeric characters. The test was using
'non-existing-sandbox' which fails format validation due to hyphens,
returning a 400 error instead of reaching the expected 404 path.

This updates the test to use 'nonexistingsandbox' — a valid format that
doesn't exist, so it properly hits the 404 "not found" response and
returns false as expected.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: test-only change that updates hardcoded IDs to match new
validation rules, without modifying runtime logic.
> 
> **Overview**
> Updates JS and Python SDK `kill non-existing sandbox` tests to use a
lowercase alphanumeric sandbox ID (`nonexistingsandbox`) instead of a
hyphenated one, so the tests exercise the intended *not-found* path
rather than failing format validation.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e43acb66ef4465ae60a368ac8c7377023b4a6da3. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Jakub Novak <jakub@e2b.dev>
2026-02-26 02:08:58 -08:00
github-actions[bot] 7e7445de53 [skip ci] Release new versions 2026-02-25 21:17:39 +00:00
Matt Brockman 6c1db7dc28 fix: avoid full pagination on listSandboxes in JS SDK (#1166) @e2b/cli@2.7.2 2026-02-25 13:09:11 -08:00
Tomas Srnka 1852298a1a Update Node.js Dockerfile to install Yarn differently (#1165)
The Yarn GPG key (6A010C5166006599AA17F08146C2130DFD2497F5) can no
longer be fetched from keyservers, it returns "no user ID". So the
signature verification fails. So let's just download yarn via npm and
simplify this.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Build-only change confined to the Dockerfile; main risk is potential
reproducibility/supply-chain differences from switching Yarn
installation method.
> 
> **Overview**
> Updates `templates/base/e2b.Dockerfile` to install Yarn via `npm
install -g yarn@1.22.19` instead of downloading and GPG-verifying the
Yarn tarball, removing the keyserver dependency and associated
verification steps.
> 
> Also normalizes the Node version env var syntax from `ENV NODE_VERSION
20.9.0` to `ENV NODE_VERSION=20.9.0`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
243ce4b47da851e3faf64e2329016ef7a9681632. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2026-02-25 17:14:48 +01:00
Tomas Srnka d1d6ddf0ce Update Docker build to support arm64 platform (#1163)
Update Docker build to support arm64 platform
2026-02-25 16:30:06 +01:00
Matt Brockman dc77742653 rm logs test for now, can be slow to query (#1153)
the logs test on the cli can just be really slow and time out resulting
in false positives; will want to establish faster --limit at some point
maybe.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Test-only changes that reduce coverage for `sandbox logs` but do not
affect production logic.
> 
> **Overview**
> Disables the `sandbox logs` backend integration test in
`backend_integration.test.ts` by commenting it out with a note about
slow log availability causing timeouts.
> 
> Minor formatting fix in `runCliWithPipedStdin` to correct indentation
around the constructed `ETIMEDOUT` error object.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
bbc4720e3f253d55eb583de50ab42cd71248b135. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2026-02-24 12:54:17 -08:00
github-actions[bot] 602cc2d51f [skip ci] Release new versions 2026-02-24 20:53:45 +00:00
Jakub Dobry a55ca219e9 feat: snapshots (#1111) @e2b/python-sdk@2.14.0 e2b@2.13.0 2026-02-24 11:59:11 -08:00
github-actions[bot] f922884447 [skip ci] Release new versions 2026-02-21 02:00:30 +00:00
Jakub Dobry 24279d07b9 fix: scope sandbox_test_id fixture per-test to prevent cross-worker interference (#1149) @e2b/cli@2.7.1 @e2b/python-sdk@2.13.3 2026-02-20 17:50:24 -08:00
Jakub Dobry 6798071059 fix: resolve CLI sandbox logs timeout and waitForSandboxEnd bug (#1148)
## Summary
- Skip the unnecessary `isRunning()` API call and `wait(400)` when
`--follow` is not set in `sandbox logs`, preventing flaky timeouts in
the backend integration test
- Fix `waitForSandboxEnd` to return the `running` variable instead of
the `isRunning` function reference, so the follow-mode loop actually
terminates when the sandbox stops

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Small control-flow fixes in the CLI logs loop and sandbox status
monitor; low blast radius with minimal behavioral change beyond making
termination conditions correct.
> 
> **Overview**
> `sandbox logs` now breaks out immediately after printing the first
batch when `--follow` isn’t set, avoiding extra status polling/sleeps
that could cause flaky timeouts.
> 
> Fixes `waitForSandboxEnd` to return the mutable `running` boolean
(instead of the `isRunning` function reference), so follow-mode loops
can actually stop when the sandbox exits.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
87cd7af5b1bdf9a7a4fe16e7a2100256b3d55d7b. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2026-02-20 17:46:32 -08:00
Mish Ushakov a2cd86cfd4 start sandbox in detached mode using -d (#1147)
Example:

```
e2b sbx create base -d
```

Output:

```
Use the following link to inspect this Sandbox live inside the E2B Dashboard️:
↪ https://e2b.dev/dashboard/inspect/sandbox/i4dct03zur3guplje3eia

Sandbox created with ID i4dct03zur3guplje3eia using template base
```

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Small CLI behavior change isolated to sandbox creation/connection
flow; primary risk is unintended behavior differences in terminal-attach
path due to the refactor.
> 
> **Overview**
> Adds `-d, --detach` to `e2b sandbox create` so users can create a
sandbox and get its dashboard/ID output without connecting a terminal.
> 
> Refactors sandbox creation to happen in the command handler and passes
the created `sandbox` into `connectSandbox`, which now only manages the
keep-alive loop and terminal attachment when not detached.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
cb8be14bb71073b8299010cd45509ca2a58ca32e. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2026-02-20 21:36:39 +00:00
Ben Fornefeld a26e2136f6 Feat: Print sandbox inspect url on sandbox spawn (#841)
This PR updates the sandbox spawn process to print the inspect URL to
the console when a new sandbox is created using `e2b sbx spawn` or `e2b
sbx create`. This makes it easier for users to access and debug new
sandboxes directly after creation.

<img width="556" height="87" alt="Screenshot 2025-09-15 at 2 54 22 PM"
src="https://github.com/user-attachments/assets/783129e3-443d-4a7c-a86e-a4265d90831f"
/>

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: primarily adds extra CLI output and URL construction with
env-configurable base; no changes to sandbox lifecycle or auth logic.
> 
> **Overview**
> **Prints a Dashboard inspection link when connecting to or creating a
sandbox.** Both `sandbox connect` and `sandbox create` now output a
terminal-clickable E2B Dashboard *Inspect Sandbox* URL immediately after
obtaining the `sandboxId`.
> 
> Adds `DASHBOARD_BASE`/`SANDBOX_INSPECT_URL` (env-overridable via
`E2B_DASHBOARD_BASE`/`E2B_DOMAIN`) and a new
`printDashboardSandboxInspectUrl` helper to format and print the link,
plus a changeset bump for `@e2b/cli`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
f132029f7540408e47e4c37ee58716c95c63a000. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2026-02-20 18:32:54 +01:00
Mish Ushakov 8f53fdc746 Set default template to "base" on spawn command (#938)
- When template is unspecified, the spawn/create command will use base
as a default
2026-02-18 13:11:08 +00:00
Jakub Dobry 85f5b8d2b3 chore: various bug fixes (#1145)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> **Low Risk**
> Mostly CI/test changes plus a small logging tweak; low production
impact, with main risk being altered test timing/flake behavior due to
new timeout defaults.
> 
> **Overview**
> Improves release-candidate GitHub workflows by passing sanitized
`tag`/`preid` via step `env` vars and quoting them when running `npm
version`/`npm publish`, reducing the chance of input/expansion issues.
> 
> Stabilizes sandbox internet-access tests in JS and Python by switching
the curl target to Google’s `generate_204` endpoint and updating
expected status codes. Python tests also tighten global `pytest` timeout
to 30s, remove per-sandbox default timeouts from fixtures, and add 180s
timeouts specifically for template test suites via new `conftest.py`
files.
> 
> CLI sandbox status polling now logs the caught error when
`Sandbox.getInfo` fails (instead of silently returning `false`).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
187849338dd46f9d0dd1adb0a070719ebad87309. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2026-02-18 11:37:32 +01:00
Jakub Dobry 571210af0c chore: allow releases from PRs (#1142) 2026-02-18 05:28:17 +00:00
Jakub Dobry 5cc2c8a1ef fix(tests): vitest state cross pollution (#1144) 2026-02-17 17:21:23 -08:00
Jakub Dobry c5e64341cc chore(ci): add unified SDK tests workflow with staging (#1141) 2026-02-17 09:15:31 -08:00