import { HandrailsClient } from '../handrails/client'; export interface BridgeMessage { jsonrpc: '2.0'; id?: string; method?: string; params?: any; result?: any; error?: { code: number; message: string; data?: any; }; } export type ToolHandler = (params: any) => Promise; export declare class BridgeDaemon { private ws; private apiUrl; private apiKey; private machineName; private connectionId; private reconnectAttempts; private maxReconnectAttempts; private reconnectTimer; private heartbeatTimer; private isShuttingDown; private toolHandlers; private pendingResponses; private client; private activeEngines; constructor(apiUrl?: string, apiKey?: string); private registerBuiltinTools; registerTool(method: string, handler: ToolHandler): void; start(): Promise; private connect; private handleMessage; private send; private sendResponse; sendNotification(method: string, params?: any): void; /** * Send a request to the server and wait for a response. * Used for workflow decision nodes that need user input from the web UI. */ sendRequestAndWait(method: string, params?: any, timeoutMs?: number): Promise; getClient(): HandrailsClient; getConnectionId(): string | null; private startHeartbeat; private stopHeartbeat; private scheduleReconnect; private shutdown; }