for await it to observe typed events as they stream, and
await it (before, after, or instead of iterating) for the
SessionOutcome. Awaiting without iterating consumes the remaining
events internally.
SessionEvent, SessionOutcome
Constructor
Parameters
Type:
StandardSchemaReturns
Turn
Properties
The prompt was accepted, not necessarily completed. ACP v2 acknowledges
explicitly; v1 uses the matching user-message echo, falling back to the
prompt response if the agent does not echo. Rejection before acceptance
rejects this promise; subsequent failures reject the turn’s outcome.
Methods
[asyncIterator]()
Returns
SessionEvent
then()
Parameters
Type:
SessionOutcomeReturns
Promise<TResult1 | TResult2>
