/**
 * Schedule Persistence
 *
 * Persists job schedules to disk so they survive session restarts.
 * Uses atomic writes to prevent corruption.
 *
 * @module core/scheduler/schedule-persistence
 */
import { ScheduledJob } from './scheduled-job.js';
import { Logger } from '../../utils/logger.js';
/**
 * Schedule persistence options
 */
export interface SchedulePersistenceOptions {
    /**
     * Path to .specweave directory
     * @default process.cwd() + '/.specweave'
     */
    specweavePath?: string;
    /**
     * Logger instance
     */
    logger?: Logger;
}
/**
 * SchedulePersistence - Saves and loads job schedules from disk
 *
 * Features:
 * - Atomic writes using temp file + rename
 * - Schema versioning for migration
 * - Corruption recovery with defaults
 */
export declare class SchedulePersistence {
    private readonly filePath;
    private readonly logger;
    private readonly specweaveExists;
    constructor(options?: SchedulePersistenceOptions);
    /**
     * Load schedules from disk
     *
     * @returns Array of persisted jobs, empty array if file doesn't exist or is corrupted
     */
    loadSchedules(): Promise<ScheduledJob[]>;
    /**
     * Save schedules to disk
     *
     * Uses atomic write (write to temp file, then rename) to prevent corruption.
     *
     * @param jobs - Jobs to persist
     */
    saveSchedules(jobs: ScheduledJob[]): Promise<void>;
    /**
     * Update a single job in persistence
     *
     * @param jobId - Job ID to update
     * @param updates - Partial job updates
     */
    updateJob(jobId: string, updates: Partial<ScheduledJob>): Promise<void>;
    /**
     * Delete a job from persistence
     *
     * @param jobId - Job ID to delete
     */
    deleteJob(jobId: string): Promise<void>;
    /**
     * Check if persistence file exists
     *
     * @returns true if file exists
     */
    exists(): Promise<boolean>;
    /**
     * Get file path (for testing/debugging)
     */
    getFilePath(): string;
    /**
     * Migrate schedules from older schema versions
     */
    private migrateSchedules;
    /**
     * Backup corrupted file for debugging
     */
    private backupCorruptedFile;
}
//# sourceMappingURL=schedule-persistence.d.ts.map