Skip to content

enable http2 for js sdk envd rpc/api traffic#1311

Open
matthewlouisbrockman wants to merge 15 commits intomainfrom
js-http2
Open

enable http2 for js sdk envd rpc/api traffic#1311
matthewlouisbrockman wants to merge 15 commits intomainfrom
js-http2

Conversation

@matthewlouisbrockman
Copy link
Copy Markdown
Contributor

@matthewlouisbrockman matthewlouisbrockman commented May 2, 2026

image

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

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 2, 2026

🦋 Changeset detected

Latest commit: a84426b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
e2b Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cursor
Copy link
Copy Markdown

cursor Bot commented May 2, 2026

PR Summary

Medium Risk
Changes the JS SDK’s network transport for sandbox envd RPC/API calls in Node by switching to an undici HTTP/2-capable fetch adapter and raising the minimum Node version, which could affect connectivity/perf and runtime compatibility.

Overview
Enables HTTP/2 for JS SDK sandbox envd RPC/API requests in Node by introducing an undici-backed fetch wrapper (src/envd/http2.ts) and routing both Connect RPC transport and EnvdApiClient requests through it.

Non-Node runtimes continue to use the global fetch. The package now depends on undici, adds unit coverage for the adapter behavior, and bumps the minimum supported Node version to >=20.18.1 (via package.json and a changeset).

Reviewed by Cursor Bugbot for commit a84426b. Bugbot is set up for automated code reviews on this repo. Configure here.

@matthewlouisbrockman matthewlouisbrockman changed the title enable http2 for envd rpc/api traffic enable http2 for js sdk envd rpc/api traffic May 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

Package Artifacts

Built from 1818ccc. Download artifacts from this workflow run.

JS SDK (e2b@2.19.5-js-http2.0):

npm install ./e2b-2.19.5-js-http2.0.tgz

CLI (@e2b/cli@2.10.2-js-http2.0):

npm install ./e2b-cli-2.10.2-js-http2.0.tgz

Python SDK (e2b==2.20.3+js-http2):

pip install ./e2b-2.20.3+js.http2-py3-none-any.whl

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6b27786a1a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/js-sdk/src/envd/http2.ts Outdated
Comment thread packages/js-sdk/src/envd/http2.ts Outdated
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6b27786. Configure here.

Comment thread packages/js-sdk/src/envd/http2.ts Outdated
Comment thread packages/js-sdk/src/envd/http2.ts Outdated
Comment thread packages/js-sdk/src/envd/http2.ts Outdated
Comment thread packages/js-sdk/src/envd/http2.ts Outdated
Comment thread packages/js-sdk/src/sandbox/index.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant