import { type McpTransport } from "./transport.js"; import type { JsonRpcNotification, JsonRpcRequest, JsonRpcResponse, McpRequestOptions, McpStdioConfig } from "./types.js"; export interface StdioTransportOptions { readonly requestTimeoutMs?: number | undefined; readonly closeGraceMs?: number | undefined; readonly baseEnv?: Readonly> | undefined; } export declare class StdioTransport implements McpTransport { private readonly config; private readonly options; readonly kind: "stdio"; private child; private readonly decoder; private readonly pending; private nextId; private closed; private exited; private stderrTail; private processGroupId; private protocolVersion; private startPromise; constructor(config: McpStdioConfig, options?: StdioTransportOptions); sessionId(): string | undefined; setProtocolVersion(version: string): void; start(): Promise; private buildEnv; private spawnChild; private onStdout; private onStderr; private failAll; request(message: JsonRpcRequest, options?: McpRequestOptions): Promise; notify(message: JsonRpcNotification): Promise; close(): Promise; private waitForExit; private forceKill; private disposeChild; diagnostics(): string; } export declare function isTransportAbort(error: unknown): boolean;