import { SessionManager } from '../sessions/manager.js';
import type { SessionReturnContextSummary } from './session-return-context.js';
import type { ConversationTitleSource } from '../core/conversation.js';
export type SessionSnapshot = {
    messages: Array<Record<string, unknown>>;
    timestamp?: number;
    title?: string;
    titleSource?: ConversationTitleSource;
    returnContext?: SessionReturnContextSummary;
};
export type RecoveryFileInfo = {
    title: string;
    timestamp: number;
    sessionId: string;
    returnContext?: SessionReturnContextSummary;
};
export type SessionPersistenceOptions = {
    workingDirectory?: string;
    homeDirectory?: string;
    sessionManager?: SessionManager;
};
export type SessionPersistencePaths = {
    readonly workingDirectory: string;
    readonly homeDirectory: string;
};
export declare function getUserSessionsDir(workingDirectory: string): string;
export declare function getLastSessionPointerPath(workingDirectory: string): string;
export declare function getRecoveryFilePath(homeDirectory: string): string;
export declare function generateUserSessionId(): string;
export declare function saveSession(sessionId: string, data: SessionSnapshot, model: string, provider: string, title?: string, options?: SessionPersistenceOptions): void;
export declare function persistConversation(sessionId: string, data: SessionSnapshot, model: string, provider: string, title?: string, options?: SessionPersistenceOptions): void;
export declare function writeLastSessionPointer(sessionId: string, options?: SessionPersistenceOptions): void;
export declare function readLastSessionPointer(options?: SessionPersistenceOptions): string | null;
export declare function loadLastConversation(options?: SessionPersistenceOptions): SessionSnapshot | null;
export declare function writeRecoveryFile(snapshot: SessionSnapshot, sessionId: string, title?: string, options?: SessionPersistenceOptions): void;
export declare function deleteRecoveryFile(options?: SessionPersistenceOptions): void;
export declare function checkRecoveryFile(options?: SessionPersistenceOptions): RecoveryFileInfo | null;
export declare function loadRecoveryConversation(options?: SessionPersistenceOptions): SessionSnapshot | null;
//# sourceMappingURL=session-persistence.d.ts.map