Unwrap the state shape from a compiled graph, a create-agent brand,
or a plain type. Used by useStream<T>() to resolve T = typeof agent into the state the values/messages projections observe.
Structurally identical to the legacy
@langchain/langgraph-sdk/ui helper of the same name; kept here as
a framework-facing re-export so bindings can import from the
stream subpath without needing the UI module.
InferStateType: InferStateType<T>