/** One fixed tool advertised over MCP tools/list. */ export interface McpToolDefinition { name: string; description: string; inputSchema: Record; } /** MCP result content; image bytes are preserved. */ export type McpContent = { type: "text"; text: string; } | { type: "image"; data: string; mimeType: string; }; /** A completed or explicitly rejected MCP call. */ export interface McpToolOutput { content: McpContent[]; isError?: boolean; } /** Park a forwarded call until the host supplies its actual result or cancels it. */ export type McpCallHandler = (name: string, args: unknown, conversationId: string | undefined) => Promise; /** Fixed-tool TCP server scoped to one agy process; close also terminates connected sockets. */ export declare class McpBridge { #private; readonly port: number; /** Start listening immediately on an ephemeral IPv4 loopback port. */ constructor(tools: readonly McpToolDefinition[], onCall: McpCallHandler, onDisconnect?: () => void); /** Idempotently stop listening, release waiting replies and terminate all connections. */ close(): void; }