Skip to content
Developer Preview

Turn

A turn, as a CONSUMER sees it — the turn surface and nothing else.

Session.turn() returns this rather than the concrete TurnHandle because the handle’s “fed by Session” mutators (settleCompleted, settleUnqueued, fail, pushItem, …) would otherwise be public: an embedder could call settleCompleted and fabricate a terminal the server never authored, which is exactly what the protocol forbids. They stay reachable only through Session.apply, i.e. only from a server-authored event.

Property Type Stability Presence Description
completed Promise<TurnOutcome> required
observedStart boolean required Did THIS session observe a turn/started? Not a launch-failure marker.
turnId string required
Method Signature Stability Description
deltas deltas(): AsyncIterableIterator<ItemDeltaParams>
items items(): AsyncIterableIterator<object>
Source

clients/sdk-ts/src/facade/turn-handle.ts:211

{
"kind": "Interface",
"canonicalPath": "Turn"
}