import type { StreamChunk } from '@n8n/agents'; import type { AgentSseEvent } from '@n8n/api-types'; import type { Response } from 'express'; export type FlushableResponse = Response & { flush?: () => void; }; export interface ToolEventCallbacks { toolInputStart?: (toolName: string) => void; toolInputDelta?: (toolCallId: string, delta: string) => void; toolResult?: (toolName: string) => void; } export declare function initSseStream(res: FlushableResponse): { send: (event: AgentSseEvent) => void; }; export declare function pumpChunks(chunks: AsyncIterable, send: (e: AgentSseEvent) => void, onToolEvent?: ToolEventCallbacks): Promise;