import { Request, Response } from 'express'; import { StreamEvent } from '../types/stream.js'; import '../types/memory.js'; import '../types/connector.js'; type SSEStreamOptions = { logLabel: string; userId: string; logContext?: Record; onThreadId?: (threadId: string) => void; onThinkingProcess?: (threadId: string, data: Extract["data"]) => Promise | void; /** * Called once the stream has been fully consumed with no error and no * client-initiated abort — i.e. on successful completion only. */ onComplete?: () => Promise | void; setup: (signal: AbortSignal) => Promise>; }; declare function streamEventsToSSE(req: Request, res: Response, options: SSEStreamOptions): Promise; export { type SSEStreamOptions, streamEventsToSSE };