import { SessionStore } from "agent-sh/session-store"; export interface SessionInfo { id: string; filePath: string; createdAt: number; name?: string; preview: string; entryCount: number; } /** Many sessions per cwd. Each is one .jsonl file under `dir/`. Constructor * always opens a fresh session unless `opts.resumeSessionId` is given and * points to an existing session file. /resume callers can `openSession(id)` * to swap the current store to a past session file. */ export declare class MultiSessionStore { private dir; private cwd; private currentStore; constructor(dir: string, cwd: string, opts?: { resumeSessionId?: string; }); markLastSession(): void; static readLastSessionId(dir: string, opts?: { fallbackToLatest?: boolean; }): string | undefined; setName(id: string, name: string): void; private readName; private metaFile; /** One-time import from the previous storage format (sessions stored as * directories with tree.jsonl + snapshots/). Each old session is replayed * from its most recent snapshot into a new flat `.jsonl` file, then the * source directory is renamed `.migrated-/` so the import is idempotent. */ private migrateLegacy; current(): SessionStore; newSession(): SessionStore; openSession(id: string): SessionStore; deleteSession(id: string): void; listSessions(): SessionInfo[]; private createFreshSession; private sessionFile; }