Creates a GraphRunStream with built-in transformers and kicks off the background pump that feeds raw stream chunks through the transformer pipeline.
Built-in transformers are registered in this order:
_discoveries log.lifecycle channel events.run.values / run.output.run.messages / .messagesFrom.Subgraph discovery is registered first so that downstream transformers (notably lifecycle) observe child namespaces with their stream handles already in place. User-supplied transformer factories are registered afterwards.
createGraphRunStream<
TValues = Record<string, unknown>,
TTransformers extends readonly () =
> StreamTransformer<any>[] = []>(
source: AsyncIterable<StreamChunk>,
transformers: TTransformers = ...,
optionsOrAbortController: AbortController | CreateGraphRunStreamOptions
): GraphRunStream<TValues, InferExtensions<TTransformers>>| Name | Type | Description |
|---|---|---|
source* | AsyncIterable<StreamChunk> | Raw async iterable from |
transformers | TTransformers | Default: ...User-supplied transformer factories. |
optionsOrAbortController | AbortController | CreateGraphRunStreamOptions | Either a full
CreateGraphRunStreamOptions object or (for backward
compatibility) a bare |