import { Action } from '@copilotkit/shared'; /** * This function intercepts the stream from the chat completion and processes it according to the defined actions. * It decodes the stream, executes any server-side functions as specified in the actions, and forwards the rest to the client. * * @param stream - The incoming ReadableStream of Uint8Array from the chat completion. * @param actions - An array of Action objects that define server-side functions to be executed. * @param debug - A boolean flag to enable debug logging. * @returns A new ReadableStream that is the result of processing the incoming stream. */ declare function copilotkitStreamInterceptor(stream: ReadableStream, actions: Action[], debug?: boolean): ReadableStream; /** * A ReadableStream that only emits a single chunk. */ declare class SingleChunkReadableStream extends ReadableStream { constructor(content?: string, toolCalls?: any); } export { SingleChunkReadableStream, copilotkitStreamInterceptor };