import type { Client } from "@modelcontextprotocol/client"; export interface DesktopClientProvider { getClient(): Promise; invalidate(client: Client, error: unknown): void; } export interface DesktopClientConnection { client: Client; close(): Promise; } export interface RecoverableDesktopClientOptions { connect(signal: AbortSignal): Promise; lifecycleSignal: AbortSignal; attemptTimeoutMs?: number; connectionBudgetMs?: number; maxAttempts?: number; retryDelayMs?: number; maxRetryDelayMs?: number; now?: () => number; } export declare class DesktopGatewayAttemptTimeoutError extends Error { readonly code = "connection_timeout"; constructor(timeoutMs: number); } /** * Maintains one recoverable desktop-to-gateway connection. It never replays a * failed domain operation: an uncertain call invalidates the transport and the * following user call reconnects through the single-flight path. */ export declare class RecoverableDesktopClientProvider implements DesktopClientProvider { private readonly options; private readonly attemptTimeoutMs; private readonly connectionBudgetMs; private readonly maxAttempts; private readonly retryDelayMs; private readonly maxRetryDelayMs; private readonly now; private current?; private connecting?; private cleanup; private retryNotBeforeMs; private closed; constructor(options: RecoverableDesktopClientOptions); private connectOnce; private connectWithRetry; getClient(): Promise; preconnect(): Promise; invalidate(client: Client, _error: unknown): void; close(): Promise; } //# sourceMappingURL=connection-manager.d.ts.map