/**
 * classifyProfileChange — the §7 respawn classifier & swap-quality matrix
 * (TOPIC-PROFILE-SPEC). Pure in-memory comparison, NO I/O.
 *
 * Picks the gentlest swap method for a profile change and states the honest
 * expected context loss — including the contingencies (FABLE canary, Claude
 * resume-UUID capture, Codex rollout-id capture, unverified thinking-toggle
 * resume, unverified cross-model resume). The none-loss rows require HOOK
 * provenance / fence-validated capture; anything weaker classifies to the
 * disclosed-loss row — a wrong-conversation resume is worse than disclosed
 * loss (§8).
 *
 * Classification chooses the METHOD only. Idle is a precondition RE-CHECKED
 * at kill time inside the per-topic lock (§8 TOCTOU rule) — an unconfirmed
 * idle read here fails toward kill+--resume (the safe, lossless direction,
 * never an in-flight injection); at kill time unconfirmed is treated as busy.
 */
import type { TopicProfile } from './TopicProfileStore.js';
export type SwapMethod = 'in-flight' | 'resume' | 'continuation' | 'none';
export type ExpectedLoss = 'none' | 'recent-only';
export type IdleReading = 'confirmed-idle' | 'busy' | 'unconfirmed';
export interface ProfileSessionState {
    /** False for a dormant topic (no live session) — change applies at next spawn. */
    exists: boolean;
    /** FABLE capture-pane idle confirmation (three-valued, §8). */
    idle: IdleReading;
    /** Pane-idle is not task-done: an active autonomous/time-boxed run is busy (§8). */
    autonomousActive: boolean;
    /** Protected sessions are never profile-killed (§8). */
    isProtected: boolean;
    /**
     * §8 pre-kill predicate: the live session has a hook-reported
     * claudeSessionId (or an existing HOOK-provenance resume entry) — not
     * merely "an entry exists" (mtime-fallback entries classify as
     * CONTINUATION-class loss).
     */
    claudeResumeReady: boolean;
    /** A fence-validated codex rollout-id is captured for this topic (§7). */
    codexRolloutCaptured: boolean;
    /**
     * §14 runtime canary: a durable recent-confirmation marker (TTL) shows the
     * FABLE in-flight swap actually confirming. No recent confirmation ⇒ the
     * in-flight row is unavailable.
     */
    inFlightSwapConfirmedRecently: boolean;
    /** §6 — thinking off↔on toggle verified benign across --resume on the live CLI. */
    thinkingOffOnResumeVerified: boolean;
    /** §6 — thinking budget LEVEL change verified across --resume (round-4: same contingent cell). */
    thinkingLevelResumeVerified: boolean;
    /** §6 — MODEL change across --resume verified (round-4: wedge-class risk). */
    crossModelResumeVerified: boolean;
    /** §6 contingency — a launch-time thinking control exists for claude-code at all. */
    claudeThinkingControlAvailable: boolean;
}
export interface ProfileChangeClassification {
    requiresRespawn: boolean;
    swapMethod: SwapMethod;
    expectedLoss: ExpectedLoss;
    reason: string;
    /**
     * True when the method is kill-bearing and the session is not
     * confirmed-idle (busy/unconfirmed/autonomous) — §8 defers until idle.
     */
    deferUntilIdle: boolean;
    /**
     * §7 busy framework switch: refuse-or-confirm, never a silent mid-work
     * kill. (deferUntilIdle is also true; this adds the explicit-confirm arm.)
     */
    refuseOrConfirm: boolean;
    /** Protected sessions defer regardless of idle; 'switch now' never overrides (§8). */
    protectedDeferral: boolean;
    /**
     * True when the respawn is a FRESH spawn (framework switch / unverified
     * resume path) — the §8 kill path must PARK both resume stores' entries
     * before the kill and suppress the save-on-kill listeners.
     */
    freshRespawn: boolean;
    /** Which profile axes changed (for disclosure text). */
    changedFields: string[];
}
/** Classify a profile change against the live-session state. Pure, no I/O. */
export declare function classifyProfileChange(oldProfile: TopicProfile | null, newProfile: TopicProfile | null, session: ProfileSessionState): ProfileChangeClassification;
//# sourceMappingURL=classifyProfileChange.d.ts.map