import type { WorkflowSessionEntryRecord, WorkflowSessionEventRecord } from "../workflows/types.js"; export type TemporalContentBlock = { contentIndex: number; kind: "text" | "thinking" | "toolCall"; text: string; value?: unknown; }; export type TemporalMessage = { messageId: string; role: string; status: "streaming" | "finished" | "error" | "settled" | "unsettled"; entryId?: string; blocks: TemporalContentBlock[]; }; export type TemporalTool = { toolCallId: string; messageId: string; toolName: string; status: "running" | "finished" | "failed"; updates: number; args?: unknown; result?: unknown; }; export type TemporalSessionState = { throughSeq: number; messages: TemporalMessage[]; tools: TemporalTool[]; settledEntryIds: string[]; diagnostics: string[]; }; /** Fold the durable semantic journal through one sequence position. */ export declare function reduceSessionEvents(entries: WorkflowSessionEntryRecord[], events: WorkflowSessionEventRecord[], throughSeq?: number): TemporalSessionState; /** * In-memory seek index. Checkpoints are viewer-only cache state and are never * persisted into a run bundle. */ export declare class SessionReplayIndex { private readonly entries; private readonly events; private readonly checkpoints; private readonly timestamps; constructor(entries: WorkflowSessionEntryRecord[], events: WorkflowSessionEventRecord[], checkpointInterval?: number); stateAtSeq(throughSeq: number): TemporalSessionState; seqAtOrBefore(timestampMs: number): number; }