import type { TaskStep } from './TaskDecomposer.js';
export type MessageType = 'request' | 'response' | 'broadcast' | 'handoff';
export interface AgentMessage {
    id: string;
    from: string;
    to: string;
    type: MessageType;
    payload: unknown;
    correlationId: string;
    timestamp: string;
}
export type AgentRole = 'planner' | 'implementer' | 'reviewer' | 'tester' | 'sentinel';
export interface AgentAssignment {
    stepId: string;
    role: AgentRole;
    agentName: string;
    assignedAt: string;
}
export interface HandoffContext {
    files: string[];
    changes: string[];
    decisions: string[];
    metadata?: Record<string, unknown>;
}
export interface HandoffResult {
    id: string;
    from: string;
    to: string;
    context: HandoffContext;
    success: boolean;
    timestamp: string;
}
export declare class MessageSizeError extends Error {
    constructor(size: number);
}
export declare class AgentTimeoutError extends Error {
    constructor(agentName: string, stepId: string);
}
export declare class CollaborationProtocol {
    private readonly messageLog;
    private readonly handoffLog;
    private readonly retryCount;
    assignAgent(step: TaskStep): AgentAssignment;
    createMessage(from: string, to: string, type: MessageType, payload: unknown, correlationId?: string): AgentMessage;
    handoff(from: string, to: string, context: HandoffContext): HandoffResult;
    canRetry(stepId: string): boolean;
    recordRetry(stepId: string): void;
    getRetryCount(stepId: string): number;
    getMessageLog(): ReadonlyArray<AgentMessage>;
    getHandoffLog(): ReadonlyArray<HandoffResult>;
    getTimeoutMs(): number;
    getMaxMessageBytes(): number;
    private validateMessageSize;
    private trimContext;
}
//# sourceMappingURL=CollaborationProtocol.d.ts.map