Skip to content

worker bridge e2b - #9

Closed
Coooolfan wants to merge 0 commit into
mainfrom
feat/worker-bridge-e2b
Closed

worker bridge e2b#9
Coooolfan wants to merge 0 commit into
mainfrom
feat/worker-bridge-e2b

Conversation

@Coooolfan

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 3, 2026 06:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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-e2b Python project (config, runner loop, executors, terminal session manager, proto stubs, scripts).
  • Added unit tests covering terminalResource behaviors and heartbeat-loop behavior.
  • Updated repo/website documentation to include worker-bridge-e2b as a supported normal worker implementation and expanded .gitignore for 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
Coooolfan force-pushed the feat/worker-bridge-e2b branch from 37dda27 to 0575350 Compare July 30, 2026 04:15
@Coooolfan Coooolfan closed this Jul 30, 2026
@Coooolfan
Coooolfan force-pushed the feat/worker-bridge-e2b branch from 0575350 to a862a6b Compare July 30, 2026 04:25
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.

2 participants