import { AgentRegistry } from "./AgentRegistry";
import { MessageBus } from "./MessageBus";
import { AgentSpawner, SpawnPlan } from "./AgentSpawner";
/**
 * Orchestration result
 */
export interface OrchestrationResult {
    success: boolean;
    completedSteps: number;
    totalSteps: number;
    failedStep?: string;
    error?: string;
    durationMs: number;
    results: Map<string, unknown>;
}
/**
 * Execution event
 */
export interface ExecutionEvent {
    type: "step-started" | "step-completed" | "step-failed" | "orchestration-completed" | "orchestration-failed";
    timestamp: string;
    stepId?: string;
    agentType?: string;
    instanceId?: string;
    error?: string;
    result?: unknown;
}
/**
 * Orchestrator configuration
 */
export interface OrchestratorConfig {
    enableLogging?: boolean;
    stopOnError?: boolean;
    maxRetries?: number;
    retryDelayMs?: number;
}
/**
 * AgentOrchestrator
 *
 * Minimal version focused on:
 * - Sequential execution (no parallel DAG yet)
 * - Simple lifecycle management
 * - Progress tracking
 * - Error handling with retries
 */
export declare class AgentOrchestrator {
    private registry;
    private messageBus;
    private spawner;
    private config;
    private executionHistory;
    private currentPlan?;
    private isRunning;
    constructor(registry: AgentRegistry, messageBus: MessageBus, spawner: AgentSpawner, config?: OrchestratorConfig);
    /**
     * Execute a task end-to-end
     */
    execute(taskDescription: string, context?: Record<string, unknown>): Promise<OrchestrationResult>;
    /**
     * Execute plan sequentially
     */
    private executePlan;
    /**
     * Execute a single step with retry logic
     */
    private executeStepWithRetry;
    /**
     * Execute a single step
     */
    private executeStep;
    /**
     * Run agent (placeholder - will be implemented with actual agent execution)
     */
    private runAgent;
    /**
     * Build context for agent from global context and previous results
     */
    private buildAgentContext;
    /**
     * Estimate context size in KB
     */
    private estimateContextSize;
    /**
     * Check if error is retryable
     */
    private isRetryableError;
    /**
     * Delay helper
     */
    private delay;
    /**
     * Record execution event
     */
    private recordEvent;
    /**
     * Log message
     */
    private log;
    /**
     * Get execution history
     */
    getExecutionHistory(): ExecutionEvent[];
    /**
     * Get current plan
     */
    getCurrentPlan(): SpawnPlan | undefined;
    /**
     * Check if orchestrator is running
     */
    isExecuting(): boolean;
    /**
     * Get statistics
     */
    getStats(): {
        totalExecutions: number;
        successfulExecutions: number;
        failedExecutions: number;
        averageStepsPerExecution: number;
    };
}
//# sourceMappingURL=AgentOrchestrator.d.ts.map