export type ChatGptTextEvent = { type: "text"; text: string; conversationId?: string; messageId?: string; raw?: unknown; }; export type ChatGptToolCallEvent = { type: "tool_call"; id: string; name: string; arguments: string; conversationId: string; messageId: string; }; export type ChatGptConversationEvent = ChatGptTextEvent | ChatGptToolCallEvent; /** Encode ChatGPT conversation/message ids into an OpenAI-looking call id. */ export declare function encodeToolCallId(conversationId: string, messageId: string, recipient?: string, toolLeafId?: string): string; export declare function decodeToolCallId(callId: string): { conversationId: string; messageId: string; recipient?: string; toolLeafId?: string; } | undefined; export declare class ConversationDeltaParser { private eventBuffer; private previous; private lastPath; private lastOp; private pendingTool; private currentConversationId; private currentMessageId; private crCarry; /** Count of SSE data lines that failed JSON.parse (diagnostic; payload never logged). */ malformedEvents: number; feed(chunk: string): ChatGptConversationEvent[]; flush(): ChatGptConversationEvent[]; private processEvent; private finishPendingTool; } //# sourceMappingURL=sse.d.ts.map