AgentSession
Parameters
agent
the upstream agent to run. Its threadId names the thread this transcript is of.
tools
the tools this client executes, or null for a session that executes none. Declared on every run through this session, and answered as described above.
onWarning
see UiTranscriptReducer; this class adds one case of its own, a RUN_ERROR that arrived after the run had already ended and was therefore not folded. Last, so a call that passes it as a trailing lambda still can.