/**
 * Session checkpointing — persist enough wizard state to resume after a crash.
 *
 * Saves a sanitized snapshot (no credentials/tokens) to a temp file.
 * On restart the wizard can load it to skip already-completed setup steps
 * (intro, region, auth selections) while still re-running the agent.
 */
import type { WizardSession } from './wizard-session';
/**
 * Write a sanitized session snapshot to disk.
 * Strips credentials and any fields that should be re-evaluated on resume.
 *
 * `phase` is a free-form trigger label ("pre_compact",
 * "screen_run", "screen_data_setup", etc.) — emitted on the NDJSON
 * stream in agent mode so an orchestrator can distinguish "we hit a
 * checkpoint inside the integration loop" from "the agent just blew
 * through a phase boundary". Defaults to `"unknown"` for legacy
 * callers that haven't been updated yet.
 */
export declare function saveCheckpoint(session: WizardSession, phase?: string): void;
/**
 * Load a checkpoint if one exists, is fresh, and matches the given install dir.
 *
 * Returns a partial session (only the checkpointed fields) or null when:
 * - no checkpoint file exists
 * - the checkpoint is older than 24 hours
 * - the checkpoint belongs to a different project directory
 * - the file is malformed or fails validation
 */
export declare function loadCheckpoint(installDir: string): Promise<Partial<WizardSession> | null>;
/**
 * Delete the checkpoint file. Call on successful wizard completion.
 *
 * `reason` is a discriminator for the structured NDJSON event:
 *   - `success` — clean run, the wizard finished
 *   - `manual`  — user invoked a clear-state action (e.g. resetting
 *                 from the IntroScreen "start fresh" button)
 *   - `logout`  — the auth flow was reset; checkpoint is no longer
 *                 attributable to the current account
 *
 * Defaults to `success` to keep legacy callers working.
 */
export declare function clearCheckpoint(installDir: string, reason?: 'success' | 'manual' | 'logout'): void;
