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.
Constructor
Parameters
AsyncGenerator<SessionUpdate, PromptResult, undefined>
required
StandardSchema<T>
Type:
StandardSchemaPromise<void>
Returns
Turn
Properties
Promise<void>
required
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
null | (value: SessionOutcome<T>) => TResult1 | PromiseLike<TResult1>
Type:
SessionOutcomenull | (reason: unknown) => TResult2 | PromiseLike<TResult2>
Returns
Promise<TResult1 | TResult2>
