/**
 * State Manager for Execution State Capture and Restoration
 */
import type { CacheProvider } from '@mondaydotcomorg/atp-protocol';
import { log } from '@mondaydotcomorg/atp-runtime';
export declare class StateManager {
    private executionId;
    private clientId;
    private cache;
    private logger;
    private state;
    private resumeMode;
    private serializer;
    private captureInterval;
    private statementCounter;
    constructor(executionId: string, clientId: string, cache: CacheProvider | undefined, logger: ReturnType<typeof log.child>, options?: {
        captureInterval?: number;
    });
    /**
     * Capture state at a statement boundary
     * In resume mode, skip already-executed statements
     */
    capture(statementId: number, getVars: () => Record<string, unknown>): Promise<void>;
    /**
     * Wrap external calls with caching
     */
    call<T>(statementId: number, fn: () => T | Promise<T>): Promise<T>;
    /**
     * Check if a call result is cached (for use from isolate)
     */
    getCached(statementId: number): unknown | null;
    /**
     * Store a call result (for use from isolate)
     */
    storeResult(statementId: number, result: unknown): Promise<void>;
    /**
     * Track control flow branches
     */
    branch(statementId: number, condition: boolean): boolean;
    /**
     * Persist state to cache
     */
    /**
     * Persist current execution state to cache
     */
    persist(): Promise<void>;
    /**
     * Load state for resume
     */
    loadForResume(executionId: string): Promise<boolean>;
    /**
     * Cleanup state from cache
     */
    cleanup(): Promise<void>;
    /**
     * Get execution progress
     */
    getProgress(): number;
    /**
     * Get statistics
     */
    getStats(): {
        statementsExecuted: number;
        statementsCached: number;
    };
    private findStatement;
    private getCacheKey;
}
//# sourceMappingURL=state-manager.d.ts.map