worker bridge e2b - #9
Closed
Coooolfan wants to merge 0 commit into
Closed
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new Python-based worker-bridge-e2b worker implementation that connects to the Onlyboxes console via gRPC and executes workloads inside E2B cloud sandboxes, plus accompanying tests, dependency lockfile, and documentation updates to reflect the new worker option.
Changes:
- Added the
worker/worker-bridge-e2bPython project (config, runner loop, executors, terminal session manager, proto stubs, scripts). - Added unit tests covering
terminalResourcebehaviors and heartbeat-loop behavior. - Updated repo/website documentation to include
worker-bridge-e2bas a supportednormalworker implementation and expanded.gitignorefor Python artifacts.
Reviewed changes
Copilot reviewed 33 out of 39 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| worker/worker-bridge-e2b/uv.lock | Adds locked Python dependencies for the new worker. |
| worker/worker-bridge-e2b/tests/test_terminal_resource.py | Adds tests for terminalResource and heartbeat behavior. |
| worker/worker-bridge-e2b/src/worker_bridge_e2b/session_manager.py | Implements persistent terminal sessions + terminalResource validate/read/export. |
| worker/worker-bridge-e2b/src/worker_bridge_e2b/runner.py | Implements the gRPC connect/heartbeat/dispatch loop. |
| worker/worker-bridge-e2b/src/worker_bridge_e2b/proto/registry/v1/registry_pb2.py | Adds generated protobuf message definitions. |
| worker/worker-bridge-e2b/src/worker_bridge_e2b/proto/registry/v1/registry_pb2_grpc.py | Adds generated gRPC client/server stubs. |
| worker/worker-bridge-e2b/src/worker_bridge_e2b/proto/registry/v1/init.py | Marks registry/v1 proto package. |
| worker/worker-bridge-e2b/src/worker_bridge_e2b/proto/registry/init.py | Marks registry proto package. |
| worker/worker-bridge-e2b/src/worker_bridge_e2b/proto/init.py | Marks proto package. |
| worker/worker-bridge-e2b/src/worker_bridge_e2b/main.py | Adds CLI entrypoint for starting the worker. |
| worker/worker-bridge-e2b/src/worker_bridge_e2b/logging.py | Adds structlog-based logging configuration. |
| worker/worker-bridge-e2b/src/worker_bridge_e2b/executor.py | Implements echo/pythonExec/terminalExec/terminalResource executors. |
| worker/worker-bridge-e2b/src/worker_bridge_e2b/config.py | Adds env-based configuration loading and defaults. |
| worker/worker-bridge-e2b/src/worker_bridge_e2b/init.py | Initializes the new Python package. |
| worker/worker-bridge-e2b/scripts/gen_proto.sh | Adds script to regenerate protobuf stubs from shared proto sources. |
| worker/worker-bridge-e2b/README.md | Documents setup, capabilities, and environment variables. |
| worker/worker-bridge-e2b/pyproject.toml | Declares project metadata, deps, and tooling (ruff/ty/pytest). |
| website/src/docs/zh-CN/worker-bridge-e2b.mdx | Adds Chinese docs page for the E2B bridge runtime. |
| website/src/docs/zh-CN/overview.mdx | Mentions worker-bridge-e2b in worker list. |
| website/src/docs/zh-CN/architecture.mdx | Adds worker-bridge-e2b to the runtime table. |
| website/src/docs/zh-CN/api-mcp-overview.mdx | Updates “normal worker” description to include worker-bridge-e2b. |
| website/src/docs/en/worker-bridge-e2b.mdx | Adds English docs page for the E2B bridge runtime. |
| website/src/docs/en/overview.mdx | Mentions worker-bridge-e2b in worker list. |
| website/src/docs/en/architecture.mdx | Adds worker-bridge-e2b to the runtime table. |
| website/src/docs/en/api-mcp-overview.mdx | Updates “normal worker” description to include worker-bridge-e2b. |
| README/API.zh-CN.md | Updates worker type description to include bridge worker. |
| README/API.md | Updates worker type description to include bridge worker. |
| README.zh-CN.md | Updates top-level README to list additional worker implementations and links. |
| README.md | Updates top-level README to list additional worker implementations and links. |
| console/README/overview.md | Updates worker type description for normal workers. |
| AGENTS.md | Notes worker-bridge-e2b as an additional worker backend. |
| .gitignore | Ignores Python build/venv/cache artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+223
to
+225
| try: | ||
| loop = asyncio.get_event_loop() | ||
| if capability == ECHO_CAPABILITY: |
Comment on lines
+88
to
+92
| # Compute command timeout from deadline | ||
| if deadline_unix_ms > 0: | ||
| cmd_timeout = max(1.0, (deadline_unix_ms - time.time() * 1000) / 1000.0) | ||
| else: | ||
| cmd_timeout = float(_config.e2b_sandbox_timeout_sec) if _config else 300.0 |
Comment on lines
+657
to
+663
| data = _StreamingBody(content) | ||
| request = urllib.request.Request(signed_url, data=data, method="PUT") | ||
| request.add_header("Content-Length", str(content_length)) | ||
| for key, value in (headers or {}).items(): | ||
| trimmed_key = str(key).strip() | ||
| if trimmed_key: | ||
| request.add_header(trimmed_key, str(value)) |
Coooolfan
force-pushed
the
feat/worker-bridge-e2b
branch
from
July 30, 2026 04:15
37dda27 to
0575350
Compare
Coooolfan
force-pushed
the
feat/worker-bridge-e2b
branch
from
July 30, 2026 04:25
0575350 to
a862a6b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.