/**
 * gRPC Protocol for Clawx Agent Communication
 *
 * Replaces SSE/WebSocket with structured gRPC streaming
 */
export interface GrpcAgentFrame {
    id: string;
    type: GrpcFrameType;
    timestamp: number;
    fromAgentId: string;
    toAgentId: string;
    parentOperationId?: string;
    parentOperationType?: 'chat' | 'task';
    payload?: any;
    error?: string;
}
export type GrpcFrameType = 'register' | 'registered' | 'heartbeat' | 'agent_message_start' | 'agent_message_delta' | 'agent_message_end' | 'task_started' | 'task_progress' | 'tool_started' | 'tool_stdout' | 'tool_stderr' | 'tool_finished' | 'task_completed' | 'task_failed' | 'task_cancelled' | 'chat_message' | 'system' | 'error';
export interface RegisterPayload {
    agentId: string;
    agentName: string;
    persona?: any;
    capabilities: string[];
    endpoint: string;
}
export interface RegisteredPayload {
    agentId: string;
    status: 'registered' | 'rejected';
    message?: string;
    masterEndpoint?: string;
}
export interface AgentMessageStartPayload {
    turnId: string;
    persona?: {
        name: string;
        role: string;
    };
}
export interface AgentMessageDeltaPayload {
    turnId: string;
    delta: string;
}
export interface AgentMessageEndPayload {
    turnId: string;
    finalMessage: string;
}
export interface TaskStartedPayload {
    taskId: string;
    tool: string;
    params: any;
}
export interface TaskProgressPayload {
    taskId: string;
    progress: number;
    message?: string;
}
export interface ToolStartedPayload {
    taskId: string;
    toolName: string;
    params: any;
}
export interface ToolOutputPayload {
    taskId: string;
    data: string;
}
export interface ToolFinishedPayload {
    taskId: string;
    result: any;
}
export interface TaskCompletedPayload {
    taskId: string;
    result: any;
}
export interface TaskFailedPayload {
    taskId: string;
    error: string;
}
export interface TaskCancelledPayload {
    taskId: string;
    reason?: string;
}
export interface ChatMessagePayload {
    message: string;
    conversationId?: string;
    mode?: string;
    context?: any;
}
export interface SystemPayload {
    message: string;
    data?: any;
}
export declare const GrpcFrames: {
    createRegister(agentId: string, agentName: string, endpoint: string, persona?: any, capabilities?: string[]): GrpcAgentFrame;
    createRegistered(agentId: string, status: "registered" | "rejected", message?: string, masterEndpoint?: string): GrpcAgentFrame;
    createHeartbeat(agentId: string): GrpcAgentFrame;
    createAgentMessageStart(turnId: string, fromAgentId: string, toAgentId: string, persona?: {
        name: string;
        role: string;
    }): GrpcAgentFrame;
    createAgentMessageDelta(turnId: string, fromAgentId: string, toAgentId: string, delta: string): GrpcAgentFrame;
    createAgentMessageEnd(turnId: string, fromAgentId: string, toAgentId: string, finalMessage: string): GrpcAgentFrame;
    createTaskStarted(taskId: string, fromAgentId: string, toAgentId: string, tool: string, params: any): GrpcAgentFrame;
    createTaskProgress(taskId: string, fromAgentId: string, toAgentId: string, progress: number, message?: string): GrpcAgentFrame;
    createToolStarted(taskId: string, fromAgentId: string, toAgentId: string, toolName: string, params: any, parentOperationType?: "task" | "chat"): GrpcAgentFrame;
    createToolStdout(taskId: string, fromAgentId: string, toAgentId: string, data: string, parentOperationType?: "task" | "chat"): GrpcAgentFrame;
    createToolStderr(taskId: string, fromAgentId: string, toAgentId: string, data: string, parentOperationType?: "task" | "chat"): GrpcAgentFrame;
    createToolFinished(taskId: string, fromAgentId: string, toAgentId: string, result: any, parentOperationType?: "task" | "chat"): GrpcAgentFrame;
    createTaskCompleted(taskId: string, fromAgentId: string, toAgentId: string, result: any): GrpcAgentFrame;
    createTaskFailed(taskId: string, fromAgentId: string, toAgentId: string, error: string): GrpcAgentFrame;
    createTaskCancelled(taskId: string, fromAgentId: string, toAgentId: string, reason?: string): GrpcAgentFrame;
    createChatMessage(fromAgentId: string, toAgentId: string, message: string, conversationId?: string, extraPayload?: Record<string, any>): GrpcAgentFrame;
    createSystemMessage(toAgentId: string, message: string, data?: any): GrpcAgentFrame;
    createErrorMessage(toAgentId: string, error: string, fromAgentId?: string): GrpcAgentFrame;
};
//# sourceMappingURL=protocol.d.ts.map