/**
 * Agent gRPC Server
 *
 * gRPC server for real-time agent-to-agent communication
 * Replaces the WebSocket server with gRPC bidirectional streaming
 */
import { EventEmitter } from 'events';
import type { Persona } from '../types/persona.js';
export interface GrpcMessage {
    conversationId: string;
    messageId: string;
    fromAgent: string;
    toAgent: string;
    fromMaster: string;
    toMaster: string;
    type: string;
    seq: number;
    content: string;
    final: boolean;
    timestamp: number;
    receivedAt: number;
    metadata: Record<string, string>;
}
export interface AgentConnection {
    call: any;
    agentId: string;
    agentName: string;
    persona?: Persona;
    lastSeen: number;
    stream: any;
}
export declare class AgentGrpcServer extends EventEmitter {
    private server;
    private connections;
    private messageCallbacks;
    private port;
    constructor(port: number);
    private setupServices;
    private createServiceDefinition;
    private serializeMessage;
    private deserializeMessage;
    private handleAgentConnect;
    private handleHealthCheck;
    private handleIncomingMessage;
    private handleDisconnection;
    private routeMessage;
    private broadcastMessage;
    start(): Promise<void>;
    stop(): Promise<void>;
    sendMessageToAgent(agentId: string, message: GrpcMessage): boolean;
    broadcastToAll(message: GrpcMessage): void;
    getConnectedAgents(): Array<{
        agentId: string;
        agentName: string;
        persona?: Persona;
    }>;
    getConnectionCount(): number;
    createChatMessage(fromAgent: string, toAgent: string, content: string, conversationId?: string, metadata?: Record<string, string>): GrpcMessage;
    createToolCallMessage(fromAgent: string, toAgent: string, toolName: string, params: any, conversationId?: string): GrpcMessage;
    createToolResultMessage(fromAgent: string, toAgent: string, callId: string, result: any, error?: string, conversationId?: string): GrpcMessage;
}
//# sourceMappingURL=agent-grpc.d.ts.map