import { type SessionContext, type SessionEntry, type SessionHeader } from "@mariozechner/pi-coding-agent"; type BranchSummaryEntry = Extract; type CompactionEntry = Extract; type CustomEntry = Extract; type CustomMessageEntry = Extract; type LabelEntry = Extract; type ModelChangeEntry = Extract; type SessionInfoEntry = Extract; type SessionMessageEntry = Extract; type ThinkingLevelChangeEntry = Extract; export declare class TranscriptFileState { readonly header: SessionHeader | null; readonly entries: SessionEntry[]; readonly migrated: boolean; private readonly byId; private readonly labelsById; private readonly labelTimestampsById; private leafId; constructor(params: { header: SessionHeader | null; entries: SessionEntry[]; migrated?: boolean; }); private rebuildIndex; getCwd(): string; getHeader(): SessionHeader | null; getEntries(): SessionEntry[]; getLeafId(): string | null; getLeafEntry(): SessionEntry | undefined; getLabel(id: string): string | undefined; getBranch(fromId?: string): SessionEntry[]; buildSessionContext(): SessionContext; branch(branchFromId: string): void; resetLeaf(): void; appendMessage(message: SessionMessageEntry["message"]): SessionMessageEntry; appendThinkingLevelChange(thinkingLevel: string): ThinkingLevelChangeEntry; appendModelChange(provider: string, modelId: string): ModelChangeEntry; appendCompaction(summary: string, firstKeptEntryId: string, tokensBefore: number, details?: unknown, fromHook?: boolean): CompactionEntry; appendCustomEntry(customType: string, data?: unknown): CustomEntry; appendSessionInfo(name: string): SessionInfoEntry; appendCustomMessageEntry(customType: string, content: CustomMessageEntry["content"], display: boolean, details?: unknown): CustomMessageEntry; appendLabelChange(targetId: string, label: string | undefined): LabelEntry; branchWithSummary(branchFromId: string | null, summary: string, details?: unknown, fromHook?: boolean): BranchSummaryEntry; private appendEntry; } export declare function readTranscriptFileState(sessionFile: string): Promise; export declare function writeTranscriptFileAtomic(filePath: string, entries: Array): Promise; export declare function persistTranscriptStateMutation(params: { sessionFile: string; state: TranscriptFileState; appendedEntries: SessionEntry[]; }): Promise; export {};