/**
 * Consultation Protocol for Story 86-2
 *
 * Active request/response mechanism for tandem agent consultation.
 * Unlike passive backseat observation (95-2), consultation is leader-initiated:
 * the primary agent spawns a partner agent with a focused question and receives
 * a structured recommendation.
 */
/**
 * Consultation request from leader to partner.
 */
export interface ConsultationRequest {
    /** Leader agent name (e.g., 'dev') */
    leader: string;
    /** Leader character name from persona (e.g., 'Jack Torrance') */
    leaderCharacter: string;
    /** Partner agent name (e.g., 'architect') */
    partner: string;
    /** Brief background context for the question */
    context: string;
    /** The specific decision point / question */
    question: string;
    /** Alternatives the leader has already considered */
    alternativesConsidered: string[];
    /** Relevant code snippets or file references */
    relevantCode: string;
    /** Token budget from workflow tandem config */
    tokenBudget: number;
}
/**
 * Parsed consultation response from partner.
 */
export interface ConsultationResponse {
    /** Partner's recommended approach */
    recommendation: string;
    /** Reasoning behind the recommendation */
    rationale: string;
    /** Pitfalls or edge cases to watch for */
    watchOutFor: string;
    /** Partner's confidence level */
    confidence: 'high' | 'medium' | 'low';
    /** Actual token count of the response (self-reported) */
    tokenCount: number;
}
/**
 * Validation result for request/response completeness.
 */
export interface ValidationResult {
    valid: boolean;
    errors: string[];
}
/**
 * Parameters for building the partner spawn prompt.
 */
export interface PartnerPromptParams {
    /** Agent definition markdown content */
    agentDefinition: string;
    /** Persona block for the partner */
    personaBlock: string;
    /** Formatted consultation request */
    formattedRequest: string;
    /** Token budget instruction */
    tokenBudget: number;
}
/**
 * Parameters for executing a full consultation.
 */
export interface ExecuteConsultationParams {
    /** Consultation request */
    request: ConsultationRequest;
    /** Agent definition content for the partner */
    agentDefinition: string;
    /** Persona block for the partner */
    personaBlock: string;
    /** Adapter for spawning the partner */
    adapter: ConsultationAdapter;
}
/**
 * Adapter for spawning consultation partner (like ProcessAdapter for backseat).
 * Callers inject the real Task tool implementation; tests use mocks.
 */
export interface ConsultationAdapter {
    /** Spawn partner and return their response text */
    spawn(params: {
        prompt: string;
        model: string;
    }): Promise<{
        responseText: string;
    }>;
}
/**
 * Result of a consultation execution.
 */
export interface ConsultationResult {
    success: boolean;
    data?: {
        response: ConsultationResponse;
        overBudget: boolean;
    };
    error?: string;
    /** True if consultation failed and leader should continue solo */
    degraded?: boolean;
}
/**
 * Format a consultation request as structured markdown.
 */
export declare function formatConsultationRequest(request: ConsultationRequest): string;
/**
 * Parse a consultation response from partner's markdown output.
 * Returns null if the response cannot be parsed.
 */
export declare function parseConsultationResponse(markdown: string): ConsultationResponse | null;
/**
 * Validate a consultation request has all required fields.
 */
export declare function validateConsultationRequest(request: ConsultationRequest): ValidationResult;
/**
 * Validate a consultation response has all required fields.
 */
export declare function validateConsultationResponse(response: ConsultationResponse): ValidationResult;
/**
 * Build the full prompt for spawning the consultation partner.
 * Includes: agent definition, persona, formatted request, token budget instruction.
 */
export declare function buildPartnerPrompt(params: PartnerPromptParams): string;
/**
 * Build spawn parameters for the consultation partner.
 * Returns model: 'sonnet' per ADR-0012 (advisors use Sonnet, not Haiku).
 */
export declare function buildConsultationSpawnParams(request: ConsultationRequest): {
    model: string;
    partner: string;
};
/**
 * Execute a full consultation: format request → build prompt → spawn partner → parse response.
 * On failure, returns degraded result so leader can continue solo.
 */
export declare function executeConsultation(params: ExecuteConsultationParams): Promise<ConsultationResult>;
//# sourceMappingURL=consultation-protocol.d.ts.map