Files
deepseek-harness/examples/headless-agent/e2b.cordis.yml
Tianyi Cui f5866fc202 fix(e2b): address review round on cadence config, disposal, and SDK edge cases
- subprocess-e2b: the 20 ms remote poll cadence becomes a validated pollMs
  Config field (each tick is one control-plane request); the README documents
  the latency-versus-request-count trade.
- subprocess-e2b: extract src/remote.ts owning asError, signalOpts,
  commandOpts, delay, waitTick, and one tolerant signalRemoteGroups shared by
  the pgid-keyed process ladder and sid-keyed terminal ladder, so the two
  teardown paths keep identical error tolerance.
- subprocess-e2b: service disposal aggregates sibling cleanup failures into
  one AggregateError instead of discarding all but the first.
- subprocess-e2b: waitForProcessGroupId refuses published group ids <= 1, so
  a same-UID rewrite of the pid file cannot aim termination at kill -- -1;
  README documents the same-UID control-state limitation.
- subprocess-e2b: drain-grace expiry now releases an inherited-output E2B
  callback blocked on host backpressure before disconnecting, so the SDK
  settlement cannot stay pinned behind an unread host stream.
- subprocess-e2b: spawn/spawnTerminal stop validating typed spec fields
  (trust-TypeScript rule; pty-local validates its config before specs exist);
  resolveExecutable rejects separator-containing relative paths per the seam
  contract; terminal setups tracked as a Set of records.
- subprocess-e2b: PTY output push-without-backpressure is a documented
  contract (flowing consumer folds bytes; paused consumer buffers).
- fs-e2b: streamText normalizes the pinned SDK's empty-file '' return into an
  empty stream instead of throwing on getReader().
- e2b overlays: comment the one-world cwd invariant across e2b.cwd,
  workspaceRoot, and bash-local's implicit default workdir.
2026-08-08 22:19:13 +08:00

58 lines
2.1 KiB
YAML

# POC overlay: keep the advanced headless agent and model-facing tools, but
# place its filesystem and process substrate in one short-lived E2B sandbox;
# the generic Bash, PTY, and LSP consumers compose above them.
#
# One-world invariant: e2b.cwd, sandbox-policy.workspaceRoot, and bash-local's
# default workdir (implicit host process.cwd()) must all name the same remote
# directory. Only e2b.cwd is created at sandbox open; dropping its !!js line
# falls back to /home/user/workspace while Bash and PTY keep targeting the
# host path, so every tool call fails with a remote spawn error.
- id: base
name: '@cordisjs/plugin-include'
config:
path: ./advanced.cordis.yml
patches:
- id: subprocess
name: '@deepseek-ai/dsh-subprocess-local'
disabled: true
- id: fs-local
name: '@deepseek-ai/dsh-fs-local'
disabled: true
- insert:
- id: e2b
name: '@deepseek-ai/dsh-e2b'
config:
cwd: !!js process.cwd()
timeoutMs: 300000
- id: subprocess-e2b
name: '@deepseek-ai/dsh-subprocess-e2b'
- id: fs-e2b
name: '@deepseek-ai/dsh-fs-e2b'
- id: sandbox-policy
name: '@deepseek-ai/dsh-sandbox-policy'
config:
mode: danger-full-access
workspaceRoot: !!js process.cwd()
- id: pty
name: '@deepseek-ai/dsh-pty'
- id: pty-local
name: '@deepseek-ai/dsh-pty-local'
- id: tool-pty
name: '@deepseek-ai/dsh-tool-pty'
- id: lsp
name: '@deepseek-ai/dsh-lsp'
- id: lsp-local
name: '@deepseek-ai/dsh-lsp-local'
config:
servers:
typescript:
command: npx
args: [--yes, typescript-language-server@5.0.0, --stdio]
extensionToLanguage:
.ts: typescript
.tsx: typescriptreact
.js: javascript
.jsx: javascriptreact
- id: tool-lsp
name: '@deepseek-ai/dsh-tool-lsp'