import { Transform } from 'stream'; /** * A buffer helper that handles splitting UTF-8 characters across chunks. * * It accumulates incoming chunks (Buffer or string) and pushes complete * UTF-8 strings downstream. If a chunk ends in the middle of a multi-byte * sequence, the bytes are buffered until the next chunk completes it. * * This uses the utf8-chunk-buffer package implementation logic but wrapped * in a stream.Transform for easy piping. */ export declare class Utf8ChunkBuffer { private buffer; /** * Pushes a new chunk into the buffer. * Returns an array of complete UTF-8 strings found so far. */ push(chunk: Buffer | string): string[]; /** * Flushes any remaining bytes in the buffer as a string. */ flush(): string[]; } /** * Creates a Node.js Transform stream that ensures chunks emitted are complete UTF-8 strings. * This is useful for processing SSE streams where a chunk might split a multi-byte character. */ export declare function createUtf8TransformStream(): Transform;