/**
 * Agent gRPC Client
 *
 * gRPC client for agents to connect to the gRPC server
 * Replaces WebSocket client with gRPC bidirectional streaming
 */
import { EventEmitter } from 'events';
import type { Persona } from '../types/persona.js';
import type { GrpcMessage } from './agent-grpc.js';
export interface GrpcClientOptions {
    agentId: string;
    agentName?: string;
    persona?: Persona;
    serverAddress: string;
    reconnectDelay?: number;
    maxReconnectAttempts?: number;
    heartbeatInterval?: number;
}
export interface GrpcClientCallbacks {
    onMessage: (message: GrpcMessage) => void;
    onError: (error: Error) => void;
    onConnected: () => void;
    onDisconnected: () => void;
    onRegistered: (agentId: string) => void;
}
export declare class AgentGrpcClient extends EventEmitter {
    private options;
    private callbacks;
    private client;
    private call;
    private isConnected;
    private isRegistered;
    private reconnectAttempts;
    private reconnectTimer;
    private heartbeatInterval;
    constructor(options: GrpcClientOptions, callbacks: GrpcClientCallbacks);
    private connect;
    private handleConnectionEstablished;
    private handleConnectionError;
    private handleIncomingMessage;
    private handleStreamError;
    private handleStreamEnd;
    private handleDisconnection;
    private attemptReconnect;
    private startHeartbeat;
    private stopHeartbeat;
    private sendRegistration;
    private sendHeartbeat;
    sendMessage(message: GrpcMessage): boolean;
    sendChatMessage(toAgent: string, content: string, conversationId?: string, metadata?: Record<string, string>): boolean;
    sendToolCall(toAgent: string, toolName: string, params: any, conversationId?: string): boolean;
    sendToolResult(toAgent: string, callId: string, result: any, error?: string, conversationId?: string): boolean;
    disconnect(): void;
    isConnectedToServer(): boolean;
    isAgentRegistered(): boolean;
    getAgentId(): string;
    getAgentName(): string;
    getPersona(): Persona | undefined;
}
//# sourceMappingURL=agent-grpc-client.d.ts.map