/**
 * clientDetection.ts
 *
 * Utility for detecting client disconnection using MCP protocol's ping mechanism.
 * This helps bridge detect when the client process has closed even when the stdio
 * transport doesn't notify about disconnection.
 */
import type { Server } from '@modelcontextprotocol/sdk/server/index.js';
/**
 * Options for client disconnection detection
 */
export interface ClientDetectionOptions {
    /** Maximum consecutive ping failures before considering client disconnected */
    maxPingFailures?: number;
    /** Interval between pings in milliseconds */
    pingIntervalMs?: number;
    /** Timeout for each ping in milliseconds */
    pingTimeoutMs?: number;
    /** Callback to invoke when client disconnection is detected */
    onDisconnection?: () => void;
}
/**
 * Monitors client connection by using MCP ping mechanism
 */
export declare class ClientConnectionMonitor {
    private server;
    private pingInterval;
    private pingFailCount;
    private isRunning;
    private options;
    /**
     * Creates a new monitor for detecting client disconnection
     */
    constructor(server: Server, options?: ClientDetectionOptions);
    /**
     * Start monitoring for client disconnection
     */
    start(): void;
    /**
     * Stop monitoring for client disconnection
     */
    stop(): void;
}
//# sourceMappingURL=clientDetection.d.ts.map