English | 中文
E2B implementation of the @deepseek-ai/dsh-subprocess seam. It has no config: load @deepseek-ai/dsh-e2b first, then this service in place of dsh-subprocess-local. Existing consumers such as dsh-bash-local then execute in the shared remote sandbox without an E2B-specific Bash adapter.
Sandbox.commands.run(..., { background: true }) starts remotely. pid is -1 until the SDK returns the command PID; done, stdin, termination, and waitForExit() wait for readiness internally.setsid --wait and records its actual process-group id plus private status files beneath ctx.e2b.runtimeRoot/processes. The handle waits for that file instead of assuming the SDK command PID is the group id. Termination signals the negative recorded id with SIGTERM, waits the caller's graceMs, then escalates to SIGKILL and the SDK kill fallback. Service disposal terminates and joins every retained handle before the sandbox owner disposes.DSH_* and credential-shaped (*KEY*, *SECRET*, *TOKEN*) names, then restores every spec.env entry as an explicit caller opt-in. Host ambient variables never enter the sandbox implicitly.The base E2B image supplies the Bash/GNU utilities this adapter invokes: bash, setsid, ps, tr, env, chmod, tee, and kill. A custom template must retain compatible commands.
Indirectly, through consumer seams such as the Bash executor behind dsh-tool-bash, which render remote output, exit facts, background deltas, and spill paths.
No direct invalidation; the named consumers own any request-prefix changes.
CommandHandle.stdout and .stderr accumulate even when this adapter exposes bounded tails, so the subprocess seam's normal host-memory bound is not achieved.pid remains -1 during remote startup; consumers that require a positive PID immediately, including the ACP child backend, cannot use this provider unchanged.SubprocessHandle objects or output cursors from them..dsh-e2b; this POC supplies no retention sweep.