/** * AsyncQueue - Async iterable queue for streaming SDK input * * Allows pushing messages that can be consumed as an async iterable. * Used to stream user messages to the SDK's query() function. * * @example * ```typescript * const queue = new AsyncQueue(); * * // Consumer * (async () => { * for await (const item of queue) { * console.log(item); * } * })(); * * // Producer * queue.push('first'); * queue.push('second'); * queue.close(); * ``` */ export declare class AsyncQueue implements AsyncIterable { private queue; private resolvers; private closed; private error; /** * Push an item to the queue * @throws Error if the queue is closed */ push(item: T): void; /** * Close the queue (signal no more items) * Any waiting consumers will receive done: true */ close(): void; /** * Close the queue with an error * Any waiting consumers will have the error thrown */ closeWithError(error: Error): void; /** * Check if queue is closed */ isClosed(): boolean; /** * Check if queue has pending items */ get length(): number; /** * Check if there are waiting consumers */ get waitingConsumers(): number; /** * Async iterator implementation */ [Symbol.asyncIterator](): AsyncIterator; } //# sourceMappingURL=async-queue.d.ts.map