InferAgentState: T extends __type ExtractAgentConfig<
T
> extends never __type : BaseAgentState<InferAgentToolCalls<T>> ExtractAgentConfig<T>["State"] extends undefined __type : SafeInferInteropZodInput<ExtractAgentConfig<T>["State"]> InferMiddlewareStatesFromArray<ExtractAgentConfig<T>["Middleware"]> InferStructuredResponse<ExtractAgentConfig<T>["Response"]> : T extends __type RunOutput : T extends __type T : __type