import type { StdioServerParameters } from '@modelcontextprotocol/sdk/client/stdio.js';
import type { Writable } from 'node:stream';
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
import { ConnectionManager } from './base.js';
export declare class StdioConnectionManager extends ConnectionManager<StdioClientTransport> {
    private readonly serverParams;
    private readonly errlog;
    private _transport;
    /**
     * Create a new stdio connection manager.
     *
     * @param serverParams Parameters for the stdio server process.
     * @param errlog       Stream to which the server's stderr should be piped.
     *                     Defaults to `process.stderr`.
     */
    constructor(serverParams: StdioServerParameters, errlog?: Writable);
    /**
     * Establish the stdio connection by spawning the server process and starting
     * the SDK's transport. Returns the live `StdioClientTransport` instance.
     */
    protected establishConnection(): Promise<StdioClientTransport>;
    /**
     * Close the stdio connection, making sure the transport cleans up the child
     * process and associated resources.
     */
    protected closeConnection(_connection: StdioClientTransport): Promise<void>;
}
//# sourceMappingURL=stdio.d.ts.map