/**
 * Unified session management service — SSOT for conversation sessions.
 *
 * Provides a single authoritative interface for session lifecycle across all
 * façades (WebUI, Telegram, TUI, CLI). Wraps DeepAgentSessionStore for
 * thread metadata and MemoryStore for cross-session memory.
 *
 * Thread checkpoint deletion requires the checkpointer to be set via
 * `setCheckpointer()` before `deleteSession()` can fully clean up.
 */
import type { BaseCheckpointSaver } from '@langchain/langgraph-checkpoint';
import { type CreateDeepAgentSessionOptions, type TouchDeepAgentSessionOptions } from './deepagent-sessions.js';
import type { CheckpointMetadata, DeepAgentSessionRecord, DeepAgentSessionScope, SessionSummary } from './session-types.js';
import type { CompactionState } from '../compaction/compaction-types.js';
export interface RestoreResult {
    checkpointId: string;
    sessionId: string;
    compactionState: CompactionState | null;
    restoredAt: string;
}
export interface SaveCheckpointOptions {
    compactionState?: CompactionState | null;
}
export { deriveSessionTitle, type CreateDeepAgentSessionOptions } from './deepagent-sessions.js';
export interface SessionServiceOptions {
    sessionsDir: string;
    memoriesDir: string;
}
export declare class SessionService {
    private readonly store;
    private readonly memoryStore;
    private readonly sessionsDir;
    private checkpointer?;
    private checkpointManager?;
    private pendingCheckpointInitializer?;
    private checkpointAccessEnsured;
    constructor(options: SessionServiceOptions);
    setCheckpointer(checkpointer: BaseCheckpointSaver): void;
    registerCheckpointInitializer(initializer: () => Promise<BaseCheckpointSaver>): void;
    ensureCheckpointAccess(): Promise<void>;
    isCheckpointAccessReady(): boolean;
    list(): SessionSummary[];
    get(id: string): DeepAgentSessionRecord | undefined;
    create(options?: CreateDeepAgentSessionOptions): DeepAgentSessionRecord;
    ensure(sessionId: string, options?: Omit<CreateDeepAgentSessionOptions, 'id'>): DeepAgentSessionRecord;
    resume(id: string): DeepAgentSessionRecord | undefined;
    delete(id: string): Promise<void>;
    touch(id: string, options?: TouchDeepAgentSessionOptions): DeepAgentSessionRecord | undefined;
    getOrCreateForScope(scope: DeepAgentSessionScope, options?: {
        title?: string;
    }): DeepAgentSessionRecord;
    rotateForScope(scope: DeepAgentSessionScope, options?: {
        title?: string;
    }): DeepAgentSessionRecord;
    clearScope(scope: DeepAgentSessionScope): void;
    listForScope(scope: DeepAgentSessionScope): DeepAgentSessionRecord[];
    getActiveForScope(scope: DeepAgentSessionScope): DeepAgentSessionRecord | undefined;
    listCheckpointsSync(sessionId: string): CheckpointMetadata[];
    persistMemory(sessionId: string, title: string, createdAt: string): void;
    buildSessionConfig(sessionId: string): {
        configurable: {
            thread_id: string;
        };
        version: 'v2';
    };
    listCheckpoints(sessionId: string): Promise<CheckpointMetadata[]>;
    saveCheckpoint(sessionId: string, options?: SaveCheckpointOptions): Promise<CheckpointMetadata>;
    restoreCheckpoint(sessionId: string, checkpointId: string): Promise<RestoreResult>;
    deleteCheckpoint(sessionId: string, checkpointId: string): Promise<void>;
    deleteAllCheckpoints(sessionId: string): Promise<void>;
}
//# sourceMappingURL=session-service.d.ts.map