Proto commits in e2b-dev/E2B

These commits are when the Protocol Buffers files have changed: (only the last 100 relevant commits are shown)

Commit:e873ee9
Author:Mish Ushakov
Committer:GitHub

feat(sdk): add allowNetworkMounts option to filesystem watch (#1420) Client-side counterpart to [e2b-dev/infra#2982](https://github.com/e2b-dev/infra/pull/2982): adds an `allowNetworkMounts`/`allow_network_mounts` option to filesystem directory watching across the JS and Python (sync + async) SDKs, so clients can explicitly opt into watching paths on network filesystem mounts (NFS, CIFS, SMB, FUSE), which envd rejects by default. Events on network mounts may be unreliable or not delivered at all, hence the explicit opt-in. This regenerates the filesystem proto code from the updated spec and threads the flag through `watchDir`/`watch_dir` (streaming `WatchDir` and polling `CreateWatcher`). The option requires envd 0.6.4 (shipped by the infra PR); using it against an older sandbox throws a `TemplateError`/`TemplateException`. Default behavior is unchanged. Includes new watch tests for all three SDKs and a minor-bump changeset for `e2b` and `@e2b/python-sdk`. > Note: the new tests exercise the flag on a regular directory (a network mount can't be set up from SDK tests) and require envd 0.6.4, so this should land with/after the infra deploy. All pre-existing watch tests pass; the new ones currently fail with the expected `TemplateError` against the deployed envd. ### Usage **JavaScript** ```ts const handle = await sandbox.files.watchDir( '/mnt/nfs-share/my-dir', (event) => console.log(event.type, event.name), { allowNetworkMounts: true } ) ``` **Python (async)** ```python handle = await sandbox.files.watch_dir( "/mnt/nfs-share/my-dir", on_event=lambda e: print(e.type, e.name), allow_network_mounts=True, ) ``` **Python (sync)** ```python handle = sandbox.files.watch_dir("/mnt/nfs-share/my-dir", allow_network_mounts=True) for e in handle.get_new_events(): print(e.type, e.name) ``` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

Commit:da85b1e
Author:Mish Ushakov
Committer:GitHub

feat(sdk): add includeEntry option to filesystem watch (#1385) Client-side counterpart to [e2b-dev/infra#2930](https://github.com/e2b-dev/infra/pull/2930): adds an `includeEntry`/`include_entry` option to filesystem directory watching across the JS and Python (sync + async) SDKs, so each `FilesystemEvent` can carry the affected entry's `EntryInfo` (best-effort — unset for remove/rename-away events where the path no longer exists). This regenerates the filesystem proto code from the updated spec, threads the flag through `watchDir`/`watch_dir` (streaming `WatchDir` and polling `CreateWatcher`), maps the new `entry` field onto the event, and extracts a shared entry-mapping helper reused by `list`/`getInfo`/`rename`. The option degrades gracefully: older sandboxes (< envd 0.6.2) ignore it and leave `entry` unset, so there's no hard version gate. Includes new watch tests for all three SDKs and a minor-bump changeset for `e2b` and `@e2b/python-sdk`. > Note: the entry-info tests require envd 0.6.2 (shipped by the infra PR), so this should land with/after that deploy. ### Usage **JavaScript** ```ts const handle = await sandbox.files.watchDir( 'my-dir', (event) => { console.log(event.type, event.name, event.entry?.path, event.entry?.type) }, { includeEntry: true } ) ``` **Python (async)** ```python def on_event(e): print(e.type, e.name, e.entry.path if e.entry else None) handle = await sandbox.files.watch_dir("my-dir", on_event=on_event, include_entry=True) ``` **Python (sync)** ```python handle = sandbox.files.watch_dir("my-dir", include_entry=True) for e in handle.get_new_events(): print(e.type, e.name, e.entry.path if e.entry else None) ``` 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

Commit:961ffba
Author:Mish Ushakov
Committer:GitHub

feat(sdks): expose user-defined file metadata on sandbox.files (#1383) Adds a `metadata` option to file uploads and surfaces persisted metadata on every `EntryInfo` / `WriteInfo` returned by `getInfo`, `list`, `rename`, and write responses, across the JS and Python (sync + async) SDKs. Metadata is sent as `X-Metadata-<key>: <value>` request headers and persisted by envd as `user.e2b.*` extended attributes; the same map is applied to every file in a multi-file upload. Keys and values must be printable US-ASCII and keys are lowercased by the sandbox, so they may differ in case when read back. Requires **envd 0.6.2 or later**. This syncs the envd OpenAPI spec and filesystem proto with [infra#2732](https://github.com/e2b-dev/infra/pull/2732) and regenerates the JS/Python clients. ## Usage **JavaScript / TypeScript** ```ts // Single file const info = await sandbox.files.write('report.txt', 'hello', { metadata: { author: 'mish', purpose: 'demo' }, }) console.log(info.metadata) // { author: 'mish', purpose: 'demo' } // Multiple files (same metadata applied to each) await sandbox.files.writeFiles( [ { path: 'a.txt', data: 'A' }, { path: 'b.txt', data: 'B' }, ], { metadata: { source: 'import' } } ) // Read it back const stat = await sandbox.files.getInfo('report.txt') console.log(stat.metadata) // { author: 'mish', purpose: 'demo' } ``` **Python** ```python # Single file info = sandbox.files.write("report.txt", "hello", metadata={"author": "mish"}) print(info.metadata) # {"author": "mish"} # Multiple files (same metadata applied to each) sandbox.files.write_files( [ WriteEntry(path="a.txt", data="A"), WriteEntry(path="b.txt", data="B"), ], metadata={"source": "import"}, ) # Read it back stat = sandbox.files.get_info("report.txt") print(stat.metadata) # {"author": "mish"} ``` The async Python API is identical with `await`. ## Tests Integration tests cover the round-trip across `write` / `getInfo` / `list` / `rename`, octet-stream uploads, multi-file uploads, overwrite-clears-stale-metadata, and metadata written directly as `user.e2b.*` xattrs via `sandbox.commands.run` surfacing in `getInfo`. They require a sandbox running envd 0.6.2+. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

Commit:87ceec2
Author:Matt Brockman
Committer:GitHub

feat: enable piping on the e2b cli (#1127) Adds stdin piping support to `e2b sandbox exec`, so users can do: ```bash echo "data" | e2b sandbox exec <id> -- cat cat file.bin | e2b sandbox exec <id> -- python3 -c 'import sys; print(len(sys.stdin.buffer.read()))' ``` Included: - JS SDK updates: - closeStdin() - supportsStdinClose - CLI updates: - detects piped stdin - streams stdin in 64 KiB chunks - closes remote stdin on EOF - graceful fallback for older sandbox versions (requires `envd` >= 0.5.2, warn + ignore piped input) ### Example Usage #### non-piped exec still works ``` e2b sandbox exec <sandbox_id> -- 'echo backend-non-pipe' ``` #### piped stdin path (supported envd) should deliver bytes ``` echo "hello" | e2b sandbox exec <sandbox_id> -- 'wc -c' # expect 6 printf '\x00\x01\x02\xff' | $e2b sandbox exec <sandbox_id> -- 'wc -c' # expect 4 ``` #### optional: legacy template behavior should warn + ignore piped stdin ``` echo "hello" | e2b sandbox exec <legacy_sandbox_id> -- 'wc -c' # expect 0 + "Ignoring piped stdin." ```

Commit:e142c23
Author:Jakub Novák
Committer:GitHub

Set stdin to `/dev/null` by default (#919) Disable stdin (setting it to `/dev/null` for `command.run()`, but enable to setting it to pipe, which you can send the input via `command.sendStdin()` This fixes issues with tools checking for stdin and then hanging indefinitely <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Disables stdin by default and introduces a new `StartRequest.stdin` flag to opt-in to stdin piping, updating JS/Python SDKs, version gating, and tests. > > - **Spec/Protobuf**: > - Add `optional bool stdin` to `process.StartRequest` in `spec/envd/process/process.proto` and regenerate JS/Python protos. > - **JS SDK**: > - Add `ENVD_COMMANDS_STDIN = '0.3.0'` and version check; error if `stdin === false` on older envd. > - Extend `CommandStartOpts` with `stdin` (default `false`); pass `stdin` to `rpc.start`. > - **Python SDK**: > - Add `ENVD_COMMANDS_STDIN = Version("0.3.0")` and version check mirroring JS. > - Extend async/sync `commands.run()` with `stdin` (default `False`); pass to `StartRequest`. > - Update generated `process_pb2`/`.pyi` with `StartRequest.stdin`. > - **Tests**: > - Update send-stdin tests to run commands with `stdin: true`/`stdin=True`. > - **Changeset**: > - Minor bump for `@e2b/python-sdk` and `e2b`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 458a15187e6eadccd43540e6b8972c4d45e1bb78. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->

The documentation is generated from this commit.

Commit:92906fe
Author:Jakub Novak
Committer:Jakub Novak

Set stdin for commands to `/dev/null` by default

The documentation is generated from this commit.

Commit:230a202
Author:Jakub Novak
Committer:Jakub Novak

Set stdin for commands to `/dev/null` by default

The documentation is generated from this commit.

Commit:edeafb1
Author:Mish Ushakov
Committer:GitHub

Adds files.getInfo / files.get_info methods to retrieve information about directory/files (#724) **Changelog** - Adds `files.getInfo`, `files.get_info` methods to the SDKs. - Adds tests for the new methods - Adds documentation for the above. **Examples** JavaScript ```js import { Sandbox } from '@e2b/code-interpreter' const sandbox = await Sandbox.create() // Create a new file await sandbox.files.write('test_file.txt', 'Hello, world!') // Get information about the file const info = await sandbox.files.getInfo('test_file.txt') console.log(info) // { // name: 'test_file.txt', // type: 'file', // path: '/home/user/test_file.txt' // } ``` Python ```py from e2b_code_interpreter import Sandbox sandbox = Sandbox() # Create a new file sandbox.files.write('test_file', 'Hello, world!') # Get information about the file info = sandbox.files.get_info('test_file') print(info) # EntryInfo(name='test_file.txt', type=<FileType.FILE: 'file'>, path='/home/user/test_file.txt') ``` --------- Co-authored-by: Jakub Novak <jakub@e2b.dev>

Commit:42965b7
Author:Jakub Novak
Committer:Jakub Novak

Update spec

Commit:db93426
Author:Mish
Committer:Jakub Novak

updated proto

Commit:6e4037e
Author:Mish
Committer:Jakub Novak

reverted EntryInfo on list()

Commit:19c6bd9
Author:Mish
Committer:Jakub Novak

update list and stat types

Commit:8006ce0
Author:Mish

updated proto

Commit:8cb1c62
Author:Mish

reverted EntryInfo on list()

Commit:8f0e42a
Author:Mish

update list and stat types

Commit:2def130
Author:Jiri Sveceny
Committer:GitHub

Flag for securing envd access with auth token (#688) Waiting until secure flag will be available in production cluster. --------- Co-authored-by: Jakub Novák <jakub@e2b.dev>

Commit:52929c4
Author:Jiri Sveceny
Committer:Jiri Sveceny

updated api/envd clients

Commit:3ad9c6e
Author:Jiri Sveceny
Committer:Jiri Sveceny

updated api/envd clients

Commit:836e2fd
Author:Jiri Sveceny
Committer:Jiri Sveceny

updated api/envd clients

Commit:a5b08de
Author:0div
Committer:GitHub

Add optional depth parameter to SDK file listing methods. (#649) # Description Do not merge before https://github.com/e2b-dev/infra/pull/524 is merged and deployed. The DX would look like this: ```js const files = await sandbox.files.list(dirName, { depth: 3 }) ``` - [x] update `envd` pb spec - [x] generate for `js-sdk` - [x] update `js-sdk` `file.list` method to include optional depth param - [x] update `js-sdk` tests - [x] generate for `python-sdk` - [x] update `python-sdk` `file.list` method to include optional depth param - [x] sync - [x] async - [x] update `python-sdk` tests - [x] sync - [x] async --------- Co-authored-by: Mish <10400064+mishushakov@users.noreply.github.com>

Commit:5991a22
Author:Jiri Sveceny
Committer:Jiri Sveceny

updated api/envd clients

Commit:36a1643
Author:0div
Committer:GitHub

Add autopause option to sdk with latest main (#680) Add latest changes in main to the auto-pause feature branch - [x] python-sdk - [x] successful build? - [x] successful unit tests? - [x] js-sdk - [x] successful build? - [x] successful unit tests? --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Ben Fornefeld <ben.fornefeld@gmail.com> Co-authored-by: never not exploring <50748440+ben-fornefeld@users.noreply.github.com> Co-authored-by: Vasek Mlejnsky <vasek.mlejnsky@gmail.com> Co-authored-by: Vasek Mlejnsky <vasek@e2b.dev> Co-authored-by: handlebauer <hi@donaldgeddes.ca> Co-authored-by: Tereza Tizkova <tereza@e2b.dev> Co-authored-by: tizkovatereza <135881365+tizkovatereza@users.noreply.github.com> Co-authored-by: Jakub Dobrý <jakub.dobry8@gmail.com> Co-authored-by: Jakub Novak <jakub@e2b.dev> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tomas Valenta <valenta.and.thomas@gmail.com> Co-authored-by: r33drichards <rwendt1337@gmail.com> Co-authored-by: James Murdza <james@jamesmurdza.com> Co-authored-by: yushengchen <yushengchen@nine-yi.com> Co-authored-by: Ziray Hao <ziray.hao@gmail.com> Co-authored-by: Mish Ushakov <10400064+mishushakov@users.noreply.github.com> Co-authored-by: Ziray Hao <45774151+ziruihao@users.noreply.github.com> Co-authored-by: Jiri Sveceny <jiri.sveceny@icloud.com> Co-authored-by: yusheng chen <55658154+samuel871211@users.noreply.github.com> Co-authored-by: David Batey <davidlbatey@gmail.com> Co-authored-by: Penny Templeton <92920463+p-templeton@users.noreply.github.com>

Commit:9129458
Author:Jiri Sveceny
Committer:Jiri Sveceny

updated api/envd clients

Commit:db5089c
Author:0div

* update envd spec & generate for js-sdk * update js-sdk file.list method to include optional depth param * update js-sdk tests

Commit:6e7e4b1
Author:0div

merge main into beta and fix conflicts and generate new specs

Commit:25c4539
Author:Jakub Dobrý
Committer:Jakub Novak

Add watch dir recursive option (missing python client regeneration)

Commit:23ea4ad
Author:Jakub Novak

Rename rpc methods for watcher

Commit:bc42ba1
Author:Jakub Novak

Refactor watch dir

Commit:c5aa13e
Author:Jakub Novak

Fix command for generating from rpc spec

Commit:81db2b1
Author:Jakub Novak

Add sync watch handler

Commit:0976c10
Author:Jakub Novak

Remove file info from remove method

Commit:08fc1e4
Author:Jakub Novak

Get paths for filesystem operations from envd

Commit:6b32979
Author:Tomas Valenta

Fix python request timeout error; Change auth

Commit:e1939ad
Author:Tomas Valenta

Move user to header

Commit:fda50a6
Author:Tomas Valenta

Change default keepalive interval

Commit:d8251e7
Author:Tomas Valenta

Client keepalive

Commit:21766e6
Author:Tomas Valenta

Add keepalive support; Tweak timeouts

Commit:8f1839c
Author:Tomas Valenta

Regenerate envd rpc clients

Commit:abc17cb
Author:Tomas Valenta

Implement fs move in envd

Commit:af449d7
Author:Tomas Valenta

Fix watch init error

Commit:b07ce2b
Author:Tomas Valenta

Fix mux; Add start event to watch to wait for init

Commit:229c135
Author:Tomas Valenta

Update scripts; Fix dir watch; Improve naming

Commit:549c008
Author:Tomas Valenta

Simplify watch dir

Commit:ef19d8f
Author:Tomas Valenta

Regenrate RPC; Fix namespacing

Commit:593d236
Author:Tomas Valenta

Simplify naming of envd services

Commit:47dfb10
Author:Tomas Valenta

Implement file handling; Fix dir permissions

Commit:c3833ad
Author:Tomas Valenta

Finish makedir

Commit:aa26ca3
Author:Tomas Valenta

Fix output multireader

Commit:b04342c
Author:Tomas Valenta

Fix input stream; [WIP] Python SDK

Commit:fad330c
Author:Tomas Valenta

Return sensible process info

Commit:16d3272
Author:Tomas Valenta

Add process tag

Commit:167fc2f
Author:Tomas Valenta

Simplify envd API

Commit:ecf318a
Author:Tomas Valenta

Update spec and JS

Commit:9f63733
Author:Tomas Valenta

Make cwd optional

Commit:1a6d34e
Author:Tomas Valenta

Improve types

Commit:6974414
Author:Tomas Valenta

Export types in TS SDK; [WIP] Python SDK process handling

Commit:d943134
Author:Tomas Valenta

Add missing pty output

Commit:969b849
Author:Tomas Valenta

Fix naming

Commit:5bfcc9a
Author:Tomas Valenta

Imrpove connection config; [WIP] Rework Python SDK

Commit:ce84b20
Author:Tomas Valenta

Simplify envd

Commit:068ff56
Author:Tomas Valenta

Regenerate APIs

Commit:7f99c61
Author:Tomas Valenta

Generate server; [WIP] Finish implementing services

Commit:556cfdf
Author:Tomas Valenta

[WIP] Add process management

Commit:8970f25
Author:Tomas Valenta

Fix fs user handling

Commit:3d10360
Author:Tomas Valenta

Simplify service; Implement fs

Commit:9d0de45
Author:Tomas Valenta

Tweak types

Commit:26dead6
Author:Tomas Valenta

Remove non essential parameters and methods

Commit:3b4c915
Author:Tomas Valenta

Generate clients

Commit:86e1996
Author:Tomas Valenta

[WIP] Finalize protobufs

Commit:dc11dd8
Author:Tomas Valenta

[WIP] Add comments

Commit:f57b6b4
Author:Tomas Valenta

Properly nest definitions

Commit:fab21cb
Author:Tomas Valenta

Regenerate

Commit:002a288
Author:Tomas Valenta

[WIP] Generate python client

Commit:f9198d1
Author:Tomas Valenta

Remove unnecessary methods

Commit:4649216
Author:Tomas Valenta

Generate server

Commit:64b8548
Author:Tomas Valenta

Fix grpc generation in envd

Commit:1b8877f
Author:Tomas Valenta

Merge branch 'ttl' into grpc

Commit:ab4a5ab
Author:Tomas Valenta

Fix input stream

Commit:d1831b3
Author:Tomas Valenta

Unify types

Commit:571b8f0
Author:Tomas Valenta

Check bidirectional streams

Commit:6556280
Author:Tomas Valenta

Improve spec

Commit:785bafd
Author:Jakub Novak

Add tests

Commit:5577a5e
Author:Jakub Novak
Committer:Jakub Novak

Rename proto files (naming must be unique)

Commit:24cf294
Author:Jakub Novak
Committer:Jakub Novak

Connect with API

Commit:494fd09
Author:Jakub Novak
Committer:Jakub Novak

Move the logic for building the template

Commit:c1bf36a
Author:Jakub Novak
Committer:Jakub Novak

Create base service

Commit:1dccd7e
Author:Jakub Novak
Committer:Jakub Novak

Change to streaming

Commit:e137cd3
Author:Jakub Novak
Committer:Jakub Novak

Fix sync error in orchestration API # Conflicts: # packages/orchestrator/internal/server/main.go # packages/shared/pkg/grpc/orchestrator/orchestrator.pb.go # packages/shared/pkg/grpc/orchestrator/orchestrator_grpc.pb.go

Commit:4c766e3
Author:Tomas Valenta

Experiment with protobuffers

Commit:779b260
Author:Tomas Valenta

Add spec comment

Commit:9883cf2
Author:Tomas Valenta

Draft proto and api files

Commit:59e853f
Author:Jakub Novak
Committer:Jakub Novak

Add docstring for grpc

Commit:4a70514
Author:Jakub Novak
Committer:Jakub Novak

Simplify tracing, connect traces automatically

Commit:7264e59
Author:Jakub Novak
Committer:Jakub Novak

Implement GRPC

Commit:4e49d85
Author:Tomas Valenta

Add session observability links and missing errors; Remove vendor deps; Fix golang version build problems

This commit does not contain any .proto files.

Commit:421feb1
Author:Tomas Valenta

Update deps

Commit:65beb0d
Author:Tomas Valenta

Cleanup; Add API as a service to Nomad

Commit:d88145f
Author:Tomas Valenta

Add 'modules/cluster/disk-image/firecracker-task-driver/' from commit '2562655ed72f4f29fe31a3e1ebf25889f6edc443' git-subtree-dir: modules/cluster/disk-image/firecracker-task-driver git-subtree-mainline: f90da349e42a957d4a51d91e424816d016e8e6c4 git-subtree-split: 2562655ed72f4f29fe31a3e1ebf25889f6edc443

Commit:f90da34
Author:Tomas Valenta

Cleanup TF hierarchy [WIP]

This commit does not contain any .proto files.

Commit:5bafccc
Author:Tomas Valenta

Add 'modules/orchestrator/firecracker-task-driver/' from commit 'f6b133369934351004265e9fa0526fdd6f84b06c' git-subtree-dir: modules/orchestrator/firecracker-task-driver git-subtree-mainline: daddc851d3a55115702ce06ca02095f21ef34f8d git-subtree-split: f6b133369934351004265e9fa0526fdd6f84b06c