Cotal TypeScript packages
    Preparing search index...

    One managed session: its launch env (read only from here) and its MCP stream pair.

    interface ClaudeSessionOptions {
        claudePid?: number;
        env: ProcessEnv;
        fatalBind?: boolean;
        input: Readable;
        onShutdown?: (code: number) => void;
        output: Writable;
    }
    Index
    claudePid?: number

    The Claude Code process this session's server runs under. Set, the session serves that process's command socket for its command mod. A host serving several sessions leaves it unset.

    env: ProcessEnv
    fatalBind?: boolean

    Exit the process when the control socket cannot be bound. A host serving several sessions leaves it off, and the call rejects instead.

    input: Readable
    onShutdown?: (code: number) => void

    A shutdown frame or the end or closure of input ended the session. Called once after teardown; code is 1 if teardown failed, or the requested exit code otherwise.

    output: Writable