export interface KVStateOptions {
    readonly sessionId?: string | undefined;
    readonly stateDir: string;
}
/**
 * KVState — Session-scoped persistent key-value store.
 *
 * Storage: <stateDir>/session_{id}.json
 * Session ID: 8-char hex string, auto-generated if not provided.
 *
 * Features:
 * - Lazy load: defers disk read until first operation.
 * - Atomic persistence: write to temp file then rename.
 * - Debounced auto-persist: 5-second timer after each set().
 */
export declare class KVState {
    private sessionId;
    private stateDir;
    private filePath;
    private data;
    private persistTimer;
    private loadPromise;
    private readonly store;
    constructor(options: KVStateOptions);
    get(keys: string[]): Promise<Record<string, unknown>>;
    set(values: Record<string, unknown>): Promise<void>;
    list(prefix?: string): Promise<Record<string, unknown>>;
    clear(keys: string[]): Promise<void>;
    load(): Promise<void>;
    persist(): Promise<void>;
    getSessionId(): string;
    static listSessions(options: Pick<KVStateOptions, 'stateDir'>): string[];
    static cleanupOldSessions(keepCount: number, options: Pick<KVStateOptions, 'stateDir'>): void;
    dispose(): Promise<void>;
    private ensureLoaded;
    private schedulePersist;
    private static generateId;
}
//# sourceMappingURL=kv-state.d.ts.map