Conversation
🦋 Changeset detectedLatest commit: fbc8402 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 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 |
|
@djeebus no need to review, it's a draft |
019d887 to
e11378c
Compare
Package ArtifactsBuilt from cd1df8e. Download artifacts from this workflow run. JS SDK ( npm install ./e2b-2.14.2-mishushakov-volume-crud-sdk.0.tgzCLI ( npm install ./e2b-cli-2.8.1-mishushakov-volume-crud-sdk.0.tgzPython SDK ( pip install ./e2b-2.15.1+mishushakov.volume.crud.sdk-py3-none-any.whl |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8ae99f53cf
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
4cd8756 to
2632556
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| if (!(err instanceof NotFoundError)) { | ||
| throw err | ||
| } | ||
| } |
There was a problem hiding this comment.
Volume remove makes redundant API call on every invocation
Medium Severity
The remove method always makes an extra getInfo/get_info API call before every delete operation to determine if the path is a file or directory (to choose between DELETE /file and DELETE /dir). This doubles the number of API requests for every remove operation. For non-existent paths, this results in two failed requests: getInfo returns 404 (caught and swallowed), then DELETE /file also returns 404 (thrown). There's also a TOCTOU race condition: the entry type could change between the getInfo check and the DELETE call, causing the wrong endpoint to be used.


Summary
Add Volume CRUD operations to both TypeScript and Python SDKs. Volumes are persistent storage that can be mounted to sandboxes. Includes create, list, get_info, and destroy methods. Sandbox creation now supports volumeMounts parameter.
Usage Examples
TypeScript
Python (async)
Python (sync)
Testing
Note
Medium Risk
Adds a new persistent storage surface (volume CRUD + file operations) and threads
volumeMountsthrough sandbox creation, which could break clients if request/response shapes or auth tokens are mishandled. Most changes are additive and codegen-driven, but they touch API wiring and runtime network calls.Overview
Adds first-class Volumes support across SDKs. The JS SDK now exposes a
VolumeAPI (CRUD plus file/dir operations via a separate volume-content OpenAPI client) and exports the new types, errors, and client config.Sandbox creation gains volume mounts.
Sandbox.create(TS) andSandbox/AsyncSandbox.create(Python) acceptvolumeMounts/volume_mountsand transform mount maps into the APIvolumeMountspayload; sandbox info parsing now surfaces returned mounts.Spec/codegen updates and tests. OpenAPI-generated schemas add
/volumesendpoints and related models (e.g.,VolumeAndToken), log querying gainslevel/searchfilters, and new JS tests cover volume CRUD and file operations; Python generation scripts add a separategenerate-volume-apistep and exports newVolume/AsyncVolumeentrypoints.Written by Cursor Bugbot for commit fbc8402. This will update automatically on new commits. Configure here.