import { k as KodaXSessionData, o as KodaXSessionLineage, r as KodaXSessionNavigationOptions, s as KodaXSessionRuntimeInfo } from './types.d-mM8vqvhT.js';

/**
 * Session Storage - Session storage abstraction layer
 *
 * Provides a shared persistence interface across memory and filesystem storage.
 */

/**
 * Session data structure.
 */
type SessionData = KodaXSessionData;
/**
 * Session storage interface.
 */
interface SessionStorage {
    save(id: string, data: SessionData): Promise<void>;
    load(id: string): Promise<SessionData | null>;
    getLineage?(id: string): Promise<KodaXSessionLineage | null>;
    setActiveEntry?(id: string, selector: string, options?: KodaXSessionNavigationOptions): Promise<SessionData | null>;
    setLabel?(id: string, selector: string, label?: string): Promise<SessionData | null>;
    rewind?(id: string, selector?: string): Promise<SessionData | null>;
    fork?(id: string, selector?: string, options?: {
        sessionId?: string;
        title?: string;
    }): Promise<{
        sessionId: string;
        data: SessionData;
    } | null>;
    list(gitRoot?: string): Promise<Array<{
        id: string;
        title: string;
        msgCount: number;
        runtimeInfo?: KodaXSessionRuntimeInfo;
    }>>;
    delete?(id: string): Promise<void>;
    deleteAll?(gitRoot?: string): Promise<void>;
}
/**
 * In-memory session storage implementation.
 */
declare class MemorySessionStorage implements SessionStorage {
    private sessions;
    save(id: string, data: SessionData): Promise<void>;
    load(id: string): Promise<SessionData | null>;
    getLineage(id: string): Promise<KodaXSessionLineage | null>;
    setActiveEntry(id: string, selector: string, options?: KodaXSessionNavigationOptions): Promise<SessionData | null>;
    setLabel(id: string, selector: string, label?: string): Promise<SessionData | null>;
    fork(id: string, selector?: string, options?: {
        sessionId?: string;
        title?: string;
    }): Promise<{
        sessionId: string;
        data: SessionData;
    } | null>;
    rewind(id: string, selector?: string): Promise<SessionData | null>;
    list(_gitRoot?: string): Promise<Array<{
        id: string;
        title: string;
        msgCount: number;
    }>>;
    delete(id: string): Promise<void>;
    deleteAll(_gitRoot?: string): Promise<void>;
}
declare function createMemorySessionStorage(): SessionStorage;

export { MemorySessionStorage as M, createMemorySessionStorage as c };
export type { SessionData as S, SessionStorage as a };
