Skip to content
Developer Preview

SyncTurn

One turn, on the blocking surface — the sync twin of Turn.

Class in muse_code

SyncTurn(turn: Turn[_TurnI], runner: _LoopRunner)

Property Type Description
turn_id str The wire turn id.
observed_start bool Did THIS session observe a turn/started? Not a launch marker.
Method Signature Description
completed completed() -> TurnOutcome Block for the protocol turn-wait; settles on a server-authored fact (a method where the async twin is an awaitable property — a blocking property read would hide an unbounded wait behind attribute access).
items items() -> Iterator[FoldedItem] This turn’s items, iterated synchronously: the folded backlog, then the live tail, ending when the turn settles.
deltas deltas() -> Iterator[ItemDeltaParams] This turn’s item/delta frames, live only, iterated synchronously; released on break/close (and bounded on a never-started iterator) exactly like items.
cancel cancel() -> TurnCancelResult Blocking twin of cancel.
interrupt interrupt(*, retract: bool | None = None) -> TurnInterruptResult Blocking twin of interrupt.
steer steer(options: SteerTurnOptions[_TurnI]) -> TurnSteerResult Blocking twin of steer.
unqueue unqueue() -> TurnUnqueueOutcome[_TurnI] Blocking twin of unqueue.
Source

clients/sdk-py/src/muse_code/sync_facade.py:664