export type TranscriptEventKind = "user_message" | "assistant_message" | "thought_event" | "tool_event" | "outbound_text" | "outbound_media" | "sync_upsert" | "summary";
export interface TranscriptEventInput {
    eventId?: string;
    clientId: string;
    kind: TranscriptEventKind;
    payload: Record<string, unknown>;
    ts?: number;
    lamportTs?: number;
}
export interface StoredTranscriptEvent extends TranscriptEventInput {
    v: 1;
    seq: number;
    ts: number;
    sessionKey: string;
}
export interface TranscriptSessionSummary {
    sessionKey: string;
    sessionId: string;
    title?: string;
    createdAt: number;
    lastActiveAt: number;
    lastSeq: number;
    messageCount: number;
}
export declare function sessionIdFromSessionKey(sessionKey: string, accountId?: string): string;
export declare class TranscriptStore {
    private readonly historyDir;
    constructor(historyDir?: string);
    appendEvent(accountId: string, sessionKey: string, input: TranscriptEventInput): StoredTranscriptEvent;
    appendEvents(accountId: string, sessionKey: string, inputs: TranscriptEventInput[]): StoredTranscriptEvent[];
    readSince(accountId: string, sessionKey: string, sinceSeq?: number, limit?: number): StoredTranscriptEvent[];
    listSessions(accountId: string): TranscriptSessionSummary[];
    compact(accountId: string, sessionKey: string, keepLast: number): void;
}
export declare function getTranscriptStore(): TranscriptStore;
