/**
 * @fileoverview Simplified plan generation with 2 agents instead of 9.
 *
 * Previous architecture (removed):
 * - 4 parallel analysis agents (requirements, architecture, testing, risks)
 * - Synthesis phase
 * - Verification agent
 * - Execution optimizer agent (output was ignored anyway)
 * - Final review agent
 *
 * New architecture:
 * 1. Research Agent - gather context (optional, can fail)
 * 2. Planner Agent - single agent generates complete TDD plan
 *
 * @module plan-orchestrator
 */
import type { TerminalMultiplexer } from './mux-interface.js';
import { type PlanItem } from './types.js';
export type { PlanItem };
export interface ResearchResult {
    success: boolean;
    findings: {
        externalResources: Array<{
            type: 'github' | 'documentation' | 'tutorial' | 'article' | 'stackoverflow';
            url?: string;
            title: string;
            relevance: string;
            keyInsights: string[];
        }>;
        codebasePatterns: Array<{
            pattern: string;
            location: string;
            relevance: string;
        }>;
        technicalRecommendations: string[];
        potentialChallenges: string[];
        recommendedTools: Array<{
            name: string;
            purpose: string;
            reason: string;
        }>;
    };
    enrichedTaskDescription: string;
    error?: string;
    durationMs: number;
}
export interface DetailedPlanResult {
    success: boolean;
    items?: PlanItem[];
    costUsd?: number;
    metadata?: {
        researchResult?: ResearchResult;
        plannerGaps: string[];
        plannerWarnings: string[];
        totalDurationMs: number;
    };
    error?: string;
}
export type ProgressCallback = (phase: string, detail: string) => void;
interface PlanSubagentEvent {
    type: 'started' | 'progress' | 'completed' | 'failed';
    agentId: string;
    agentType: 'research' | 'planner';
    model: string;
    status: string;
    detail?: string;
    itemCount?: number;
    durationMs?: number;
    error?: string;
}
type SubagentCallback = (event: PlanSubagentEvent) => void;
export declare class PlanOrchestrator {
    private mux;
    private workingDir;
    private outputDir?;
    private runningSessions;
    private cancelled;
    private taskDescription;
    private researchModel;
    private plannerModel;
    constructor(mux: TerminalMultiplexer, workingDir?: string, outputDir?: string, modelConfig?: {
        defaultModel?: string;
        agentTypeOverrides?: Record<string, string>;
    });
    private saveAgentOutput;
    private saveFinalResult;
    private generateSummary;
    private _extractJsonFromResponse;
    private _emitAgentFailure;
    private _formatResearchSection;
    cancel(): Promise<void>;
    /**
     * Generate a detailed TDD plan.
     *
     * Flow:
     * 1. Research Agent (optional - failures don't block)
     * 2. Planner Agent (generates complete TDD plan)
     */
    generateDetailedPlan(taskDescription: string, onProgress?: ProgressCallback, onSubagent?: SubagentCallback): Promise<DetailedPlanResult>;
    private formatResearchContext;
    private runResearchAgent;
    private runPlannerAgent;
}
//# sourceMappingURL=plan-orchestrator.d.ts.map