import type { ContentBlock, MemoryRef, ToolCallProjection, TurnProjection } from "../../schemas/projection"; export interface TurnState { turnId: string; loopId: string; role: "user" | "assistant" | "system"; model: string | null; startedAt: number; contextWindow: number; blocks: ContentBlock[]; toolCalls: ToolCallProjection[]; usage: Record | null; responseDone: boolean; firstTokenMs: number | null; streamDurationMs: number | null; firstTokenDeliveryMs: number | null; /** 生产者上报的模型请求时序;缺失时保持 null,不用浏览器时间补(#2581 A1/I1)。 */ modelStartedAt: string | null; modelDurationMs: number | null; modelStartedAtReported: boolean; memoryRefs: MemoryRef[] | null; parentForkToolCallId: string | null; } export declare function createTurnState(turnId: string, loopId: string, opts?: { model?: string | null; contextWindow?: number; memoryRefs?: MemoryRef[] | null; }): TurnState; export declare function snapshot(state: TurnState, sequence: number, status: TurnProjection["status"]): TurnProjection; export declare const PAUSE_TOOL_NAMES: Set; export declare function toolStatusFromResult(result: unknown): ToolCallProjection["status"];