export type TranscriptItemKind = "user" | "assistant-text" | "assistant-thinking" | "tool" | "read-group" | "custom"; export type TranscriptItemCapabilities = { copyable: boolean; foldable: boolean; rawViewable: boolean; }; export type TranscriptSourcePayload = { text: string; metadata: Readonly>; source: unknown; }; export type TranscriptItem = { id: string; kind: TranscriptItemKind; source: unknown; getPayload?: (source: unknown) => TranscriptSourcePayload; capabilities?: Partial; }; export type RegisterTranscriptItem = Omit & { id?: string; }; export type StreamingItemOptions = Omit & { promptGeneration: number | string; messageOrdinal: number; kind?: "assistant-text" | "assistant-thinking"; }; /** Stable transcript identities shared by the inline and overlay projections. */ export declare const transcriptItemId: { entry: (entryId: string) => string; assistantContent: (entryId: string, contentIndex: number) => string; tool: (toolCallId: string) => string; readGroup: (groupId: string) => string; custom: (customId: string) => string; stream: (promptGeneration: number | string, messageOrdinal: number) => string; }; /** * A session-local index of transcript projection items. It deliberately stores only * structural sources, allowing interactive mode to supply live streaming objects * and persisted session records without importing either implementation here. */ export declare class TranscriptItemRegistry { #private; get sessionId(): string | undefined; /** Ordered snapshot for read-only transcript projections. */ items(): readonly TranscriptItem[]; register(item: RegisterTranscriptItem): string; replace(id: string, item: Omit): boolean; startStream(options: StreamingItemOptions): string; /** Reconciles one exact live stream with its persisted canonical item. */ endStream(streamId: string, item: RegisterTranscriptItem): string | undefined; retireStream(id: string): boolean; coalesceReadGroup(groupId: string, source: unknown, toolCallIds?: readonly string[]): string; rebuild(items: readonly RegisterTranscriptItem[]): void; evict(id: string): boolean; switchSession(sessionId: string): void; resolveSourcePayload(id: string): TranscriptSourcePayload | undefined; capabilities(id: string): TranscriptItemCapabilities | undefined; has(id: string): boolean; canonicalId(id: string): string | undefined; }