description: "Managed SSH subprocess and terminal behavior for Bash, LSP and Node runtime consumers."
English | 中文
dsh-subprocess-ssh implements ctx.subprocess using the shared SSH helper. Executable lookup, ordinary processes, fd 7 control traffic and terminal sessions run beside the SSH filesystem. Remote native process owners govern termination and quiescence; consumers continue to own command semantics, output limits and execution deadlines.
Mount this provider with dsh-ssh and its filesystem provider. It has no deployment configuration of its own. resolveExecutable() checks the remote executable namespace; fully specified spawn requests supply the remote cwd, environment, stream dispositions and cleanup grace.
Ordinary spawn returns a handle while remote allocation proceeds. Piped stdin and the optional duplex control endpoint accept writes during allocation. Terminal allocation, writes, foreground inspection, signals and termination retain their asynchronous interfaces.
Terminal requests forward shellActivity to the execution provider, and inspectActivity() returns its validated state and revision. Opted-in terminals remain addressable after root exit until their owner explicitly terminates them; the SSH helper lease still governs connection-level cleanup.
A direct exit reported by done does not prove managed-range quiescence; waitForExit() observes that separately. Its optional signal bounds the entire observation, including pending allocation and termination, and cancellation returns false without stopping the process. An already confirmed empty range returns true; genuine observation failures reject. terminate() targets the same remote owner. Connection loss rejects unconfirmed work, and automatic replay never follows an ambiguous launch or mutation.
Terminal shell facts and executable verification come from the remote helper. Lookup misses remain distinct from SSH failures. PTY creation forwards the caller's terminalType, and resize() updates the remote terminal without replacing its process.
Indirectly, through Bash, terminal, LSP and ptc-runtime consumers, which present their existing results and remote paths.
This provider contributes no request-prefix content. Its consumers own model-visible tools and results.