/** * Parse LangGraph streaming chunks for display * * LangGraph/DeepAgents streams chunks in various formats: * - AIMessage updates with content deltas * - Tool calls * - Tool results * - State updates * * This parser extracts displayable text for CLI output. */ export interface ParsedChunk { text?: string; messageId?: string; isDelta?: boolean; toolCall?: { id: string; name: string; args?: any; }; toolResult?: { id: string; output: any; error?: string; }; type: "text" | "tool" | "tool-result" | "state" | "unknown"; timestamp: number; } /** * Parse a raw LangGraph stream chunk * Returns an array of parsed chunks to handle multiple messages/events in a single chunk */ export declare function parseStreamChunk(chunk: any): ParsedChunk[]; /** * Format parsed chunk for CLI display */ export declare function formatParsedChunk(parsed: ParsedChunk): string | null; /** * Process a stream chunk and return displayable text * Returns null if nothing should be displayed */ export declare function processStreamChunk(chunk: any): string | null;