/**
 * Autonomous Executor - Fully autonomous workflow execution
 *
 * Executes complete workflows without human intervention, with safety guardrails:
 * - Max iteration limits
 * - Infinite loop detection
 * - Cost threshold enforcement
 * - Checkpoint/recovery system
 *
 * Part of increment 0039: Ultra-Smart Next Command
 *
 * @module core/workflow/autonomous-executor
 * @since v0.22.0
 */
import { WorkflowPhase } from './types.js';
/**
 * Autonomous execution configuration
 */
export interface AutonomousConfig {
    /** Maximum iterations before stopping (default: 50) */
    maxIterations?: number;
    /** Cost threshold in USD (default: $20) */
    costThreshold?: number;
    /** Enable checkpoint saving (default: true) */
    enableCheckpoints?: boolean;
    /** Maximum retries per command (default: 3) */
    maxRetries?: number;
    /** Stop on first error (default: false) */
    stopOnError?: boolean;
    /** Verbose logging (default: false) */
    verbose?: boolean;
}
/**
 * Autonomous execution result
 */
export interface AutonomousResult {
    /** Execution succeeded */
    success: boolean;
    /** Increment ID */
    incrementId: string;
    /** Total iterations */
    iterations: number;
    /** Commands executed */
    commandsExecuted: string[];
    /** Total cost (USD) */
    totalCost: number;
    /** Final phase */
    finalPhase: WorkflowPhase;
    /** Completion reason */
    reason: string;
    /** Error message if failed */
    error?: string;
    /** Checkpoint ID (for resume) */
    checkpointId?: string;
}
/**
 * Autonomous Executor - Fully autonomous workflow execution with safety guardrails
 */
export declare class AutonomousExecutor {
    private config;
    private orchestrator;
    private stateManager;
    private costEstimator;
    private commandInvoker;
    constructor(config?: AutonomousConfig);
    /**
     * Execute workflow autonomously
     *
     * @param incrementId - Increment ID to execute
     * @param resumeCheckpointId - Optional checkpoint to resume from
     * @returns Autonomous execution result
     */
    execute(incrementId: string, resumeCheckpointId?: string): Promise<AutonomousResult>;
    /**
     * Execute single step in workflow
     */
    private executeStep;
    /**
     * Preflight check before execution
     */
    private preflightCheck;
    /**
     * Safety checks during execution
     */
    private checkSafety;
    /**
     * Check if workflow is complete
     */
    private isComplete;
    /**
     * Initialize execution state
     */
    private initializeState;
    /**
     * Resume from checkpoint
     */
    private resumeFromCheckpoint;
    /**
     * Save execution checkpoint
     */
    private saveCheckpoint;
    /**
     * Terminate execution and return result
     */
    private terminateExecution;
    /**
     * Log message (if verbose enabled)
     */
    private log;
}
//# sourceMappingURL=autonomous-executor.d.ts.map