Commit Graph
10184 Commits
Author SHA1 Message Date
Tianyi Cui de77310c6f refactor(e2b): narrow the sandbox POC 2026-08-08 22:19:13 +08:00
Tianyi Cui bb0be75d85 refactor(e2b): drop obsolete host sandbox overlay 2026-08-08 22:19:12 +08:00
Tianyi Cui e8d5599945 refactor(e2b): narrow settlement polling helper 2026-08-08 22:19:12 +08:00
Tianyi Cui 677541d123 fix(e2b): close proven provider boundary gaps 2026-08-08 22:19:12 +08:00
Tianyi Cui 917a7493f7 refactor(e2b): keep provider layer substrate-only 2026-08-08 22:19:12 +08:00
Tianyi Cui 65b345c96a test(e2b): tolerate real-provider runtime latency 2026-08-08 22:19:12 +08:00
Tianyi Cui 81e2e1f647 fix(e2b): harden SDK shell and cleanup boundaries
E2B starts command and PTY requests through login shells, so isolate each control shell behind a fresh randomized HOME and blank sandbox credential names before mutable profiles can run. Preserve the real remote HOME only for the requested argv.

Collapse duplicate termination state, keep failed force cleanup retryable until quiescence is observed, and make terminal state allocation cancellable. Leave numeric PGID reuse as an explicit provider-level TODO because a userspace precheck would remain TOCTOU.
2026-08-08 22:19:12 +08:00
Tianyi Cui 091af03a81 fix(e2b): harden remote startup and teardown 2026-08-08 22:19:12 +08:00
Tianyi Cui ca79f4364c test(e2b): prove stale interrupt isolation 2026-08-08 22:19:12 +08:00
Tianyi Cui c122d984c4 fix(e2b): harden cancellation and teardown boundaries 2026-08-08 22:19:12 +08:00
Tianyi Cui cf4b721a8d test(e2b): snapshot provider-neutral overlay surface 2026-08-08 22:19:12 +08:00
Tianyi Cui 896bcd64a1 fix(e2b): await teardown and honor published status 2026-08-08 22:19:12 +08:00
Tianyi Cui d0648446c9 fix(e2b): close final lifecycle gaps 2026-08-08 22:19:12 +08:00
Tianyi Cui 219999cd2f fix(e2b): close adapter lifecycle review gaps 2026-08-08 22:19:12 +08:00
Tianyi Cui f5306f6e89 docs(e2b): record subprocess teardown contract 2026-08-08 22:19:12 +08:00
Tianyi Cui ed5d21277f test(e2b): observe disposal before spawn fence 2026-08-08 22:19:12 +08:00
Tianyi Cui 022841027f fix(e2b): fence teardown and terminal publication 2026-08-08 22:19:12 +08:00
Tianyi Cui e9bef2967d fix(e2b): preserve signals after output drain 2026-08-08 22:19:11 +08:00
Tianyi Cui ec0310ca1b fix(e2b): harden remote teardown transactions 2026-08-08 22:19:11 +08:00
Tianyi Cui 62df6d0c09 refactor(e2b): share environment scrubbing 2026-08-08 22:19:11 +08:00
Tianyi Cui fd78d9bc58 fix(e2b): harden remote process lifecycle 2026-08-08 22:19:11 +08:00
Tianyi Cui 8877f5d582 fix(e2b): normalize relative executable paths 2026-08-08 22:19:11 +08:00
Tianyi Cui 2188cb908c refactor(e2b): delegate terminal lifecycle 2026-08-08 22:19:11 +08:00
Tianyi Cui 2abc9823e7 refactor(e2b): compose portable runtime consumers 2026-08-08 22:19:11 +08:00
Tianyi Cui 97496c3d00 fix(e2b): close remaining remote lifecycle races 2026-08-08 22:19:11 +08:00
Tianyi Cui 64b4669a74 docs(packages): fit merged group map budget 2026-08-08 22:19:11 +08:00
Tianyi Cui 3e343b4477 fix(e2b): harden remote adapter boundaries 2026-08-08 22:19:11 +08:00
Tianyi Cui dc44f93c39 fix(e2b): simplify setup abort wait 2026-08-08 22:19:11 +08:00
Tianyi Cui bccad1bb31 fix(e2b): normalize setup rejection reasons 2026-08-08 22:19:11 +08:00
Tianyi Cui 3dea36f1ce fix(e2b): close remote lifecycle gaps 2026-08-08 22:19:10 +08:00
Tianyi Cui e64d40837c refactor(e2b): group remote providers 2026-08-08 22:19:10 +08:00
Tianyi Cui 6667102890 Add E2B PTY, LSP, and code runtime providers 2026-08-08 22:19:10 +08:00
Tianyi Cui e7b682f1f6 feat(e2b): add remote runtime providers 2026-08-08 22:19:10 +08:00
Tianyi Cui b9b25f81cb fix(subprocess-local): fence descendant adoption on the shell's start identity
A recycled shell pid could donate an unrelated process's children to the
terminal session's cleanup signalling: post-exit rescans queried
processTree/processSession by numeric pid alone. The handle now captures
the spawned shell's start identity at construction and adopts newly
scanned members only while the root pid still carries it; already-adopted
members keep their own identities, which every signal already rechecks.
Regressions cover a recycled root donating an imposter child and a shell
whose identity was never observable; the terminal fakes now model the
root row the real /proc and ps scans include.

