Skip to content

claude-code-driver / Turn

Interface: Turn ​

Defined in: api/public-types.ts:205

Extends ​

Properties ​

PropertyModifierTypeDescriptionDefined in
acceptedreadonlyPromise<{ 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
donereadonlyPromise<TurnResult>Always resolves (D-31).api/public-types.ts:215
keyreadonlyTurnKeyThe 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
promptreadonlystring-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 ​

ParameterType
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

Returns ​

TurnSnapshot

Released under the MIT License. Not affiliated with Anthropic.