import type { ServiceResponse, Task } from '../service/protocol.js'; /** * Client for communicating with the Phaibel service. */ export declare class ServiceClient { private socket; private responseBuffer; private responseHandlers; /** * Check if the service is running. */ isServiceRunning(): Promise; /** * Connect to the service. */ connect(): Promise; /** * Disconnect from the service. */ disconnect(): void; /** * Check if connected. */ isConnected(): boolean; /** * Submit a task to the service. */ submitTask(task: Task): Promise; /** * Get queue size. */ getQueueSize(): Promise; /** * Get full queue status. */ getQueueStatus(): Promise; /** * Get service memory usage (in MB). */ getMemoryUsage(): Promise<{ rss: number; heapUsed: number; heapTotal: number; external: number; }>; /** * Get entity index stats. */ getIndexStats(): Promise<{ nodeCount: number; edgeCount: number; byType: Record; builtAt: string; }>; /** * Get all edges in the entity graph. */ getIndexGraph(): Promise<{ source: string; target: string; edgeType: string; label?: string; }[]>; /** * Get neighbors of a given entity key. */ getIndexNeighbors(key: string): Promise<{ node: { id: string; type: string; title: string; }; direction: string; edgeType: string; label?: string; }[]>; /** * Rebuild the entity index. */ rebuildIndex(): Promise<{ nodeCount: number; edgeCount: number; byType: Record; builtAt: string; }>; /** * Get cron scheduler status. */ getCronStatus(): Promise; /** * Trigger a cron job immediately. */ runCronJob(job: string): Promise<{ job: string; summary: string; }>; /** * Get task status by ID. */ getTaskStatus(taskId: string): Promise; /** * Clear the queue. */ clearQueue(): Promise; /** * Pause the queue processor. */ pauseQueue(): Promise; /** * Resume the queue processor. */ resumeQueue(): Promise; /** * Wait for a task to complete. */ waitForTask(taskId: string, pollIntervalMs?: number, timeoutMs?: number): Promise; /** * Send a query request. */ private query; /** * Send a control request. */ private control; /** * Send a request and wait for response. */ private sendRequest; /** * Handle incoming data. */ private handleData; } export declare function getServiceClient(): ServiceClient; //# sourceMappingURL=index.d.ts.map