Skip to content

AsyncChannel

Defined in: packages/core/src/async-channel.ts:9

A small push→pull bridge: a producer calls push/close/fail; a consumer iterates with for await. Useful for exposing an event-emitter-based source (a spawned process’s stdout/stderr, a websocket, …) as an AsyncIterable — in particular, the shape the AI SDK’s tool execute accepts for a tool that streams preliminary results before its final one (see AgentToolResultEvent’s doc comment in ./observability/events for what that produces on the ADL event stream).

T

[asyncIterator](): AsyncGenerator<T, void, unknown>

Defined in: packages/core/src/async-channel.ts:13

AsyncGenerator<T, void, unknown>


close(): void

Defined in: packages/core/src/async-channel.ts:11

void


fail(error): void

Defined in: packages/core/src/async-channel.ts:12

unknown

void


push(value): void

Defined in: packages/core/src/async-channel.ts:10

T

void