Commit Graph

10155 Commits

Author SHA1 Message Date
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
Tianyi Cui
dde55d5afe docs(agent-notes): consolidate subprocess decisions 2026-08-08 21:27:58 +08:00
Tianyi Cui
ff86795b15 fix(pty): close provider cancellation races 2026-08-08 21:27:58 +08:00
Tianyi Cui
b71dbbe766 fix(runtime): close review lifecycle and bound gaps 2026-08-08 21:27:58 +08:00
Tianyi Cui
674d23118b fix(runtime): close measured portability defects 2026-08-08 21:27:58 +08:00
Tianyi Cui
124fc6a611 fix(runtime): close portable backend boundary gaps 2026-08-08 21:27:58 +08:00
Tianyi Cui
c1d550de58 refactor(runtime): collapse speculative portability layers
Remove the one-consumer bounded-read primitive and shared terminal lifecycle controller, make terminal cleanup one awaited provider operation, and reuse one Code Runtime contract suite. Keep only reproduced cancellation and policy fixes; defer unproven replacement, prompt-attribution, and streaming-frame concerns to scoped markers.
2026-08-08 21:27:58 +08:00
Tianyi Cui
4fecc54998 fix(runtime): close teardown gaps and simplify framing 2026-08-08 21:27:58 +08:00
Tianyi Cui
045e8462ee fix(pty): drain public signals during close 2026-08-08 21:27:58 +08:00
Tianyi Cui
727546ce6d fix(code-runtime): bound every subprocess frame hop 2026-08-08 21:27:58 +08:00
Tianyi Cui
7eedfda961 fix(pty): fence delayed signal prompts 2026-08-08 21:27:57 +08:00
Tianyi Cui
277870dac2 Revert "fix(pty): fence delayed signal prompts"
This reverts commit a78958eeeaf04a3acdf22ef8a26dec370661a51d.
2026-08-08 21:27:57 +08:00
Tianyi Cui
d6b3de6e0d fix(pty): fence delayed signal prompts 2026-08-08 21:27:57 +08:00
Tianyi Cui
be3533fa19 fix(subprocess): clean runtime state after teardown failure 2026-08-08 21:27:57 +08:00
Tianyi Cui
0fec058a48 fix(pty): retain send ownership through cancellation 2026-08-08 21:27:57 +08:00
Tianyi Cui
4d63552d00 fix(lsp): preserve workspace cancellation reason 2026-08-08 21:27:57 +08:00
Tianyi Cui
098f826001 fix(subprocess): honor teardown and PATH semantics 2026-08-08 21:27:57 +08:00
Tianyi Cui
f61a4943bd fix(lsp): preserve POSIX backslash paths 2026-08-08 21:27:57 +08:00
Tianyi Cui
71e0eeac40 fix(code-runtime): contain hostile boundary failures 2026-08-08 21:27:57 +08:00
Tianyi Cui
f84f63ccd7 test(runtime): finish zombie quiescence migration 2026-08-08 21:27:57 +08:00
Tianyi Cui
562cd154a8 docs(lsp): remove resolved URI limitation 2026-08-08 21:27:57 +08:00
Tianyi Cui
ea047cc634 test(subprocess): accept zombie quiescence 2026-08-08 21:27:57 +08:00
Tianyi Cui
06a9224904 fix(subprocess): retain failed terminal cleanup 2026-08-08 21:27:57 +08:00
Tianyi Cui
a95e01d8b0 fix(pty): detach cancellation before close drain 2026-08-08 21:27:57 +08:00
Tianyi Cui
6e5d711099 fix(lsp): cancel executable setup on disposal 2026-08-08 21:27:57 +08:00
Tianyi Cui
4d96ff40af docs(lsp): align canonical output field 2026-08-08 21:27:57 +08:00
Tianyi Cui
f2a3cc450e fix(lsp): retain drive syntax in UNC worlds 2026-08-08 21:27:57 +08:00
Tianyi Cui
3572c65d57 fix(pty): join asynchronous terminal operations 2026-08-08 21:27:57 +08:00
Tianyi Cui
d29c73ddd6 fix(subprocess): treat zombie-only groups as quiescent 2026-08-08 21:27:56 +08:00
Tianyi Cui
ea75333c92 fix(lsp): compare UNC paths case-insensitively 2026-08-08 21:27:56 +08:00