Commit Graph

4820 Commits

Author SHA1 Message Date
Matt Brockman 4b9cc043dc Fix/python envd stable transport (#1368) @e2b/python-sdk@2.25.1 2026-05-29 16:39:30 -07:00
Mish Ushakov caf2174a58 Updated CLAUDE.md (#1365) 2026-05-29 12:49:44 +02:00
Matt Brockman f6de2ae488 Add AGENTS.md symlink (#1366)
lets non-claude people get the benefit of agents
2026-05-28 23:50:01 +00:00
github-actions[bot] 44f07b607a [skip ci] Release new versions 2026-05-27 21:33:52 +00:00
Mish Ushakov 4a4bb36839 feat(sdk): validate E2B API key format client-side (#1356)
## Summary

- Both JS and Python SDKs now validate that the configured E2B API key
matches `e2b_` followed by 40 hex characters (mirroring the server-side
check in
[`infra/.../keys/key.go`](https://github.com/e2b-dev/infra/blob/main/packages/shared/pkg/keys/key.go#L66))
and throw `AuthenticationError` / `AuthenticationException` with an
example token (`e2b_0000…`) and a link to the API Keys dashboard tab.
- Validation runs inside `ApiClient` / `ApiClient.__init__` whenever an
API key is present, so callers get immediate, actionable feedback
instead of a generic 401 from the server.
- Added unit tests (`validateApiKey.test.ts`,
`test_validate_api_key.py`) and updated existing fixtures that used
placeholder keys like `'test-key'` / `'base-api-key'` to use the valid
format.

## Test plan

- [x] `pnpm run format`, `pnpm run lint`, `pnpm run typecheck`
- [x] `pnpm exec vitest run tests/api/validateApiKey.test.ts
tests/api/handleApiError.test.ts tests/sandbox/abortSignal.test.ts
tests/template/abortSignal.test.ts
tests/sandbox/configPropagation.test.ts tests/connectionConfig.test.ts`
- [x] `poetry run pytest tests/test_validate_api_key.py
tests/test_api_client_transport.py
tests/sync/sandbox_sync/test_config_propagation.py
tests/async/sandbox_async/test_config_propagation.py
tests/test_connection_config.py`

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
@e2b/python-sdk@2.25.0 e2b@2.27.0
2026-05-27 21:21:19 +00:00
Mish Ushakov e091e0308d chore(spec): add prettier yaml formatting check to lint workflow (#1358)
## Summary
- Add `spec/` to the pnpm workspace with a `package.json` that runs
`prettier --check`/`--write` on `openapi.yml` and `envd/envd.yaml`.
- The existing Lint workflow's recursive `pnpm run lint`/`pnpm run
format` now enforces YAML formatting automatically — no workflow changes
needed.
- Reformat `spec/openapi.yml` (two `$ref` quote-style changes) so the
new check passes.

## Test plan
- [ ] CI Lint workflow passes
- [ ] `pnpm --filter @e2b/spec run lint` succeeds locally

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

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 22:57:41 +02:00
Mish Ushakov 2691c73d1c chore(sdk): sync OpenAPI spec from infra, regenerate clients (#1357)
## Summary
- Sync `spec/openapi.yml` from
[e2b-dev/infra@main](https://github.com/e2b-dev/infra/blob/main/spec/openapi.yml)
and re-run `make codegen`.
- Schema changes surfaced in the generated clients:
`SandboxMetric.memCache` (new required int64 — also exposed on the
public `SandboxMetrics` wrapper in both SDKs), `NodeStatus` gains
`standby`, `TeamUser.email` becomes nullable + deprecated, and `POST
/v3/templates` gains a `403` response.
- Upstream-only spec changes (not generated because the client filters
by tag): new `AuthProviderBearerAuth`/`AuthProviderTeamAuth` security
schemes, new admin endpoints for team API keys, and a `clusterID` query
param on `GET /nodes`.

## Test plan
- [x] \`pnpm run format\`, \`pnpm run lint\`, \`pnpm run typecheck\`
- [x] JS \`tests/sandbox/metrics.test.ts\` against the live API
- [x] Python sync + async \`test_metrics.py\` against the live API

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 22:57:28 +02:00
Mish Ushakov a6bf71a083 fix(sdks): handle multi-source COPY/ADD in fromDockerfile (#1355)
## Summary

- Fixes #1349: `Template.fromDockerfile` (JS) and
`Template.from_dockerfile` (Python) silently dropped intermediate
sources from multi-source `COPY`/`ADD`, keeping only the first one and
producing broken images without warning.
- Both parsers now emit one `copy()` call per source to the same
destination (matching Docker semantics), preserving `--chown` across all
calls.
- Added tests in both SDKs (multi-source COPY, and multi-source COPY
with `--chown`), plus changesets for `e2b` and `@e2b/python-sdk`.

## Test plan

- [x] `pnpm run test tests/template/methods/fromDockerfile.test.ts` (JS)
- [x] `poetry run pytest
tests/{async,sync}/template_*/methods/test_from_dockerfile.py` (Python)
- [x] `pnpm run format` / `pnpm run lint`

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 22:57:03 +02:00
Jakub Novak e2a660c3ee [skip ci] Release new versions e2b@2.26.0 2026-05-27 12:20:55 +00:00
Jakub Novák 18a10afa87 chore(js): add max concurrency limits (#1351)
Set limit for max concurrent inflight connection, with burst traffic it
could happen that the number of connection overwhelms the underlaying
infrastructure or at least saturate it to the point each request is too
slow to succeed and blocking the rest
2026-05-27 04:17:40 -07:00
github-actions[bot] d39f17e123 [skip ci] Release new versions 2026-05-27 00:24:30 +00:00
Mish Ushakov c485bf5476 feat(sdk): add Sandbox.updateNetwork / update_network (#1337) @e2b/python-sdk@2.24.0 e2b@2.25.0 2026-05-26 17:12:29 -07:00
Mish Ushakov 3786f34336 feat(sdk): support structured network rules with per-host transforms (#1286) 2026-05-26 16:35:21 -07:00
Mish Ushakov ba315c0795 feat(js-sdk): support AbortSignal for Template operations (#1339)
## Summary

- Extends AbortSignal support (introduced for Sandbox in #1328) to
`Template.build`, `buildInBackground`, `getBuildStatus`, `exists`,
`assignTags`, `removeTags`, and `getTags`. Aborting the signal cancels
in-flight requests and, for `Template.build`, the status-polling loop.
- Refactors signal+timeout plumbing: `ConnectionConfig` now stores
`signal`, and `ApiClient` / `VolumeApiClient` auto-apply it (plus
`requestTimeoutMs`) to every request via a custom fetch wrapper. The 22
explicit \`signal: config.getSignal(...)\` lines across sandboxApi.ts
and volume/index.ts are dropped.
- Volume's \`FILE_TIMEOUT_MS\` overrides move one level up into the
\`VolumeConnectionConfig\` constructor. Dead
\`VolumeConnectionConfig.getSignal()\` removed.

## Test plan

- [x] \`pnpm run typecheck\` / \`lint\` / \`format\`
- [x] New \`tests/template/abortSignal.test.ts\` covering all 8 Template
entry points (MSW-based)
- [x] Existing \`tests/sandbox/abortSignal.test.ts\`,
\`tests/template/uploadFile.test.ts\`,
\`tests/connectionConfig.test.ts\` still pass

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 23:21:31 +02:00
Matt Brockman 3ea4ef597b js uses the stable sandbox host url with headers (#1342)
improved h2 perf for envd execution by using stable `sandbox.e2b.app`
with headers (aside from upload/download reqs)

can change number of connections via `E2B_ENVD_RPC_CONNECTIONS` env var

| Total | SDK | Created | Executed | Exec wall | Exec p50 | Exec p90 |
Exec p95 | Exec p99 | Peak exec conns | Peak exec hosts | Errors |
|---:|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---|
| 750 | old per-sandbox host | 750/750 | 749/750 | 9.792s | 4489ms |
8682ms | 9213ms | 9631ms | 752 | 750 | 1x `fetch failed` |
| 750 | updated stable host | 750/750 | 750/750 | 0.840s | 595ms | 752ms
| 783ms | 794ms | 102 | 1 | 0 |
| 1500 | old per-sandbox host | 1500/1500 | 837/1500 | 10.783s | 5200ms
| 9633ms | 10199ms | 10603ms | 1502 | 1500 | 663x `fetch failed` |
| 1500 | updated stable host | 1500/1500 | 1500/1500 | 1.236s | 775ms |
1085ms | 1124ms | 1149ms | 102 | 1 | 0 |

---------

Co-authored-by: Jakub Novák <jakub@e2b.dev>
2026-05-26 06:48:46 -07:00
github-actions[bot] 43c4524293 [skip ci] Release new versions 2026-05-22 19:46:53 +00:00
Jakub Novák 8640378c17 feat(python-sdk): allow opting out of HTTP/2 in get_transport (#1347) @e2b/cli@2.10.2 @e2b/python-sdk@2.23.1 2026-05-22 12:40:00 -07:00
Mish Ushakov a9bb287fc1 fix(python-sdk): close gRPC streams on watcher/command teardown (#1346)
## Summary
- `AsyncWatchHandle.stop()` and `AsyncCommandHandle.disconnect()`
previously only cancelled the consumer task and left the underlying
server-streaming gRPC call open — the `await self._events.aclose()` was
commented out as a Python 3.8 `RuntimeError` workaround. On long-lived
sandboxes this leaks one stream per call and eventually produces
`Code.internal: error creating watcher: too many open files`.
- The SDK now pins `python = "^3.10"`, so the workaround is removed.
`stop()`/`disconnect()` cancel the consumer task, await it, then
`aclose()` the async generator. The JS SDK already aborts the underlying
request via `AbortController`, so no JS change is needed.

## Test plan
- [ ] CI: `pnpm run format`, `pnpm run lint`, `pnpm run typecheck`
(passed locally)
- [ ] CI: `tests/async/sandbox_async/files/test_watch.py` and async
command tests still pass
- [ ] Reproduce the leak: in a long-lived async sandbox, repeatedly
create+stop a watcher and confirm fd count no longer climbs

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-05-22 20:51:21 +02:00
Mish Ushakov 6d66d159d1 fix(cli): handle missing xdg-open on headless machines during login (#1345)
## Summary
- `e2b auth login` previously crashed on headless machines (no
`xdg-open`) with an unhandled `error` event from the spawned browser
process.
- Attach an `error` listener (and `.catch`) to the `open` call; on
failure, print the login URL so the user can open it manually.
- Added a changeset for `@e2b/cli` (patch).

## Test plan
- [ ] On a headless Linux box without `xdg-open`, run `e2b auth login`
and confirm the CLI prints the manual URL instead of crashing.
- [ ] On macOS/Linux with a desktop, confirm the browser still opens
automatically and login completes.

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 20:37:24 +02:00
github-actions[bot] 74c42b15ee [skip ci] Release new versions 2026-05-22 15:53:30 +00:00
Jakub Novák 2680c89c3e Remove Sandbox.betaCreate / beta_create (#1344)
It didn't have any extra functionality
@e2b/python-sdk@2.23.0 e2b@2.24.0
2026-05-22 16:36:29 +02:00
github-actions[bot] 9b0c25f8ae [skip ci] Release new versions 2026-05-22 09:48:05 +00:00
Tomas Valenta d21b936bf7 fix(sdks): make lifecycle.on_timeout and auto_pause precedence consistent (#1343)
## Summary

When `lifecycle.on_timeout` is set it wins; otherwise we fall back to
the `auto_pause` argument.

Previously the Python SDKs subscripted `lifecycle["on_timeout"]`, which
raised `KeyError` if a caller passed a `lifecycle` dict missing that key
(TypedDict is not enforced at runtime). The JS SDK silently used the
whole `lifecycle` object even when `onTimeout` was undefined. In both
cases, mixing `lifecycle` and `auto_pause` had inconsistent and
surprising behavior across the public surfaces (`create` vs
`beta_create`).

Now both SDKs use `.get`/optional chaining on `on_timeout` and only
treat `lifecycle` as authoritative when that field is actually present.

Touched files:
- `packages/python-sdk/e2b/sandbox_async/sandbox_api.py`
- `packages/python-sdk/e2b/sandbox_sync/sandbox_api.py`
- `packages/js-sdk/src/sandbox/sandboxApi.ts`

---------

Co-authored-by: Jakub Novak <jakub@e2b.dev>
@e2b/python-sdk@2.22.0 e2b@2.23.0
2026-05-22 02:28:18 -07:00
github-actions[bot] 2eaba1a7a8 [skip ci] Release new versions 2026-05-22 00:18:05 +00:00
Matt Brockman e10958d87e Js api http2 dispatcher (#1340)
use undici for the js api calls as well where we can; improved
connection use leads to speed improvement at high concurrency
e2b@2.22.0
2026-05-21 12:27:42 -07:00
Vasek Mlejnsky 9036ec80ab Fix NPM badge size (#1336) 2026-05-20 03:24:17 +00:00
github-actions[bot] 71f6719bf6 [skip ci] Release new versions 2026-05-18 12:30:54 +00:00
Mish Ushakov 2ac5de2edf feat(js-sdk): support AbortSignal for request cancellation (#1328) e2b@2.21.0 2026-05-15 23:24:16 +02:00
github-actions[bot] 70f0d833f5 [skip ci] Release new versions 2026-05-14 17:36:14 +00:00
Mish Ushakov eaf452a82b feat: add optional name to createSnapshot and return snapshot names (#1327)
## Summary
- Add optional `name` parameter to `createSnapshot` / `create_snapshot`
in the JS and Python SDKs so callers can name the resulting snapshot
template.
- Return the `names` field from the snapshot API on `SnapshotInfo` (both
in `createSnapshot` responses and in `listSnapshots` paginator results)
so callers can discover the namespaced snapshot names.
- Includes a changeset (`patch` for `e2b` and `@e2b/python-sdk`).

## Test plan
- [ ] `pnpm run format`, `pnpm run lint`, `pnpm run typecheck` all pass
locally
- [ ] Integration tests on a sandbox with valid credentials:
`sandbox.createSnapshot({ name: 'my-snap' })` returns non-empty `names`

Resolves https://github.com/e2b-dev/E2B/issues/1249

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
@e2b/python-sdk@2.21.1 e2b@2.20.1
2026-05-14 17:22:31 +00:00
Mish Ushakov 575339b163 test(python-sdk): parallelize async sandbox teardown (#1309)
## Summary
- Replace the sequential `for sandbox in sandboxes: await
sandbox.kill()` teardown in `async_sandbox_factory` with
`asyncio.gather(..., return_exceptions=True)` so a failure on one kill
no longer blocks cleanup of the rest, and teardown runs concurrently.
- Hoist the `_test_failed` check above the loop so the failure log is
printed once per fixture rather than per sandbox.

## Test plan
- [ ] `pnpm run format`, `pnpm run lint`, `pnpm run typecheck`
(python-sdk) all pass
- [ ] `pnpm run test` against affected python async sandbox tests

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 13:26:47 +00:00
github-actions[bot] 9e962ae555 [skip ci] Release new versions 2026-05-11 17:38:06 +00:00
Matt Brockman b2a2786707 Bug e2b 2195 throws dynamic usage of require is not eng 4003 (#1323)
Fix the JS SDK envd HTTP/2 transport so it works in Next.js/Turbopack production builds.
e2b@2.20.0
2026-05-11 10:04:19 -07:00
Tomas Virgl ff0db65902 Mark additional files as linguist-generated (#1316) 2026-05-09 09:45:13 -07:00
github-actions[bot] e3092d5719 [skip ci] Release new versions 2026-05-06 00:56:25 +00:00
Matt Brockman f7a97e698e enable http2 for js sdk envd rpc/api traffic (#1311)
Enables HTTP/2 for JS SDK sandbox envd traffic in Node by routing envd
RPC/API requests through undici with an HTTP/2-enabled dispatcher.

Non-Node runtimes continue to use global fetch. Management API and
volume clients are unchanged.

Requires bumping node from >=20 to >= 20.18.1 for undici
@e2b/python-sdk@2.21.0 e2b@2.19.5
2026-05-05 17:24:16 -07:00
Matt Brockman 20ea715252 Enable HTTP/2 for Python SDK transports for sandbox/main api calls (#1310)
switches python sdk to use http2 for calls to main api + sandboxes

doesn't add it to volumes yet - need to test those separately
2026-05-05 17:23:46 -07:00
github-actions[bot] 76f5effde6 [skip ci] Release new versions 2026-04-30 18:04:41 +00:00
Mish Ushakov 7982da9de0 Add changeset generation instructions (#1308)
Added instructions for generating changesets after package updates.
2026-04-30 17:52:59 +00:00
Mish Ushakov ae138767ac chore(js-sdk): add patch changeset for npm-check-updates removal (#1307)
## Summary

Adds a patch changeset for the `e2b` JS SDK to cover #1306 (commit
bd99b23c1), which removed the unused `npm-check-updates` devDependency
to clear the remaining `tar@6` Dependabot security alerts.

The original PR landed without a changeset, so the next release would
skip publishing the SDK despite the `package.json` change. This file
ensures the dependency cleanup gets a proper patch bump.

## Test plan

- [x] `.changeset/drop-npm-check-updates.md` follows the repo's existing
changeset format (frontmatter + summary line)
- [ ] Changesets bot picks up the entry on the PR

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
e2b@2.19.4
2026-04-30 17:40:56 +00:00
Mish Ushakov bd99b23c1c chore(deps): drop unused npm-check-updates devDep to clear tar alerts (#1306)
## Summary

Resolves the remaining 6 high-severity Dependabot alerts for `tar` on
the default branch. `tar@6.2.1` was being pulled in transitively via
`npm-check-updates@16 -> pacote@15 / cacache -> tar@^6`, and
Dependabot's `<= 7.5.10` ranges include 6.x semver-wise. Since
`npm-check-updates` was declared as a `devDependency` but never actually
invoked anywhere (no script, CI workflow, or doc references it),
removing it entirely is cleaner than bumping it — alerts cleared with
zero risk of regression.

After removal, the lock contains only `tar@7.5.12`, which satisfies all
six advisories.

## Test plan

- [x] `pnpm run lint` (js-sdk + cli)
- [x] `pnpm run typecheck` (js-sdk + cli)
- [x] `pnpm run format` (js-sdk + cli)
- [x] tar-related unit tests pass (`tests/template/utils`,
`tests/template/uploadFile` — 54 tests)

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 19:27:32 +02:00
github-actions[bot] 5ed9c32ea7 [skip ci] Release new versions 2026-04-30 15:15:40 +00:00
Mish Ushakov 55e9e0eb5a chore(deps): resolve Dependabot security alerts across npm and python (#1302)
## Summary

Resolves all 31 open [Dependabot
alerts](https://github.com/e2b-dev/e2b/security/dependabot) across the
workspace.

- **npm** — added range-based `pnpm.overrides` to bump vulnerable
transitive deps to their patched versions: postcss, vite, lodash,
brace-expansion, picomatch (2.x + 4.x), yaml, @tootallnate/once,
smol-toml, flatted, and minimatch (3.x/5.x/9.x/10.x).
- **python-sdk** — bumped dev deps in `poetry.lock`: pytest 7.4 → 9.0.3
(with constraint update in `pyproject.toml`), pytest-asyncio 0.23 → 1.3
(required for pytest 9), python-dotenv 1.2.2, pygments 2.20.0, requests
2.33.1, black 26.3.1; removed 4 now-unused `# ty: ignore` directives
that pytest 9's stricter type signatures made obsolete.

## Test plan

- [x] \`pnpm run typecheck\` passes
- [x] \`pnpm run lint\` passes
- [x] \`pnpm run format\` clean
- [x] CLI tests (80/80) and js-sdk/python-sdk unit tests pass;
integration tests not run locally (need \`E2B_API_KEY\`)

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
@e2b/cli@2.10.1 e2b@2.19.3 @e2b/python-sdk@2.20.3
2026-04-30 14:45:19 +00:00
github-actions[bot] 3ff25f784e [skip ci] Release new versions 2026-04-27 21:27:14 +00:00
Mish Ushakov 2c995d4494 refactor(sdk): make octet-stream file upload opt-in via useOctetStream (#1296)
## Summary

- Adds an opt-in `useOctetStream` / `use_octet_stream` flag to sandbox
file write — JS on `FilesystemWriteOpts`, Python keyword on `write` /
`write_files` (async + sync).
- Changes the default upload path to `multipart/form-data` regardless of
envd version. Callers must opt in to `application/octet-stream`
(requires envd 0.5.7 or later).

## Example

JS:

```ts
// Default — multipart/form-data
await sandbox.files.write('hello.txt', 'world')

// Opt in to application/octet-stream (envd >= 0.5.7)
await sandbox.files.writeFiles(
  [{ path: 'a.txt', data: 'a' }, { path: 'b.txt', data: 'b' }],
  { useOctetStream: true },
)
```

Python:

```python
# Default — multipart/form-data
sandbox.files.write('hello.txt', 'world')

# Opt in to application/octet-stream (envd >= 0.5.7)
await sandbox.files.write_files(
    [{'path': 'a.txt', 'data': 'a'}, {'path': 'b.txt', 'data': 'b'}],
    use_octet_stream=True,
)
```

## Test plan

- [ ] JS: `pnpm --filter e2b run lint && pnpm --filter e2b run
typecheck`
- [ ] Python: `cd packages/python-sdk && poetry run make lint && poetry
run make typecheck`
- [ ] Manual write with and without `useOctetStream` /
`use_octet_stream` against envd 0.5.7+.

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
@e2b/python-sdk@2.20.2 e2b@2.19.2
2026-04-27 21:16:33 +00:00
github-actions[bot] 557b723cc1 [skip ci] Release new versions 2026-04-24 18:35:47 +00:00
Mish Ushakov 3167e19b4f fix(sdk): buffer template upload to set Content-Length, add regression tests (#1294)
## Summary
Consolidates the fix and tests from #1285 and #1293 into a single PR.

- **js-sdk**: `uploadFile` used to pass a Node `Readable` directly to
`fetch`, causing undici to fall back to `Transfer-Encoding: chunked`. S3
presigned PUT URLs reject chunked with 501 NotImplemented. Fix buffers
the archive first so `Content-Length` is set. Includes:
- Regression test that spins up a local HTTP server and asserts
`Content-Length` is set and matches the body, and `Transfer-Encoding` is
not chunked.
- Type-fix for the CLI's typecheck (cast `Pack` →
`AsyncIterable<Buffer>`).
- Dynamic import of `node:stream/consumers` so the browser bundle
doesn't pull it in.
- **python-sdk**: Adds sync + async regression tests for `upload_file`
that guard against the same class of bug (someone swapping
`tar_buffer.getvalue()` for a stream/generator). No Python code change —
the current implementation already passes bytes to `httpx.put(...,
content=...)`.

Authorship of the original JS fix commit preserved (truffle-dev).

Closes #1243.

## Test plan
- [x] `pnpm run test tests/template/uploadFile.test.ts` — passes
- [x] `pnpm run typecheck` / `lint` clean across js-sdk and cli
- [x] `poetry run pytest tests/sync/template_sync/test_upload_file.py
tests/async/template_async/test_upload_file.py -v` — both pass
- [x] `poetry run make format` / `make lint` / `make typecheck` clean

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

---------

Co-authored-by: truffle <truffleagent@gmail.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
@e2b/cli@2.10.0 @e2b/python-sdk@2.20.1 e2b@2.19.1
2026-04-24 07:14:54 -07:00
Mish Ushakov b97fd4dfd0 test: remove apt, bun, npm, pip install tests (#1275)
## Summary
- Deletes install test files for apt, bun, npm, and pip in both JS and
Python SDKs
- Removes sync and async variants in Python
- Stacktrace tests for these install methods are kept

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-24 06:27:23 -07:00
Mish Ushakov c2d6eef78d test: reduce test_sbx_metrics flakiness by extending polling window (#1291)
## Summary
- Bumps metrics polling from 15s to 30s in Python async/sync and JS SDK
tests so the backend has enough headroom to populate metrics under load
— this test was the new #1 CI offender (5/9 Python runs and 4/10 JS runs
failed).
- Raises the async Python sandbox timeout from 20s to 60s for parity
with sync, and adds per-test timeout overrides
(`@pytest.mark.timeout(60)` / `{ timeout: 60_000 }`) so polling can
complete under the default 30s pytest/vitest cap.
- Happy path is unchanged: the loop still breaks as soon as metrics
appear.

## Test plan
- [x] `pnpm run format`, `pnpm run lint`, `pnpm run typecheck` pass
- [x] `test_sbx_metrics` (Python async) passed locally in 8.4s
- [x] `test_sbx_metrics` (Python sync) passed locally in 15.6s
- [x] `metrics.test.ts` (JS) passed locally in 20.7s

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 06:03:49 -07:00
Matt Brockman a6a1156a76 fix: cli info handles not found without showing error message (#1247)
Handles sandbox not found on cli info
2026-04-21 08:33:07 -07:00