| Name | Type | Description |
|---|---|---|
stream* | StreamHandle<StateType> |
Subscribe to a scoped values stream — most-recent state payload
for a namespace. Equivalent to reading stream.values at the root.
When the payload carries a messages array, it is coerced to
BaseMessage instances to keep parity with the root projection.
Typing:
useValues(stream)): returns the StateType declared
on the parent useStream<State>() — no explicit
generic required. Non-nullable because the root snapshot always
carries values (falling back to initialValues ?? {}).useValues(stream, target)): the scoped payload can
have a different shape than the root state (e.g. a subagent
returning its own substate). Callers should annotate the
expected shape explicitly: useValues<SubagentState>(stream, sub).
Defaults to unknown when not annotated.