Skip to content

MuseServeChildOptions

Options for launching an SDK-owned host process: the binary to run, plus optional arguments, working directory, environment, a stderr tap, and the shutdown drain budget.

Property Type Stability Presence Description
args readonly string[] optional
cwd string optional
env ProcessEnv optional
museBin string required
onStderr (chunk: string) => void optional Raw evidence callback for consumers that also keep a full diagnostic log.
shutdownTimeoutMs number optional How long close() lets the host drain after stdin EOF before the SDK ends the process it owns. Defaults to the protocol’s 30 s host drain timeout; set it to match a host configured with a different one. 0 skips the drain window (SIGTERM at once) — it is NOT an instant kill: the fixed SIGTERM→SIGKILL grace still runs. Must be an integer in 0..2147483647; anything else throws RangeError at spawn.
spawnFn (command: string, options?: SpawnOptionsWithoutStdio) => ChildProcessWithoutNullStreams optional Deterministic-test seam; production always uses child_process.spawn. A stub here observes the exact options the call site passes, so a windowsHide override at the call site fails the pin.
Source

clients/sdk-ts/src/connection/spawn.ts:92

{
"kind": "Interface",
"canonicalPath": "MuseServeChildOptions"
}