/**
 * Loop Manager
 * CCW Loop System - Core orchestration engine
 * Reference: .workflow/.scratchpad/loop-system-complete-design-20260121.md section 4.2
 */
import type { LoopState, Task } from '../types/loop.js';
export declare class LoopManager {
    private stateManager;
    constructor(workflowDir: string);
    /**
     * Start new loop
     */
    startLoop(task: Task): Promise<string>;
    /**
     * Execute next step
     */
    runNextStep(loopId: string): Promise<void>;
    /**
     * Execute single step
     */
    private executeStep;
    /**
     * Update state after step execution
     */
    private updateStateAfterStep;
    /**
     * Replace template variables
     */
    private replaceVariables;
    /**
     * Evaluate success condition with security constraints
     * Only allows simple comparison and logical expressions
     */
    private evaluateSuccessCondition;
    /**
     * Check if should terminate loop
     */
    private shouldTerminate;
    /**
     * Handle errors
     */
    private handleError;
    /**
     * Pause loop
     */
    pauseLoop(loopId: string, reason?: string): Promise<void>;
    /**
     * Resume loop
     */
    resumeLoop(loopId: string): Promise<void>;
    /**
     * Stop loop
     */
    stopLoop(loopId: string): Promise<void>;
    /**
     * Broadcast state update via WebSocket
     */
    private broadcastStateUpdate;
    /**
     * Broadcast step completion via WebSocket
     */
    private broadcastStepCompletion;
    /**
     * Mark as completed
     */
    private markCompleted;
    /**
     * Mark as failed
     */
    private markFailed;
    /**
     * Get loop status
     */
    getStatus(loopId: string): Promise<LoopState>;
    /**
     * List all loops
     */
    listLoops(): Promise<LoopState[]>;
    /**
     * Generate loop ID
     */
    private generateLoopId;
}
//# sourceMappingURL=loop-manager.d.ts.map