/** * Daemon Client * * WebSocket client that connects to the GitNexus daemon. * Used by `serve` command to route tool calls through the daemon to the browser. * Also receives codebase context for MCP resource exposure. */ export interface BridgeMessage { id: string; method?: string; params?: any; result?: any; error?: { message: string; }; type?: string; context?: CodebaseContext; agentName?: string; } /** * Codebase context from browser */ export interface CodebaseContext { projectName: string; stats: { fileCount: number; functionCount: number; classCount: number; interfaceCount: number; methodCount: number; }; hotspots: Array<{ name: string; type: string; filePath: string; connections: number; }>; folderTree: string; } export declare class DaemonClient { private port; private ws; private pendingRequests; private requestId; private _context; private contextListeners; private agentName; constructor(port?: number, agentName?: string); private detectAgent; /** * Connect to the daemon */ connect(): Promise; private handleMessage; /** * Get current codebase context */ get context(): CodebaseContext | null; /** * Listen for context changes */ onContextChange(listener: (context: CodebaseContext | null) => void): () => boolean; private notifyContextListeners; /** * Check if connected to daemon */ get isConnected(): boolean; /** * Call a tool (routed through daemon to browser) */ callTool(method: string, params: any): Promise; /** * Disconnect from daemon */ disconnect(): void; } //# sourceMappingURL=daemon-client.d.ts.map