import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js"; export interface DesktopMcpConnectionOptions { command: string; args?: string[]; cwd?: string; env?: Record; initTimeoutMs?: number; maxStderrLines?: number; onUnexpectedClose?: (code: number | null) => void; } export interface DesktopMcpToolInfo { name: string; description?: string; inputSchema: Record; } export declare class DesktopMcpConnection { private client; private transport; private stderrLines; private readonly options; private closed; private closing; constructor(options: DesktopMcpConnectionOptions); isConnected(): boolean; getRecentStderr(lines?: number): string[]; start(): Promise; callTool(name: string, args: Record, timeoutMs: number): Promise; close(): Promise; } export declare function callToolResultToText(result: CallToolResult): string;