EU Parliament Monitor — API Documentation - v0.9.24
    Preparing search index...

    Interface SpawnContext

    Adapter passed by MCPConnection to stdio spawn helpers. Lets the helpers read the few connection-level fields they need and mutate process state without pulling in the whole connection class.

    interface SpawnContext {
        serverPath: string;
        serverLabel: string;
        requestTimeoutMs: number;
        setProcess: (p: ChildProcess | null) => void;
        setConnected: (v: boolean) => void;
        onMessage: (line: string) => void;
        rejectAllPending: (message: string) => void;
    }
    Index

    Properties

    serverPath: string

    Resolved path to the server binary or JS entry-point

    serverLabel: string

    Human-readable label for log messages

    requestTimeoutMs: number

    Per-request timeout (milliseconds)

    setProcess: (p: ChildProcess | null) => void

    Store or clear the spawned child process

    setConnected: (v: boolean) => void

    Mark the connection as (dis)connected

    onMessage: (line: string) => void

    Route an incoming newline-delimited JSON-RPC message line

    rejectAllPending: (message: string) => void

    Reject and clear all in-flight pending requests with an error