Resolves the appropriate stream interface based on the agent/graph type.
This type automatically selects the correct stream interface based on
the type of agent or graph passed to useStream:
DeepAgent (~deepAgentTypes) → UseDeepAgentStream
ReactAgent (~agentTypes) → UseAgentStream
CompiledGraph / Default → UseDeepAgentStream with DefaultSubagentStates
DefaultSubagentStates (loosely typed)ResolveStreamInterface: IsDeepAgent<
T
> extends true UseDeepAgentStream<InferStateType<T>, InferToolCalls<T>, InferSubagentStates<T>, Bag> : IsReactAgent<T> extends true UseAgentStream<InferStateType<T>, InferToolCalls<T>, Bag> : UseDeepAgentStream<InferStateType<T>, InferToolCalls<T>, DefaultSubagentStates, Bag>// Automatic detection based on agent type
type GraphStream = ResolveStreamInterface<typeof compiledGraph, BagTemplate>;
// → UseGraphStream (with typed node names)
type AgentStream = ResolveStreamInterface<typeof reactAgent, BagTemplate>;
// → UseAgentStream (has toolCalls)
type DeepStream = ResolveStreamInterface<typeof deepAgent, BagTemplate>;
// → UseDeepAgentStream (has toolCalls AND subagents)