import type { HistoryMessage } from './tui-backend.js'; export type TuiSessionSnapshotEntryType = 'message' | 'compaction' | 'context' | 'bash' | 'custom' | 'branch'; export interface TuiSessionSnapshotEntry { id: string; type: TuiSessionSnapshotEntryType; parentId: string | null; customType?: string; data?: unknown; display?: boolean; userLabel?: string; labelTimestamp?: string; role?: 'user' | 'assistant' | 'system'; message?: { role: 'user' | 'assistant' | 'system'; content: string; usage?: { input: number; output: number; cost: { total: number; }; }; }; content: string; timestamp?: number; raw?: HistoryMessage | Record; } export interface TuiSessionSnapshotHeader { type: 'session'; version?: number; id: string; timestamp: string; cwd: string; parentSession?: string; } export interface TuiSessionSnapshotTreeNode { entry: TuiSessionSnapshotEntry; children: TuiSessionSnapshotTreeNode[]; label?: string; labelTimestamp?: string; } export interface TuiReadonlySessionManager { getEntries(): TuiSessionSnapshotEntry[]; getBranch(): TuiSessionSnapshotEntry[]; getLeafEntry(): TuiSessionSnapshotEntry | undefined; getLeafId(): string | null; getEntry(entryId: string): TuiSessionSnapshotEntry | undefined; getLabel(entryId: string): string | undefined; getHeader(): TuiSessionSnapshotHeader | null; getTree(): TuiSessionSnapshotTreeNode[]; getSessionId(): string; getSessionFile(): string | undefined; getSessionDir(): string | undefined; getSessionName(): string | undefined; getCwd(): string; } export declare class TuiSessionSnapshot { private readonly getSessionKey; private readonly getCwdValue; private readonly getSessionNameValue; private readonly getSessionFileValue; private readonly getSessionDirValue; private entries; private nextId; constructor(getSessionKey: () => string, getCwdValue: () => string, getSessionNameValue: () => string | undefined, getSessionFileValue?: () => string | undefined, getSessionDirValue?: () => string | undefined); replaceFromHistory(messages: HistoryMessage[]): void; clear(): void; appendMessage(role: 'user' | 'assistant' | 'system', content: string): void; setLabel(entryId: string, label: string | undefined): void; appendCustomEntry(customType: string, data?: unknown): void; appendCustomMessage(message: { customType: string; content?: string | unknown[]; display?: boolean; details?: unknown; }): void; manager(): TuiReadonlySessionManager; private entryFromHistory; private createHeader; private createTree; private createEntry; }