/**
 * Product Checkpoint — automatic and manual checkpoint triggers.
 *
 * Rules:
 *  - Auto-checkpoint on task completion
 *  - 5 min fallback timer for active products
 *  - 30 min timer for long-running products (>48h)
 *  - Manual checkpoint via product.checkpoint RPC
 */
import type { PersistedProductState } from "./product-persistence.js";
export interface CheckpointCallbacks {
    /** Called after each checkpoint save. */
    onCheckpoint?: (productId: string, timestamp: string) => void;
    /** Return current state snapshot for periodic auto-saves. */
    getState?: () => PersistedProductState | null;
    log?: {
        info(msg: string): void;
        warn(msg: string): void;
    };
}
export declare class ProductCheckpointManager {
    private callbacks;
    /** Fallback interval (5 min default, 30 min for >48h long-running). */
    private static readonly DEFAULT_INTERVAL;
    private static readonly LONG_RUNNING_INTERVAL;
    private static readonly LONG_RUNNING_THRESHOLD;
    private timer;
    private lastCheckpointAt;
    private cwd?;
    constructor(callbacks?: CheckpointCallbacks);
    /** Start periodic checkpointing for a product. */
    start(cwd?: string): void;
    /** Stop periodic checkpointing. */
    stop(): void;
    /** Get the appropriate checkpoint interval based on elapsed time. */
    getInterval(elapsedMs: number): number;
    /** Check if a checkpoint is due based on elapsed time since last checkpoint. */
    isDue(elapsedMs: number): boolean;
    /**
     * Perform a checkpoint: save state to disk and notify.
     * Called on task completion or by periodic timer.
     */
    checkpoint(state: PersistedProductState): Promise<void>;
    /** Get the time of last checkpoint. */
    getLastCheckpointAt(): number;
}
