Commit Graph

4893 Commits

Author SHA1 Message Date
Berry 1ebc6dfae8 Template env vars (#1052)
Add a note to the template environment variables that they exist only
during template build, so users don't get confused.

---------

Co-authored-by: Mish <10400064+mishushakov@users.noreply.github.com>
@e2b/python-sdk@2.9.0 e2b@2.9.0
2025-12-22 18:48:45 +01:00
Tomas Valenta 2d5af16b05 Add PTY reconnect (#1053)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Introduce `connect` methods to attach to running PTY sessions across
JS and Python SDKs, with tests and default timeout handling.
> 
> - **SDKs**:
>   - **JS (`packages/js-sdk/src/sandbox/commands/pty.ts`)**:
> - Add `Pty.connect(pid, opts?)` to attach to running PTYs; accepts
`PtyConnectOpts` with `onData`, `timeoutMs`, and `requestTimeoutMs`.
> - Factor default PTY connection timeout via
`defaultPtyConnectionTimeout` and apply to `create`/`connect` calls.
>   - **Python**:
> - Async: Add `AsyncSandbox.pty.connect(pid, on_data, timeout?,
request_timeout?)` in `e2b/sandbox_async/commands/pty.py`.
> - Sync: Add `sandbox.pty.connect(pid, timeout?, request_timeout?)` in
`e2b/sandbox_sync/commands/pty.py`.
> - **Tests**:
> - JS: `packages/js-sdk/tests/sandbox/pty/ptyConnect.test.ts` validates
connect/reconnect and output handling.
> - Python: async and sync tests under
`packages/python-sdk/tests/.../pty/test_pty_connect.py` verify
reconnection and exit codes.
> - **Release**:
> - Changeset: minor version bumps for `@e2b/python-sdk` and `e2b`; note
“added option to connect to a running pty session”.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
539c4f518606544dfcef253df5bde49354fe7903. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Mish <10400064+mishushakov@users.noreply.github.com>
2025-12-22 17:46:35 +00:00
Mish Ushakov 482d20f6e7 Fix Python (sync) WatchHandle test (#1056)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Adjusts the watch directory test to modify the file content and scan
returned events for a WRITE on the target file instead of asserting the
first event.
> 
> - **Tests (python-sdk)**:
> - Updates `tests/sync/sandbox_sync/files/test_watch.py`
`test_watch_directory_changes` to:
>     - Write updated content after `watch_dir` is started.
> - Iterate over `handle.get_new_events()` to find a
`FilesystemEventType.WRITE` for the target filename, asserting its
presence.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
f32678e4ed4b141ff9dc498fd9c655f374a66c76. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-12-22 17:34:35 +00:00
Jakub Novák 118890a9b2 Update e2b (#1051)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Upgrade `e2b` to 2.8.4 in CLI, update `eslint-config-next` to 14.2.35
in web app, add pnpm override for `@next/eslint-plugin-next>glob`, and
refresh lockfile.
> 
> - **Dependencies**:
> - **CLI**: Bump `e2b` from `^2.7.0` to `^2.8.4` in
`packages/cli/package.json`.
> - **Web**: Update `eslint-config-next` from `14.2.21` to `14.2.35` in
`apps/web/package.json`.
> - **Tooling/Config**:
> - Add pnpm override to force `@next/eslint-plugin-next>glob@*` to
`10.5.0` in root `package.json`.
> - **Lockfile**:
> - Regenerate `pnpm-lock.yaml` reflecting the above upgrades and
transitive dependency adjustments (e.g.,
`@next/eslint-plugin-next@14.2.35`, `glob@10.5.0`).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
b143ae8745bb90ff83a0332364ee5052f76db3fb. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-12-16 16:53:48 +00:00
Tomas Valenta 3546a16bf5 Update deps (#1050) 2025-12-12 23:05:58 +00:00
github-actions[bot] d5e16f6ee6 [skip ci] Release new versions 2025-12-08 14:00:11 +00:00
Mish Ushakov 9bd2d619c0 fix test getCallerDirectory handles file:// (#1047)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Refactors the ESM file URL test for `getCallerDirectory` to use temp
paths and `pathToFileURL`, removing hardcoded paths and a redundant
case.
> 
> - **Tests**
(`packages/js-sdk/tests/template/utils/getCallerDirectory.test.ts`):
>   - Refactor ESM `file://` handling test to be platform-agnostic:
>     - Use `os.tmpdir()` and `path.join` to build test paths.
>     - Use `pathToFileURL` instead of string-building `file://` URLs.
>     - Update assertions to compare against computed paths.
>   - Remove redundant "three slashes" `file://` URL test.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
08a197d1fe86d609e08e333f0226051e5c7e36e3. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
e2b@2.8.4
2025-12-08 14:39:00 +01:00
Filip Brebera 37bd3e3d7c FIX(js-sdk): Template().copy() fails in ESM modules (#1046)
## Summary

 Fixes #1045

`getCallerDirectory()` fails in ESM modules because
`CallSite.getFileName()` returns
`file://` URLs, but `path.dirname()` doesn't handle URLs.

**Fix:** Convert `file://` URLs to filesystem paths using
`fileURLToPath()` before
  passing to `path.dirname()`.

  ## Changes

  - Added `fileURLToPath` import from `node:url`
  - Updated `getCallerDirectory()` to handle `file://` URLs
  - Added unit tests for ESM URL handling

  ## Testing

  - Built the SDK locally (`pnpm run build`)
- Linked to a test ESM project using my [reproduction
repository](https://github.com/bxxf/e2b-template-issue-repro) (`pnpm
link`)
  - Verified `Template().copy()` works without `ENOENT` errors
  - All existing tests pass

---------

Co-authored-by: Filip Brebera <filip.brebera@gendigital.com>
Co-authored-by: Mish <10400064+mishushakov@users.noreply.github.com>
2025-12-08 04:41:53 -08:00
dependabot[bot] 9760fab197 Bump urllib3 from 2.5.0 to 2.6.0 in /packages/python-sdk in the pip group across 1 directory (#1044)
Bumps the pip group with 1 update in the /packages/python-sdk directory:
[urllib3](https://github.com/urllib3/urllib3).

Updates `urllib3` from 2.5.0 to 2.6.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/urllib3/urllib3/releases">urllib3's
releases</a>.</em></p>
<blockquote>
<h2>2.6.0</h2>
<h2>🚀 urllib3 is fundraising for HTTP/2 support</h2>
<p><a
href="https://sethmlarson.dev/urllib3-is-fundraising-for-http2-support">urllib3
is raising ~$40,000 USD</a> to release HTTP/2 support and ensure
long-term sustainable maintenance of the project after a sharp decline
in financial support. If your company or organization uses Python and
would benefit from HTTP/2 support in Requests, pip, cloud SDKs, and
thousands of other projects <a
href="https://opencollective.com/urllib3">please consider contributing
financially</a> to ensure HTTP/2 support is developed sustainably and
maintained for the long-haul.</p>
<p>Thank you for your support.</p>
<h2>Security</h2>
<ul>
<li>Fixed a security issue where streaming API could improperly handle
highly compressed HTTP content (&quot;decompression bombs&quot;) leading
to excessive resource consumption even when a small amount of data was
requested. Reading small chunks of compressed data is safer and much
more efficient now. (CVE-2025-66471 reported by <a
href="https://github.com/Cycloctane"><code>@​Cycloctane</code></a>, 8.9
High, GHSA-2xpw-w6gg-jr37)</li>
<li>Fixed a security issue where an attacker could compose an HTTP
response with virtually unlimited links in the
<code>Content-Encoding</code> header, potentially leading to a denial of
service (DoS) attack by exhausting system resources during decoding. The
number of allowed chained encodings is now limited to 5. (CVE-2025-66418
reported by <a
href="https://github.com/illia-v"><code>@​illia-v</code></a>, 8.9 High,
GHSA-gm62-xv2j-4w53)</li>
</ul>
<blockquote>
<p>[!IMPORTANT]</p>
<ul>
<li>If urllib3 is not installed with the optional
<code>urllib3[brotli]</code> extra, but your environment contains a
Brotli/brotlicffi/brotlipy package anyway, make sure to upgrade it to at
least Brotli 1.2.0 or brotlicffi 1.2.0.0 to benefit from the security
fixes and avoid warnings. Prefer using <code>urllib3[brotli]</code> to
install a compatible Brotli package automatically.</li>
<li>If you use custom decompressors, please make sure to update them to
respect the changed API of
<code>urllib3.response.ContentDecoder</code>.</li>
</ul>
</blockquote>
<h2>Features</h2>
<ul>
<li>Enabled retrieval, deletion, and membership testing in
<code>HTTPHeaderDict</code> using bytes keys. (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3653">#3653</a>)</li>
<li>Added host and port information to string representations of
<code>HTTPConnection</code>. (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3666">#3666</a>)</li>
<li>Added support for Python 3.14 free-threading builds explicitly. (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3696">#3696</a>)</li>
</ul>
<h2>Removals</h2>
<ul>
<li>Removed the <code>HTTPResponse.getheaders()</code> method in favor
of <code>HTTPResponse.headers</code>. Removed the
<code>HTTPResponse.getheader(name, default)</code> method in favor of
<code>HTTPResponse.headers.get(name, default)</code>. (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3622">#3622</a>)</li>
</ul>
<h2>Bugfixes</h2>
<ul>
<li>Fixed redirect handling in <code>urllib3.PoolManager</code> when an
integer is passed for the retries parameter. (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3649">#3649</a>)</li>
<li>Fixed <code>HTTPConnectionPool</code> when used in Emscripten with
no explicit port. (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3664">#3664</a>)</li>
<li>Fixed handling of <code>SSLKEYLOGFILE</code> with expandable
variables. (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3700">#3700</a>)</li>
</ul>
<h2>Misc</h2>
<ul>
<li>Changed the <code>zstd</code> extra to install
<code>backports.zstd</code> instead of <code>zstandard</code> on Python
3.13 and before. (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3693">#3693</a>)</li>
<li>Improved the performance of content decoding by optimizing
<code>BytesQueueBuffer</code> class. (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3710">#3710</a>)</li>
<li>Allowed building the urllib3 package with newer setuptools-scm v9.x.
(<a
href="https://redirect.github.com/urllib3/urllib3/issues/3652">#3652</a>)</li>
<li>Ensured successful urllib3 builds by setting Hatchling requirement
to ≥ 1.27.0. (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3638">#3638</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/urllib3/urllib3/blob/main/CHANGES.rst">urllib3's
changelog</a>.</em></p>
<blockquote>
<h1>2.6.0 (2025-12-05)</h1>
<h2>Security</h2>
<ul>
<li>Fixed a security issue where streaming API could improperly handle
highly
compressed HTTP content (&quot;decompression bombs&quot;) leading to
excessive resource
consumption even when a small amount of data was requested. Reading
small
chunks of compressed data is safer and much more efficient now.
(<code>GHSA-2xpw-w6gg-jr37
&lt;https://github.com/urllib3/urllib3/security/advisories/GHSA-2xpw-w6gg-jr37&gt;</code>__)</li>
<li>Fixed a security issue where an attacker could compose an HTTP
response with
virtually unlimited links in the <code>Content-Encoding</code> header,
potentially
leading to a denial of service (DoS) attack by exhausting system
resources
during decoding. The number of allowed chained encodings is now limited
to 5.
(<code>GHSA-gm62-xv2j-4w53
&lt;https://github.com/urllib3/urllib3/security/advisories/GHSA-gm62-xv2j-4w53&gt;</code>__)</li>
</ul>
<p>.. caution::</p>
<ul>
<li>
<p>If urllib3 is not installed with the optional
<code>urllib3[brotli]</code> extra, but
your environment contains a Brotli/brotlicffi/brotlipy package anyway,
make
sure to upgrade it to at least Brotli 1.2.0 or brotlicffi 1.2.0.0 to
benefit from the security fixes and avoid warnings. Prefer using
<code>urllib3[brotli]</code> to install a compatible Brotli package
automatically.</p>
</li>
<li>
<p>If you use custom decompressors, please make sure to update them to
respect the changed API of
<code>urllib3.response.ContentDecoder</code>.</p>
</li>
</ul>
<h2>Features</h2>
<ul>
<li>Enabled retrieval, deletion, and membership testing in
<code>HTTPHeaderDict</code> using bytes keys.
(<code>[#3653](https://github.com/urllib3/urllib3/issues/3653)
&lt;https://github.com/urllib3/urllib3/issues/3653&gt;</code>__)</li>
<li>Added host and port information to string representations of
<code>HTTPConnection</code>.
(<code>[#3666](https://github.com/urllib3/urllib3/issues/3666)
&lt;https://github.com/urllib3/urllib3/issues/3666&gt;</code>__)</li>
<li>Added support for Python 3.14 free-threading builds explicitly.
(<code>[#3696](https://github.com/urllib3/urllib3/issues/3696)
&lt;https://github.com/urllib3/urllib3/issues/3696&gt;</code>__)</li>
</ul>
<h2>Removals</h2>
<ul>
<li>Removed the <code>HTTPResponse.getheaders()</code> method in favor
of <code>HTTPResponse.headers</code>.
Removed the <code>HTTPResponse.getheader(name, default)</code> method in
favor of <code>HTTPResponse.headers.get(name, default)</code>.
(<code>[#3622](https://github.com/urllib3/urllib3/issues/3622)
&lt;https://github.com/urllib3/urllib3/issues/3622&gt;</code>__)</li>
</ul>
<h2>Bugfixes</h2>
<ul>
<li>Fixed redirect handling in <code>urllib3.PoolManager</code> when an
integer is passed
for the retries parameter.
(<code>[#3649](https://github.com/urllib3/urllib3/issues/3649)
&lt;https://github.com/urllib3/urllib3/issues/3649&gt;</code>__)</li>
<li>Fixed <code>HTTPConnectionPool</code> when used in Emscripten with
no explicit port.
(<code>[#3664](https://github.com/urllib3/urllib3/issues/3664)
&lt;https://github.com/urllib3/urllib3/issues/3664&gt;</code>__)</li>
<li>Fixed handling of <code>SSLKEYLOGFILE</code> with expandable
variables.
(<code>[#3700](https://github.com/urllib3/urllib3/issues/3700)
&lt;https://github.com/urllib3/urllib3/issues/3700&gt;</code>__)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/urllib3/urllib3/commit/720f484b605f18887a48eef448d0084e2b76902d"><code>720f484</code></a>
Release 2.6.0</li>
<li><a
href="https://github.com/urllib3/urllib3/commit/24d7b67eac89f94e11003424bcf0d8f7b72222a8"><code>24d7b67</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/urllib3/urllib3/commit/c19571de34c47de3a766541b041637ba5f716ed7"><code>c19571d</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/urllib3/urllib3/commit/816fcf04528bc0f89672e13398eb813dcc892490"><code>816fcf0</code></a>
Bump actions/setup-python from 6.0.0 to 6.1.0 (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3725">#3725</a>)</li>
<li><a
href="https://github.com/urllib3/urllib3/commit/18af0a10efc4c99dd028f7ad5a461470b9a8b0fd"><code>18af0a1</code></a>
Improve speed of <code>BytesQueueBuffer.get()</code> by using memoryview
(<a
href="https://redirect.github.com/urllib3/urllib3/issues/3711">#3711</a>)</li>
<li><a
href="https://github.com/urllib3/urllib3/commit/1f6abac3e6d426c3939b8a17cf4afa099e691ab2"><code>1f6abac</code></a>
Bump versions of pre-commit hooks (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3716">#3716</a>)</li>
<li><a
href="https://github.com/urllib3/urllib3/commit/1c8fbf787b8e6ed151842c5d6874c9d5bdbf1d0b"><code>1c8fbf7</code></a>
Bump actions/checkout from 5.0.0 to 6.0.0 (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3722">#3722</a>)</li>
<li><a
href="https://github.com/urllib3/urllib3/commit/7784b9eee95b7c90802c02b111e98df70259ae4f"><code>7784b9e</code></a>
Add Python 3.15 to CI (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3717">#3717</a>)</li>
<li><a
href="https://github.com/urllib3/urllib3/commit/0241c9e7286d3008e3cce18effc13b40dc633385"><code>0241c9e</code></a>
Updated docs to reflect change in optional zstd dependency from
<code>zstandard</code> t...</li>
<li><a
href="https://github.com/urllib3/urllib3/commit/7afcabb6489d9a8ea95a40e5afcb46463af17351"><code>7afcabb</code></a>
Expand environment variable of SSLKEYLOGFILE (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3705">#3705</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/urllib3/urllib3/compare/2.5.0...2.6.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=urllib3&package-manager=pip&previous-version=2.5.0&new-version=2.6.0)](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 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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-06 00:08:22 -08:00
github-actions[bot] f4cdbfbf64 [skip ci] Release new versions 2025-12-03 16:23:27 +00:00
Jakub Novák cc27297ff5 Update dependencies (#1041)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Updates js-sdk dependencies (glob, tar) and refreshes lockfile with
minor bumps including Vite 6.4.1; adds a changeset for a patch release.
> 
> - **Dependencies**:
>   - `packages/js-sdk/package.json`:
>     - Bump `glob` to `^11.1.0`.
>     - Bump `tar` to `^7.5.2`.
>   - `pnpm-lock.yaml`:
> - Refresh versions to match, notably `vite` `6.4.1`, `js-yaml`
`3.14.2`, `minimatch` `10.1.1`, `minizlib` `3.1.0`, and related
transitive updates.
> - **Release**:
> - Add changeset `.changeset/famous-stamps-tan.md` marking an `e2b`
patch release.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
a27e3b182b126aca8d20aa7b3e26c2f5543fc43c. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
e2b@2.8.3
2025-12-03 13:13:50 +01:00
github-actions[bot] f561fc463c [skip ci] Release new versions 2025-12-01 15:49:40 +00:00
Mish Ushakov 7b687bddbb Fixes CMD parser in Python from_dockerfile method (#1040)
What was happening is that the following snippet:

```dockerfile
CMD ["sleep", "20"]
```

Was incorrectly converted to:

```
sleep, 20
```

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Fixes parsing of Dockerfile CMD/ENTRYPOINT array syntax to a proper
start command and updates tests accordingly.
> 
> - **Python SDK**:
> - `e2b/template/dockerfile_parser.py`: Parse CMD/ENTRYPOINT JSON array
(e.g., `["sleep", "20"]`) into a space-joined command (`sleep 20`) and
set as `start_cmd`.
> - **Tests**:
> - JS SDK and Python (sync/async): Add ENTRYPOINT case and assert
`startCmd`/`_start_cmd` equals `sleep 20`.
> - **Release**:
>   - Changeset: patch bump for `@e2b/python-sdk`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
ed257ab11e618ece3e5fe70f232a3265fd857ad4. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@e2b/python-sdk@2.8.1
2025-12-01 07:40:17 -08:00
github-actions[bot] 88106466a9 [skip ci] Release new versions 2025-12-01 10:44:36 +00:00
Mish Ushakov d911c55c3e Improve CI/CD speed for template tests (#1035)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Caches Playwright binaries in JS CI and refactors JS/Python template
tests to use API mocks and aliases, add Dockerfile tests, and update
install APIs to single-package calls.
> 
> - **CI**:
> - Cache Playwright binaries on `ubuntu-22.04` and `windows-latest` in
`.github/workflows/js_sdk_tests.yml` to speed JS SDK tests.
> - **JS SDK Tests**:
> - Extend `buildTemplate` options to accept `alias` in
`tests/setup.ts`.
> - Add `fromDockerfile` tests and switch some builds to
`fromBaseImage`; add build-from-base-template test.
> - Update install method tests to single-package calls for
`aptInstall`, `npmInstall`, `bunInstall`, `pipInstall`.
>   - Tweak `makeSymlink` test order to ensure overwrite behavior.
> - Overhaul stacktrace tests to use `msw` server mocks and alias-based
failure mapping.
> - **Python SDK Tests**:
>   - `build`/`async_build` fixtures accept optional `alias`.
> - Add `from_dockerfile` tests (sync/async); use base image/base
template where applicable.
>   - Update install method tests to single-package calls.
> - Rewrite stacktrace tests to monkeypatch API calls with alias-based
failure mapping.
> - **Dependencies**:
>   - Add dev dependency `msw` to `packages/js-sdk/package.json`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1b7f84f4ce692f664c3ce4cdb345f4c3a028b17a. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
e2b@2.8.2
2025-11-28 22:34:13 +01:00
Mish Ushakov da925b5358 Fixes dot copy (#1037)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Fixes glob expansion when source is '.' to avoid absolute '/**/*'
traversal and adds targeted tests.
> 
> - **Bug fix (js-sdk)**:
> - Update `getAllFilesInPath` in
`packages/js-sdk/src/template/utils.ts` to construct a safe directory
pattern when the matched directory is `'.'` (uses
`path.join(file.relative() || '.', '**/*')`) preventing accidental
`/**/*` traversal.
> - **Tests**:
> - Add coverage for dot pattern in
`packages/js-sdk/tests/template/utils/getAllFilesInPath.test.ts`,
ensuring results stay within the context directory.
> - **Release**:
> - Add changeset `'.changeset/humble-badgers-cross.md'` (patch for
`e2b`).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
aac954e0625a97a50ebab03416de8e61b5fde7a1. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-11-28 03:52:32 -08:00
github-actions[bot] 3e6dc3aa62 [skip ci] Release new versions 2025-11-26 18:16:02 +00:00
Mish Ushakov 6ff14f8b2e Add Windows CI to test matrix (#1020)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Add Windows to CI matrices and make JS/Python utils and tests
cross-platform via path handling updates.
> 
> - **CI**:
> - Add Windows to test matrices in `cli_tests.yml`, `js_sdk_tests.yml`,
`python_sdk_tests.yml`; set bash shell/workdirs; disable fail-fast for
some jobs.
>   - Python CI runs `pytest -n 4` via Poetry.
> - **JS SDK**:
> - Path normalization for globbing (`normalizePath`) and use of
`Path.relativePosix()` in hashing and tar creation in
`src/template/utils.ts`.
> - **Python SDK**:
> - Add `normalize_path` and use forward-slash glob patterns in
`e2b/template/utils.py`.
> - **Tests**:
> - Make stack trace parsing robust to Windows paths; use `basename` in
file assertions; adjust Python tar tests tempdir fixture handling.
> - **Changeset**: add patch note for windows-related fixes.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1b8dbe4a1af642dbcb86500837e93f7998b223f6. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Joseph Lombrozo <joe.lombrozo@e2b.dev>
e2b@2.8.1
2025-11-26 09:50:26 -08:00
github-actions[bot] 4b770a1c6b [skip ci] Release new versions 2025-11-26 17:36:25 +00:00
Mish Ushakov 8be34f8344 Fixes default Dockerfile user/workdir behavior (#1033)
Fixes issue https://github.com/e2b-dev/E2B/issues/1032

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Preserve Dockerfile USER/WORKDIR when provided and only apply E2B
defaults if absent, with tests and CLI fixtures updated accordingly.
> 
> - **Dockerfile parsing (SDKs)**:
> - **JS (`packages/js-sdk/src/template/dockerfileParser.ts`)**: Track
`USER`/`WORKDIR` usage and only set E2B defaults (`user`, `/home/user`)
if not specified; keep Docker defaults (`root`, `/`) initially.
> - **Python
(`packages/python-sdk/e2b/template/dockerfile_parser.py`)**: Same
behavior—preserve explicit `USER`/`WORKDIR`, fallback to defaults only
when absent.
> - **Tests**:
> - **JS**: Add tests for default vs. custom `USER`/`WORKDIR` in
`fromMethods.test.ts`.
> - **Python (async/sync)**: Add analogous tests in
`test_from_methods.py`.
> - **CLI template fixtures**:
> - Update expected outputs to remove redundant
`.set_user('user')`/`.set_workdir('/home/user')` when already specified;
minor ordering tweak for `.setStartCmd` in TS fixture.
> - **Changeset**:
> - Minor version bumps for `@e2b/python-sdk` and `e2b`; note: keep
Docker `WORKDIR` and `USER` if specified.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1ce66362501932308292cef87b5d8a73012ee5f2. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@e2b/python-sdk@2.8.0 e2b@2.8.0
2025-11-26 09:16:25 -08:00
Mish Ushakov 9577cf539f Remove unnecessary client headers in Python SDK (#1019)
- removed machine, os, processor, release default headers (these do not
occur in the JS version)
- particularly, "processor" header was causing issues on Windows due to
incorrect formatting/escape.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Removes unnecessary default headers from the Python SDK API client and
adds a patch changeset.
> 
> - **Python SDK**:
> - Trim `default_headers` in `packages/python-sdk/e2b/api/metadata.py`
by removing `machine`, `os`, `processor`, and `release`.
> - **Release**:
>   - Add changeset to publish a patch for `@e2b/python-sdk`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
9a5ef769ee2eb0b9a05649c20a00dfd507984931. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-11-24 17:45:11 +00:00
github-actions[bot] a4852e19a9 [skip ci] Release new versions 2025-11-15 22:54:49 +00:00
Jakub Dobry 4c612888d4 feat: implement network out allow/deny list support (#1016) @e2b/cli@2.4.2 @e2b/python-sdk@2.7.0 e2b@2.7.0 2025-11-15 22:35:09 +00:00
Joseph Lombrozo 98d2c8c0a8 Ensure that httpx transport is reused across calls by default (#997)
This takes some shortcuts in order to keep backwards compatibility.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Reuses a singleton httpx transport/client across the SDK, introduces a
generic retry decorator for connect calls, and refactors code/tests to
use the shared clients and fixtures.
> 
> - **SDK (transport/client reuse)**
> - Add global `limits` (configurable via `E2B_*` env vars) and switch
`ApiClient` to accept `transport` instead of `limits`.
> - Introduce `e2b.api.client_async/client_sync` with `get_transport()`
(singleton) and `get_api_client()`; update `Sandbox`/`AsyncSandbox`,
paginators, and sandbox APIs to use them.
> - Remove per-class `_limits` from `SandboxBase`/`TemplateBase`; merge
extra headers correctly; pass `E2b-Sandbox-Port` as string.
> - Template build flows (sync/async) now reuse the API client's
underlying httpx client for file uploads.
> - **Connect client** (`e2b_connect/client.py`)
> - Add `_retry` decorator and apply to unary/server-stream methods;
simplify reconnection logic; minor typing/headers cleanups.
> - **Tests**
> - Add retry unit tests; introduce
`sandbox_factory`/`async_sandbox_factory` and a session `event_loop`;
refactor tests to use factories and shared transports; adjust tar
archive expectations.
> - **Misc**
>   - Add `.editorconfig`, CLI `.envrc`, and changeset entries.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1d359231b63dc21b6c8d797886f7d6a77c9ed6b7. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Tomas Valenta <valenta.and.thomas@gmail.com>
Co-authored-by: Mish <10400064+mishushakov@users.noreply.github.com>
2025-11-14 16:48:29 -08:00
Joseph Lombrozo bbeff746f8 Support overriding envd API URL (#1013)
This requires [infra#1448](https://github.com/e2b-dev/infra/pull/1448)
first.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Adds support to override the sandbox API URL (E2B_SANDBOX_URL) across
JS/Python SDKs, centralizes sandbox host/url logic with headers, and
updates CI to build the SDK before CLI.
> 
> - **SDKs (JS & Python)**
> - Add `sandboxUrl` support in `ConnectionConfig` (env var
`E2B_SANDBOX_URL`), with new helpers `getSandboxUrl`/`getHost` and
shared `envdPort`.
> - Refactor sandbox initialization to use
`ConnectionConfig.getSandboxUrl(...)` and `getHost(...)`.
> - Always attach sandbox headers `E2b-Sandbox-Id` and
`E2b-Sandbox-Port` to sandbox and connect requests.
> - Python: thread `sandbox_url` through opts; update async/sync connect
calls to pass headers; minor fix to default `headers=None` in
`e2b_connect.client.Client` stream prep.
> - **CI**
> - Build `packages/js-sdk` before `packages/cli`; set step
`working-directory` for build/test.
> - **Dependencies**
>   - Point `e2b` dependency in lockfile to local `../js-sdk` link.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
5dc58171af6c170f8640f49d736dbe9c571f2b21. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Mish <10400064+mishushakov@users.noreply.github.com>
2025-11-14 10:13:59 -08:00
Joseph Lombrozo d2e22e3748 Some general pytest cleanup (#1021)
- Individual tests must complete in less than 5 minutes
- Add a `make test` option that runs tests
- Upgrade poetry to 2.1.1 (the lock file was generated by this version,
so this just matches what we already expect)
2025-11-13 17:58:30 -08:00
Mish Ushakov 72b5c73aa0 Use "callsites" instead of regex for current directory matching (#1015)
- adopted from https://github.com/sindresorhus/callsites
- ~wip: have to test whether same trick works on Bun~
   works on bun



<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Replaces regex-based path extraction with `callsites` for
`getCallerDirectory`, fixing Windows path handling and removing the old
helper and its tests.
> 
> - **Template utils (`packages/js-sdk/src/template/utils.ts`)**:
> - Replace regex-based extraction with `callsites` and update
`getCallerDirectory` to use `CallSite.getFileName()` and `path.dirname`.
>   - Remove `matchFileDir` helper.
> - **Tests**:
> - Delete `packages/js-sdk/tests/template/utils/matchFileDir.test.ts`.
> - **Changeset**:
>   - Add patch note: fixes default context directory for Windows paths.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
effab6d61739fea336f6d443a29e712663d8607b. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-11-11 10:26:49 +00:00
github-actions[bot] 45d782f346 [skip ci] Release new versions 2025-11-10 12:04:04 +00:00
Mish Ushakov 470de917ad Windows: Update context directory regex to match Windows-style file patterns (#1014)
I have added tests, but here also a screenshot from Windows machine
correctly matching current directory from the caller:

<img width="1097" height="501" alt="Screenshot 2025-11-07 at 19 37 41"
src="https://github.com/user-attachments/assets/95e3f7e2-efd2-44f9-867e-6de54400c07a"
/>

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Enhances `matchFileDir` to parse Windows and file:// stack trace paths
and adds tests; include changeset for patch release.
> 
> - **packages/js-sdk**:
>   - **Template utils (`src/template/utils.ts`)**:
> - Update `matchFileDir` regex and normalization to support Windows
drive letters, backslashes, and `file:///` URIs; strip `:line:column`
and trailing `)`.
>   - **Tests (`tests/template/utils/matchFileDir.test.ts`)**:
> - Add cases for Windows paths (with/without anonymous), `file:///`
URIs, and paths containing parentheses.
> - **Release**:
> - Add changeset (`.changeset/every-wolves-brake.md`) marking a patch
for `e2b`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
eb5303399e051878a125cef4ee6e92e21edd1867. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@e2b/python-sdk@2.6.4 e2b@2.6.4
2025-11-10 12:01:14 +01:00
Mish Ushakov 56d16a8762 Fix ignore files in file upload and added tests (#1012)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Ensure file uploads honor ignore patterns (incl. .dockerignore),
refactor file discovery/tar streaming in JS/Python SDKs, and add
comprehensive tests.
> 
> - **File upload behavior**:
> - JS/TS and Python uploads now pass `ignorePatterns` (merged from
`fileIgnorePatterns` and `.dockerignore`) to tar creation, ensuring
ignored files aren’t uploaded.
> - **Refactor/Utilities**:
> - Rename `getAllFilesForFilesHash` -> `getAllFilesInPath` with
optional directory inclusion in both SDKs.
> - Implement `tar_file_stream` (JS and Python) to build archives from
`getAllFilesInPath`, with `noDirRecurse` and symlink control.
>   - Hashing functions updated to use `getAllFilesInPath`.
> - Type tweak: allow `None` in Python `stack_traces` during build wait.
> - **Integration**:
> - JS `uploadFile` and Python async/sync `upload_file` now use tar
streaming with ignore patterns; JS `Template` wires ignore patterns into
uploads.
> - **Tests**:
> - Add extensive tests for `getAllFilesInPath` and `tar_file_stream` in
JS and Python, covering ignore patterns, directories, sorting, and
symlinks.
>   - Remove obsolete tests relying on old function names.
> - **Meta**:
>   - Changeset entries for `@e2b/python-sdk` and `e2b` (patch).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
2f83444f9006393f33e8c346bec1998b3a06044d. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-11-10 02:59:29 -08:00
github-actions[bot] 111fe06fe0 [skip ci] Release new versions 2025-11-06 16:04:39 +00:00
Jakub Dobry 6b74009972 feat: add template background build helpers (#1011)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Add background template build APIs and build status retrieval to
JS/Python SDKs, change build methods to return BuildInfo, and add tests.
> 
> - **JS SDK (templates)**:
> - Add `Template.buildInBackground` to start builds without waiting and
return `BuildInfo`.
> - Add `Template.getBuildStatus` with optional `logsOffset`; expose
`GetBuildStatusResponse`.
> - Change `Template.build` to return `BuildInfo` and then wait for
completion; refactor internal `build(...)` to accept `ApiClient` and
return identifiers.
> - Add types `AuthOptions`, `BuildInfo`, `GetBuildStatusOptions`; make
`logsOffset` optional in `getBuildStatus` input; update tests with
`backgroundBuild.test.ts`.
> - **Python SDK (templates)**:
> - Introduce `BuildInfo` dataclass;
`Template.build`/`AsyncTemplate.build` now return `BuildInfo`.
> - Add `Template.build_in_background` /
`AsyncTemplate.build_in_background` and `Template.get_build_status` /
`AsyncTemplate.get_build_status`; factor shared `_build`.
> - Export `BuildInfo` in `__init__.py`; add sync/async background build
tests.
> - **Meta**:
>   - Add changeset for patch releases.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
a47f70ea339f6ea2964714a122cde5b7cb5a891b. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@e2b/python-sdk@2.6.3 e2b@2.6.3
2025-11-06 16:26:27 +01:00
Mish Ushakov 978fbed96f Improve cache hit consistency across environments (#1010) 2025-11-06 06:50:02 -08:00
dependabot[bot] 6743ef9edf Bump playwright from 1.48.0 to 1.55.1 in the npm_and_yarn group across 1 directory (#978)
Bumps the npm_and_yarn group with 1 update in the / directory:
[playwright](https://github.com/microsoft/playwright).

Updates `playwright` from 1.48.0 to 1.55.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/microsoft/playwright/releases">playwright's
releases</a>.</em></p>
<blockquote>
<h2>v1.55.1</h2>
<h3>Highlights</h3>
<p><a
href="https://redirect.github.com/microsoft/playwright/issues/37479">microsoft/playwright#37479</a>
- [Bug]: Upgrade Chromium to 140.0.7339.186.
<a
href="https://redirect.github.com/microsoft/playwright/issues/37147">microsoft/playwright#37147</a>
- [Regression]: Internal error: step id not found.
<a
href="https://redirect.github.com/microsoft/playwright/issues/37146">microsoft/playwright#37146</a>
- [Regression]: HTML reporter displays a broken chip link when there are
no projects.
<a
href="https://redirect.github.com/microsoft/playwright/pull/37137">microsoft/playwright#37137</a>
- Revert &quot;fix(a11y): track inert elements as hidden&quot;.
<a
href="https://redirect.github.com/microsoft/playwright/pull/37532">microsoft/playwright#37532</a>
- chore: do not use -k option</p>
<h2>Browser Versions</h2>
<ul>
<li>Chromium 140.0.7339.186</li>
<li>Mozilla Firefox 141.0</li>
<li>WebKit 26.0</li>
</ul>
<p>This version was also tested against the following stable
channels:</p>
<ul>
<li>Google Chrome 139</li>
<li>Microsoft Edge 139</li>
</ul>
<h2>v1.55.0</h2>
<h2>New APIs</h2>
<ul>
<li>New Property <a
href="https://playwright.dev/docs/api/class-teststepinfo#test-step-info-title-path">testStepInfo.titlePath</a>
Returns the full title path starting from the test file, including test
and step titles.</li>
</ul>
<h2>Codegen</h2>
<ul>
<li>Automatic <code>toBeVisible()</code> assertions: Codegen can now
generate automatic <code>toBeVisible()</code> assertions for common UI
interactions. This feature can be enabled in the Codegen settings
UI.</li>
</ul>
<h2>Breaking Changes</h2>
<ul>
<li>⚠️ Dropped support for Chromium extension manifest v2.</li>
</ul>
<h2>Miscellaneous</h2>
<ul>
<li>Added support for Debian 13 &quot;Trixie&quot;.</li>
</ul>
<h2>Browser Versions</h2>
<ul>
<li>Chromium 140.0.7339.16</li>
<li>Mozilla Firefox 141.0</li>
<li>WebKit 26.0</li>
</ul>
<p>This version was also tested against the following stable
channels:</p>
<ul>
<li>Google Chrome 139</li>
<li>Microsoft Edge 139</li>
</ul>
<h2>v1.54.2</h2>
<h3>Highlights</h3>
<p><a
href="https://redirect.github.com/microsoft/playwright/issues/36714">microsoft/playwright#36714</a>
- [Regression]: Codegen is not able to launch in Administrator Terminal
on Windows (ProtocolError: Protocol error)
<a
href="https://redirect.github.com/microsoft/playwright/issues/36828">microsoft/playwright#36828</a>
- [Regression]: Playwright Codegen keeps spamming with selected option
<a
href="https://redirect.github.com/microsoft/playwright/issues/36810">microsoft/playwright#36810</a>
- [Regression]: Starting Codegen with target language doesn't work
anymore</p>
<h2>Browser Versions</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/microsoft/playwright/commit/ae51df7a35888f663553ab4e9c45d6cb6335397f"><code>ae51df7</code></a>
chore: mark v1.55.1 (<a
href="https://redirect.github.com/microsoft/playwright/issues/37530">#37530</a>)</li>
<li><a
href="https://github.com/microsoft/playwright/commit/86dde294ce7fc9dd62d2f7ce5afd0c79cff50140"><code>86dde29</code></a>
feat(chromium): roll to r1193 (<a
href="https://redirect.github.com/microsoft/playwright/issues/37529">#37529</a>)</li>
<li><a
href="https://github.com/microsoft/playwright/commit/86328bc9f43da2fe2b9aba2822c79f8b4c0c7f72"><code>86328bc</code></a>
chore: do not use -k option (<a
href="https://redirect.github.com/microsoft/playwright/issues/37532">#37532</a>)</li>
<li><a
href="https://github.com/microsoft/playwright/commit/63799ba68340fde11445d4f48c12515c28dcc92a"><code>63799ba</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/37214">#37214</a>):
docs: fix method names in release notes</li>
<li><a
href="https://github.com/microsoft/playwright/commit/21e29a42ab090d7848a3c3255f05335ba0db424d"><code>21e29a4</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/37153">#37153</a>):
fix(html): don't display a chip with empty content with ...</li>
<li><a
href="https://github.com/microsoft/playwright/commit/ba62e6ab0d25f7415ffdf121e4e186aadb213be5"><code>ba62e6a</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/37149">#37149</a>):
fix(test): attaching in boxed fixture</li>
<li><a
href="https://github.com/microsoft/playwright/commit/25bb073f2697c98995871d40828604b0836c29b7"><code>25bb073</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/37137">#37137</a>):
Revert &quot;fix(a11y): track inert elements as hidden (<a
href="https://redirect.github.com/microsoft/playwright/issues/36947">#36947</a>)&quot;</li>
<li><a
href="https://github.com/microsoft/playwright/commit/f992162f04ae0b0b5a0f4b6114b894215be98995"><code>f992162</code></a>
chore: mark v1.55.0 (<a
href="https://redirect.github.com/microsoft/playwright/issues/37121">#37121</a>)</li>
<li><a
href="https://github.com/microsoft/playwright/commit/4a92ea00253106c8bd4234b8d5be2e205d049012"><code>4a92ea0</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/37113">#37113</a>):
docs: add release-notes for v1.55</li>
<li><a
href="https://github.com/microsoft/playwright/commit/aa05507bbabc170abf7775bf0d3ddd2438dc384a"><code>aa05507</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/37114">#37114</a>):
test: move browser._launchServer in child process</li>
<li>Additional commits viewable in <a
href="https://github.com/microsoft/playwright/compare/v1.48.0...v1.55.1">compare
view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a
href="https://www.npmjs.com/~playwright-bot">playwright-bot</a>, a new
releaser for playwright since your current version.</p>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=playwright&package-manager=npm_and_yarn&previous-version=1.48.0&new-version=1.55.1)](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 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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-06 03:09:08 -08:00
Jakub Novák 8162a34cb7 Update inquirer and use npx for changeset (#1008)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Upgrades CLI prompting deps (inquirer v12, @inquirer/prompts v7.9) and
switches release scripts to use pnpm/pnpx changeset; lockfile updated
accordingly.
> 
> - **CLI**:
> - Upgrade `inquirer` to `^12.10.0` and `@inquirer/prompts` to `^7.9.0`
in `packages/cli/package.json`.
> - **Tooling/Release Scripts**:
> - Change root `package.json` scripts to use `pnpm changeset ...` and
add `changeset` script via `pnpx @changesets/cli`.
>   - Remove direct root dependency on `@changesets/cli`.
> - **Lockfile**:
> - Refresh `pnpm-lock.yaml` to reflect dependency upgrades and
removals.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
0596c189ae264d795de4168a2d2497121ae0d72d. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-11-04 12:23:24 -08:00
github-actions[bot] 5cea08ffbe [skip ci] Release new versions 2025-11-03 15:45:13 +00:00
Mish Ushakov 23adc93f5e Expand folder with double star pattern for recursive hash computation (#994)
Currently, when you provide a simple folder pattern like `folder/` to
copy() it will not check folders contents for changes (only the folder
metadata itself) which leads to stale caches.

This fix appends ** pattern when no pattern is specified for recursive
hash computation.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Ensure folder COPY patterns hash contents recursively to fix cache
invalidation, adding a shared file-gathering helper, tests, and a Python
glob dependency.
> 
> - **Template hashing (JS + Python SDKs)**:
> - Add `getAllFilesForFilesHash`
(`packages/js-sdk/src/template/utils.ts`) and
`get_all_files_for_files_hash`
(`packages/python-sdk/e2b/template/utils.py`) to collect directories and
nested files using glob patterns and ignores.
> - Update `calculateFilesHash`/`calculate_files_hash` to use the new
helpers, hashing recursive paths, metadata, and file contents; handle
symlinks consistently.
> - **Tests**:
> - Add comprehensive tests for recursive matching, ignore patterns,
sorting, empty dirs, symlinks in
`packages/js-sdk/tests/.../getAllFilesForFilesHash.test.ts` and Python
async/sync tests under
`packages/python-sdk/tests/.../test_get_all_files_for_files_hash.py`.
> - **Dependencies**:
> - Add `wcmatch` in `packages/python-sdk/pyproject.toml` for advanced
globbing.
> - **Release**:
>   - Patch bump via `.changeset/green-mice-watch.md`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
d495427d86ad4e4d5a280567baa63df40a3271fb. 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.6.2 e2b@2.6.2
2025-11-03 16:34:17 +01:00
github-actions[bot] 02f34a293a [skip ci] Release new versions 2025-11-03 11:35:01 +00:00
Mish Ushakov e87576fb7c Dockerfile output - change ENV var syntax (#1004)
Current env var syntax won't be anymore supported by Docker and is
currently blocking local development.

```
3 warnings found (use docker --debug to expand):
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 2)
```

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Use "ENV key=value" in generated Dockerfiles and add tests; minor
devcontainer path string cast.
> 
> - **Template/Dockerfile generation**:
> - **JS SDK (`packages/js-sdk/src/template/index.ts`)**: Handle `ENV`
instructions and output as `ENV key=value ...`.
> - **Python SDK (`packages/python-sdk/e2b/template/main.py`)**: Same
`ENV` formatting; also cast `devcontainer_directory` to `str` in
devcontainer start command.
> - **Tests**:
>   - **JS**: Add `toDockerfile` test covering `ENV` output.
> - **Python (sync/async)**: Add tests for `ENV` output in generated
Dockerfiles.
> - **Changeset**: Patch releases for `@e2b/python-sdk` and `e2b`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4a9c504167dd8069551724d83bfa66f0859c1bd4. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@e2b/cli@2.4.1 @e2b/python-sdk@2.6.1 e2b@2.6.1
2025-11-01 00:28:06 +01:00
Mish Ushakov b65f190d5c Add dependency notice to migrate command (#995)
Current instructions would fail unless e2b was already installed

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Add `e2b` install instructions to template init/migrate outputs and
README, with minor wording tweaks and a patch changeset.
> 
> - **CLI (templates)**:
> - Update `template init` and `template migrate` post-run output to
include installing `e2b` (`npm install e2b` or `pip install e2b`).
> - Reword headings to “To get started with your template” and clarify
build command labels (run dev/prod build).
> - **Docs/Templates**:
> - Add “Installing Dependencies” section to
`packages/cli/src/templates/readme.hbs` with language-specific `e2b`
install instructions.
> - **Release**:
>   - Add patch changeset for `@e2b/cli`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
68d3093b910ef711923ecfc300ab9fc2ece69456. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-31 21:59:13 +01:00
Tomas Valenta 17d6e636d1 Return NotFoundError/Exception for "set timeout" and "get info" 404 errors (#945)
Co-authored-by: Jakub Dobry <jakub.dobry8@gmail.com>
2025-10-31 20:25:01 +00:00
github-actions[bot] 63d6453eae [skip ci] Release new versions 2025-10-31 12:29:43 +00:00
Jakub Novák 742a9ba953 Update connect method (#1001)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Use new connect API for JS/Python SDKs to connect and only extend
(never shorten) running sandbox timeouts, with updated types/docs and
tests.
> 
> - **SDKs**:
>   - **JS**:
> - Replace `resume`/`setTimeout` flow with `SandboxApi.connectSandbox`
calling `POST /sandboxes/{sandboxID}/connect`.
> - Update `Sandbox.connect` (static/instance) to use returned
`sandboxDomain`, `envdAccessToken`, `envdVersion`.
> - Redefine `SandboxConnectOpts` to include `timeoutMs` that only
extends existing timeout.
>   - **Python (async/sync)**:
> - Introduce `_cls_connect` using `post_sandboxes_sandbox_id_connect`
with `ConnectSandbox`; return `Sandbox` model.
> - Update `connect` methods to use API response for
domain/token/version; remove extra info fetch.
>     - Docstrings clarify timeout only extends for running sandboxes.
> - **Tests**:
> - Add cases ensuring connect does not shorten timeout and does extend
when longer (JS, async Python, sync Python).
>   - Preserve error on connecting to non-running sandbox.
> - **Meta**:
> - Changeset: minor releases for `@e2b/python-sdk`, `e2b`, and
`@e2b/cli`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e76b07990cb4c05e51ba1c51fb5cc7bbd44b991b. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@e2b/cli@2.4.0 @e2b/python-sdk@2.6.0 e2b@2.6.0
2025-10-31 05:17:40 -07:00
Jakub Novák 423d87cf91 Update spec and templates to use /v3/ endpoint (#1002)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Switches SDKs to the /v3 template build API and updates spec with
sandbox connect, team max metrics, and related schema changes while
deprecating legacy endpoints.
> 
> - **API Spec / Schema**:
> - **Templates v3**: Add `POST /v3/templates` with
`TemplateBuildRequestV3` → `TemplateRequestResponseV3`; deprecate `POST
/templates`, `POST /templates/{templateID}`, and `POST /v2/templates`
(now return `TemplateLegacy`).
> - **Sandbox Connect**: Add `POST /sandboxes/{sandboxID}/connect` with
`ConnectSandbox`; mark `POST /sandboxes/{sandboxID}/resume` as
deprecated.
> - **Team Metrics**: Add `GET /teams/{teamID}/metrics/max` returning
`MaxTeamMetric`.
> - **Schema updates**: `Template` now includes `buildStatus`
(`TemplateBuildStatus`); `BuildLogEntry.step`;
`BuildStatusReason.logEntries`; `NodeStatusChange.clusterID`; replace
`McpConfig` with nullable `Mcp`; add `timestampUnix` to metrics and
deprecate `timestamp`.
> - **JS SDK**:
> - Update template build request to `POST /v3/templates` in
`template/buildApi.ts`.
> - Regenerate `schema.gen.ts` reflecting new endpoints/types and
deprecations.
> - **Python SDK**:
> - Add client for `POST /v3/templates`; switch sync/async build APIs to
use `TemplateBuildRequestV3` and new response type.
>   - Add client for `POST /sandboxes/{sandboxID}/connect`.
> - Introduce/adjust models: `TemplateBuildStatus`,
`TemplateRequestResponseV3`, `TemplateLegacy`, `ConnectSandbox`,
`MaxTeamMetric`, `McpType0`, and metric timestamp fields.
> - **Meta**:
>   - Changesets: patch bumps for affected packages.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4672fbf655ae3e508bf375dc58a89299e19f0664. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-31 01:53:02 -07:00
Jakub Novák 60fb009e4a Use OIDC for npm publish (#990)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Move npm publishing to OIDC by adding id-token permissions and
removing NPM_TOKEN, update actions/setup-node to v6, and upgrade npm in
workflows.
> 
> - **Workflows**:
>   - **OIDC for npm publish**:
> - Add `permissions: id-token: write` in
`workflows/publish_packages.yml` and `workflows/release.yml`.
> - Remove `NPM_TOKEN` secret requirement and set `NPM_TOKEN: ""` in
`changesets/action` env.
>   - **Node/tooling updates**:
> - Bump `actions/setup-node` from `v3` to `v6` and set `registry-url`
where needed.
>     - Add step to upgrade `npm` to `^11.6` in `publish_packages.yml`.
>   - Keep pnpm caching/configuration and other steps intact.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
539db5937bfe83c4222015de3dcf9c1f90764bf3. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-30 02:13:40 -07:00
Tomas Valenta 0d8d0bce44 Add missing signal for request timeout (#999) 2025-10-29 14:55:41 -07:00
github-actions[bot] 2703721441 [skip ci] Release new versions 2025-10-28 17:10:46 +00:00
Mish Ushakov e8576a51e6 Add .fromBunImage and .bunInstall to the SDK (#993)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Adds `fromBunImage` and `bunInstall` to JS/Python SDKs, and extends
`npmInstall` with a `dev` flag, with tests across sync/async suites.
> 
> - **Template APIs**:
> - Add `fromBunImage` to start from `oven/bun:<variant>` in
`packages/js-sdk/src/template/index.ts` and
`packages/python-sdk/e2b/template/main.py`.
>   - Add `bunInstall(packages, { g, dev })` in both SDKs.
>   - Extend `npmInstall` to accept `{ dev: boolean }` in both SDKs.
> - **Types/Docs**:
> - Update `packages/js-sdk/src/template/types.ts` to declare
`fromBunImage`, `bunInstall`, and `npmInstall` `dev` option.
> - **Tests**:
> - Add tests for `fromBunImage` and `bunInstall` and update
`npmInstall` (global/dev) in JS (`packages/js-sdk/tests/...`) and Python
sync/async (`packages/python-sdk/tests/...`).
> - **Changeset**:
> - Minor releases for `@e2b/python-sdk` and `e2b`
(`.changeset/silly-lions-buy.md`).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
b6461d015743d38ba014d724167d2ca256cf7951. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@e2b/python-sdk@2.5.0 e2b@2.5.0
2025-10-28 16:59:37 +00:00
github-actions[bot] 70487f007e [skip ci] Release new versions 2025-10-28 11:14:31 +00:00
Mish Ushakov ffd1258adb Export ReadyCMD class (#992)
for building type-safe wrappers around .setStartCmd/.setReadyCmd

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Expose `ReadyCmd` via JS (`packages/js-sdk/src/index.ts`) and Python
(`e2b/__init__.py`) SDK entrypoints, with patch version bumps.
> 
> - **SDK Exports**:
> - **JS**: Re-exports `ReadyCmd` from `./template/readycmd` in
`packages/js-sdk/src/index.ts`.
> - **Python**: Exposes `ReadyCmd` in `e2b/__init__.py` imports and
`__all__`.
> - **Versioning**:
> - `.changeset/early-trainers-repeat.md`: Patch bumps for
`@e2b/python-sdk` and `e2b`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
ff91a3e3578be8db6ea7644ee6717f1bd18b0165. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@e2b/python-sdk@2.4.3 e2b@2.4.3
2025-10-28 11:03:48 +00:00