/**
 * Session Persistence Manager
 *
 * Manages session persistence for context continuity across restarts.
 * Stores conversations as JSON files and supports auto-save.
 */
import { EventEmitter } from "events";
import type { SessionPersistenceConfig, PersistedSession, PersistedMessage, PersistedToolCall } from "./types.js";
/**
 * Manages session persistence for context continuity
 */
export declare class SessionPersistenceManager extends EventEmitter {
    private config;
    private workingDirectory;
    private currentSession;
    private autoSaveTimer;
    private isDirty;
    constructor(workingDirectory: string, config?: Partial<SessionPersistenceConfig>);
    /**
     * Ensure storage directory exists
     */
    private ensureStorageDirectory;
    /**
     * Generate session file path
     */
    private getSessionPath;
    /**
     * Generate project hash for identifying sessions
     */
    private getProjectHash;
    /**
     * Start a new session or resume existing
     */
    startSession(sessionId?: string): Promise<PersistedSession>;
    /**
     * Load a session from storage
     */
    loadSession(sessionId: string): Promise<PersistedSession | null>;
    /**
     * Save current session
     */
    saveSession(): Promise<void>;
    /**
     * Add a message to the session
     */
    addMessage(message: Omit<PersistedMessage, "id" | "timestamp">): void;
    /**
     * Add a tool call to the last assistant message
     */
    addToolCall(toolCall: Omit<PersistedToolCall, "id" | "timestamp">): void;
    /**
     * Start auto-save timer
     */
    private startAutoSave;
    /**
     * Stop auto-save timer
     */
    private stopAutoSave;
    /**
     * End current session
     */
    endSession(): Promise<void>;
    /**
     * List all sessions for current project
     */
    listSessions(): PersistedSession[];
    /**
     * Get the most recent session
     */
    getMostRecentSession(): PersistedSession | null;
    /**
     * Delete old sessions
     */
    cleanupOldSessions(): Promise<number>;
    /**
     * Get current session
     */
    getCurrentSession(): PersistedSession | null;
    /**
     * Get configuration
     */
    getConfig(): SessionPersistenceConfig;
    /**
     * Update configuration
     */
    updateConfig(config: Partial<SessionPersistenceConfig>): void;
    /**
     * Dispose resources
     */
    dispose(): void;
}
