import type { ChatMessage } from "../../protocol/wire/index.js";
import type { MessageDisplayMetadata, PersistedChatMessage, TokenUsage } from "./session-types.js";
export interface TranscriptLoadResult {
    messages: PersistedChatMessage[];
    corruptLines: number;
}
export declare function appendMessage(sessionId: string, message: ChatMessage, projectRoot: string, turnId?: string, metadata?: {
    usage?: TokenUsage;
    displayMetadata?: MessageDisplayMetadata;
}): Promise<boolean>;
export declare function countTranscriptMessages(sessionId: string, projectRoot: string): Promise<number | null>;
export declare function loadTranscript(sessionId: string, projectRoot: string, options?: {
    includeDisplayMetadata?: boolean;
}): Promise<TranscriptLoadResult | null>;
