claude-code-driver / Turn
Interface: Turn
Defined in: api/public-types.ts:205
Extends
AsyncIterable<SessionEvent>
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
accepted | readonly | Promise<{ promptId: string; }> | Rejects E_SUBMIT_UNCONFIRMED / E_BUSY / E_INPUT_REJECTED / E_SESSION_EXITED / E_SESSION_CLOSED; never unhandled (P-API-07). | api/public-types.ts:213 |
done | readonly | Promise<TurnResult> | Always resolves (D-31). | api/public-types.ts:215 |
key | readonly | TurnKey | The turn's key. send() returns before the core has queued the prompt; until then (normally one event-loop turn) this is a provisional pending:<n> reference that session.turn() also accepts. | api/public-types.ts:210 |
prompt | readonly | string | - | api/public-types.ts:211 |
Methods
completed()
ts
completed(): Promise<TurnResult>;Defined in: api/public-types.ts:217
Resolves on 'completed', else throws TurnResult.error.
Returns
Promise<TurnResult>
events()
ts
events(opts?): AsyncIterableIterator<SessionEvent>;Defined in: api/public-types.ts:219
Parameters
| Parameter | Type |
|---|---|
opts? | { highWaterMark?: number; } |
opts.highWaterMark? | number |
Returns
AsyncIterableIterator<SessionEvent>
interrupt()
ts
interrupt(): Promise<void>;Defined in: api/public-types.ts:220
Returns
Promise<void>
snapshot()
ts
snapshot(): TurnSnapshot;Defined in: api/public-types.ts:218