Extract the output state type from a subagent spec.
For CompiledSubAgent<ReactAgent<Types>>, resolves to the agent's
invoke return type. Falls back to unknown for SubAgent and
AsyncSubAgent.
SubagentOutputOf: T extends CompiledSubAgent<
R
> R extends ReactAgent<Types> Awaited<ReturnType<ReactAgent<Types>["invoke"]>> : unknown : unknown