@sema-agent/core
Version:
Stateless, task-oriented AI agent core
13 lines (12 loc) • 626 B
TypeScript
/** A minimal async iterable you can push values into and close. Backpressure-free (buffers). */
export declare class PushQueue<T> implements AsyncIterable<T> {
private buffer;
private waiters;
private closed;
/** Returns whether the value was ACCEPTED (`false` after close — the push is a silent no-op then).
* Callers that mirror a pushed value to a second reader gate on this so both sides stay in parity
* (#253: a status frame must not reach a side sink the stream itself already refused). */
push(value: T): boolean;
close(): void;
[Symbol.asyncIterator](): AsyncIterator<T>;
}