Also from the review round: tool-pty's dependency list is re-sorted, and
the LSP renderer documents the deliberate drive-letter reading of
ambiguous file: URIs (display-only blast radius).
2026-08-08 22:17:54 +08:00
Tianyi Cui d47df8ff9d chore(rebase): refresh generated docs after the round-two replay
Restores master's vitest config and packages-README pairing record (the
replay had carried old-lineage copies; this branch claims neither), and
regenerates the doc graphs, catalogs, and architecture pairing the
replay's ours-side resolutions had flattened to master's content.
2026-08-08 21:28:00 +08:00
Tianyi Cui fbceb8dcd5 fix(pty-local): restore the session-resolved workspace policy
The linear replay resurrected the July spawn path: mode folded inline
and both confinement and the default cwd fenced to the deployment
workspaceRoot. Master (and the pre-rebase merge result) resolve the
policy once per spawn — resolve({ session }) — so session.header.cwd
is both the workspace-write boundary and the default shell cwd, as the
README already states. Restores the single resolve, threads the policy
through spawnArgv and the cwd fallback, re-expresses master's
session-root test on the terminal spec, and pins the recorded confine
policy in the explicit-cwd test.

Also from the same review round: the Python SDK exe build stages
pty.node from subprocess-local (node-pty's home since the relocation),
and fs-local's README counts the seam's eleven primitives.
2026-08-08 21:28:00 +08:00
Tianyi Cui d070129622 fix(constraints): follow the spawn-helper relocation to subprocess-local
The workspace-constraints allowlist pinned scripts/ensure-spawn-helper.mjs
to dsh-pty-local; this branch relocates the helper (with node-pty
ownership) into dsh-subprocess-local, so the published-files expectation
moves with it.
2026-08-08 21:27:59 +08:00
Tianyi Cui 18ab9f6db2 fix(rebase): migrate the replayed stack onto current master APIs
The linear replay carried each commit's own lineage, so this checkpoint
restores the master-owned surfaces the conflicted regions clobbered and
migrates branch-owned code to master's post-rebase APIs:

- rebuild subprocess-local spawn.ts on master's tree-exit-observer
  machinery, keeping the branch's win32 childEnv key semantics and the
  Linux zombie-quiescence probe; the zombie test reaps its survivor
  directly since a confirmed-absent verdict is a permanent
  no-more-signals boundary
- migrate pty-local test stubs to the Inbox-model Agent interface,
  Session.create, runnerFailureRules, and the new turn/start payload
- implement the seam's resolveExecutable/spawnTerminal abstracts in the
  new pwsh-local and tool-fs-search test fakes
- restore code-runtime, atomic-write, pwsh-local, and app-boot to
  master's exact content (the net-zero code-runtime churn is pruned
  from this history) and drop rename-detection graft debris
- re-apply the PR's architecture rows and execution-world paragraph,
  re-record bilingual pairings, regenerate catalogs, and reconcile the
  lockfile
2026-08-08 21:27:59 +08:00
Tianyi Cui e385c11e8e fix(pty,subprocess,lsp): address review round on cancellation, lookup, and contracts
- pty-local: a pre-write inspection rejection no longer releases a canceled
  send while its foreground SIGINT is in flight; the interrupt path retains
  the slot and its post-signal tail resumes polling. Regression pins the
  failure-shaped cancellation and a close-during-write release.
- pty-local: SEND_ACTIVE names which provider operation is draining; README
  states the never-settling-provider outcome (slot retained, close recovers).
- subprocess-local: resolveExecutable rejects relative paths containing
  separators instead of expanding them per PATH entry with a misleading
  not-found error; seam JSDoc pins the rule for every provider.
- subprocess-local: LocalTerminalHandle documents why the seam's
  in-flight-join promise holds without operation tracking.
- lsp-local: the oversized-source diagnostic reports the observed byte lower
  bound; README documents that processId: null trades away server-side
  orphan cleanup after a hard-killed harness.
- pty/subprocess seams: cross-reference the twin five-member signal unions.
- pty-local: TODO markers for send-state consolidation and initialize-race
  relocation.
2026-08-08 21:27:59 +08:00
Tianyi Cui a662af94df test(lsp): accept eager dead-slot eviction 2026-08-08 21:27:59 +08:00
Tianyi Cui d689907c12 test(subprocess): drop obsolete cwd stubs 2026-08-08 21:27:59 +08:00
Tianyi Cui 6e4bdbf0df fix(pty): wire persistent Bash through subprocess 2026-08-08 21:27:59 +08:00
Tianyi Cui 921f4ff7a3 fix(pty): retain sends through cancellation polling 2026-08-08 21:27:59 +08:00
Tianyi Cui e67a824604 docs(code-runtime): restore worker-only package summary 2026-08-08 21:27:59 +08:00
Tianyi Cui 4d5345794d refactor(code-runtime): remove subprocess backend 2026-08-08 21:27:59 +08:00
Tianyi Cui c1d08edd83 refactor(runtime): remove duplicate terminal ownership state 2026-08-08 21:27:59 +08:00
Tianyi Cui 87b2c5d93f docs(runtime): remove stale runtime storage claims 2026-08-08 21:27:59 +08:00
Tianyi Cui 22fc228b97 refactor(runtime): collapse unused setup layers 2026-08-08 21:27:59 +08:00
Tianyi Cui e8409cf928 fix(code-runtime): track generated runner source 2026-08-08 21:27:58 +08:00
Tianyi Cui 68ccf50a77 refactor(code-runtime): generate shared subprocess runner 2026-08-08 21:27:58 +08:00