import type { ModuleCommandResult } from "../../contracts/module-contract.js";
export declare const IMPROVEMENT_STATE_SCHEMA_VERSION: 4;
/** Max scout rotation rows retained (FIFO trim on save). */
export declare const SCOUT_ROTATION_HISTORY_MAX = 32;
export type ScoutRotationEntry = {
    primaryLens: string;
    adversarialLens?: string;
    targetZone: string;
    questionStem: string;
    runAt: string;
};
export type TranscriptRetryEntry = {
    relativePath: string;
    attempts: number;
    lastErrorCode: string;
    lastErrorMessage: string;
    nextRetryAt: string;
};
export type ImprovementStateDocument = {
    schemaVersion: typeof IMPROVEMENT_STATE_SCHEMA_VERSION;
    /** Monotonic kit_policy_traces.id cursor for policy-deny ingestion. */
    lastIngestedPolicyTraceId: number;
    mutationLineCursor: number;
    transitionLogLengthCursor: number;
    transcriptLineCursors: Record<string, number>;
    lastSyncRunAt: string | null;
    lastIngestRunAt: string | null;
    /** Bounded queue of transcript files that failed to copy; retried on subsequent syncs. */
    transcriptRetryQueue: TranscriptRetryEntry[];
    /** Last scout-report rotations (optional `persistRotation` runs). */
    scoutRotationHistory: ScoutRotationEntry[];
};
export declare const IMPROVEMENT_STATE_SIDECAR_REL = ".workspace-kit/improvement/state.json";
export declare function emptyImprovementState(): ImprovementStateDocument;
/** Append one scout rotation row and trim to cap (mutates and returns same doc). */
export declare function appendScoutRotationEntry(doc: ImprovementStateDocument, entry: ScoutRotationEntry): ImprovementStateDocument;
export declare function loadImprovementState(workspacePath: string, effectiveConfig?: Record<string, unknown>): Promise<ImprovementStateDocument>;
export declare function saveImprovementState(workspacePath: string, doc: ImprovementStateDocument, effectiveConfig?: Record<string, unknown>, options?: {
    commandName?: string;
    clientMutationId?: string;
    policyApproval?: {
        confirmed: boolean;
        rationale: string;
    };
}): Promise<ModuleCommandResult | null>;
