type AgentProjectionStatus = "pending" | "streaming" | "awaiting-tools" | "complete" | "error" | "cancelled"; interface AgentProjectionOperation { operationId: string; operation: string; parentOperationId: string | null; status: "active" | "success" | "failed" | "cancelled"; metadata: Record | null; result: Record | null; } interface AgentProjectionTool { callId: string; toolName: string; status: "started" | "progress" | "step" | "preview" | "completed" | "error" | "delegated"; message: string | null; data: Record | null; } interface AgentProjectionRenderBlock { blockId: string; blockIndex: number; type: string; status: "streaming" | "complete" | "error"; content: string | null; data: Record | null; metadata: Record | null; } interface AgentRequestProjection { requestId: string; conversationId: string | null; status: AgentProjectionStatus; answer: string; reasoning: string; reasoningActive: boolean; phase: string | null; phaseHistory: string[]; operations: Record; tools: Record; renderBlocks: Record; renderBlockOrder: string[]; completion: Record | null; error: Record | null; lastTransportSeq: number; transportStreamId: string | null; eventCount: number; } interface AgentProjectionEvent { event: string; data?: unknown; stream_seq?: number; stream_id?: string; } declare function createAgentRequestProjection(input: { requestId: string; conversationId?: string | null; }): AgentRequestProjection; declare function projectAgentEvent(current: AgentRequestProjection, event: AgentProjectionEvent): AgentRequestProjection; declare function projectAgentEvents(initial: AgentRequestProjection, events: readonly AgentProjectionEvent[]): AgentRequestProjection; export { createAgentRequestProjection, projectAgentEvent, projectAgentEvents }; export type { AgentProjectionEvent, AgentProjectionOperation, AgentProjectionRenderBlock, AgentProjectionStatus, AgentProjectionTool, AgentRequestProjection };