feat(sdk): add E2B client to the downstream SDK packages - #1772
feat(sdk): add E2B client to the downstream SDK packages#1772devin-ai-integration[bot] wants to merge 3 commits into
Conversation
Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
🦋 Changeset detectedLatest commit: 59fb825 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
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 |
There was a problem hiding this comment.
Checked cross-language parity, API shape and naming, typing, configuration precedence/immutability, flat package exports, and public documentation. Found 6 TASTE.md violations: four T-51 shallow configuration snapshots and two T-54 mixed value/type re-exports. All findings are attached to changed lines.
Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
Package ArtifactsBuilt from 693807c. Download artifacts from this workflow run. JS SDK ( npm install ./e2b-2.46.1-devin-1787757299-downstream-e2b-client.0.tgzCLI ( npm install ./e2b-cli-2.18.1-devin-1787757299-downstream-e2b-client.0.tgzCode Interpreter JS SDK ( npm install ./e2b-code-interpreter-2.7.2-devin-1787757299-downstream-e2b-client.0.tgzDesktop JS SDK ( npm install ./e2b-desktop-2.3.3-devin-1787757299-downstream-e2b-client.0.tgzPython SDK ( pip install ./e2b-2.46.0+devin.1787757299.downstream.e2b.client-py3-none-any.whlCode Interpreter Python SDK ( pip install ./e2b_code_interpreter-2.9.1+devin.1787757299.downstream.e2b.client-py3-none-any.whlDesktop Python SDK ( pip install ./e2b_desktop-2.4.3+devin.1787757299.downstream.e2b.client-py3-none-any.whl |
Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
|
Fixed centrally in 59fb825: binding now happens in the core |
3 similar comments
|
Fixed centrally in 59fb825: binding now happens in the core |
|
Fixed centrally in 59fb825: binding now happens in the core |
|
Fixed centrally in 59fb825: binding now happens in the core |
|
Not changing this: |
1 similar comment
|
Not changing this: |
Summary
Adds an
E2Bclient to the four downstream SDKs (@e2b/code-interpreter,@e2b/desktop,e2b-code-interpreter,e2b-desktop), so the API key and domain can be bound explicitly instead of coming from the environment:Per-call options still win, explicit
undefined/Nonedoesn't erase the bound config, clients are isolated from each other and from the env-configured top-level exports, andclient.Sandbox.create()returns an instance of the package's ownSandbox(sorunCode/run_code, contexts, and the desktop screen/mouse/keyboard/stream APIs are all there).Binding lives on the resource classes now
Instead of every package generating bound subclasses itself (the previous
_bindhelper / inlineclass extends Sandbox { boundOpts }), the binding is a single internal factory on the resource classes, in the core SDK:Every client — core and downstream — is now just:
Consequences worth noting:
E2Bunder the hood to getVolume/Template/Secret, andcallableTemplatestays internal (TemplateBase.withOptswraps the bound class itself).X.withOpts(a).withOpts(b)keepsawherebdoesn't override it (covered by a new test in both core suites), andsignalis still dropped so it can only be passed per call.apiHeaders/api_headersmutated after the client is constructed no longer leak into its requests (fixed once in the shared factory, for every client).@internal @hidden @hide/:meta private:), so no new public surface — but the downstream packages call them across the package boundary, hence thepatchbumps fore2b/@e2b/python-sdkand the raisede2b>=floors in the two Python packages.Tests mirroring the core client suites were added for all four packages (offline, against a local API server; the desktop suites stub the envd-only parts of
create), plus READMEs and aminorchangeset.Link to Devin session: https://app.devin.ai/sessions/ec1af68649fd4880a1cb27cb51d819e9
Requested by: @mishushakov