Skip to main content

Module step

Module step 

Source
Expand description

The TurnStep seam: a small, ordered set of composable steps the turn loop drives, each owning one cohesive slice of turn behavior.

Slice 2 of #649 introduces the seam and proves it by migrating exactly one behavior out of the turn-loop monolith — the forced closing completion. The turn function’s post-loop tail is now a driver over a list of TurnSteps; later slices migrate the remaining stanzas behind the same interface.

A step reads and mutates the turn’s working state through a TurnCtx and reports back with a StepOutcome (keep going, pause for a human, or end the turn early).

Structs§

CircuitBreaker
The denied-action circuit breaker.
ForcedCompletion
The forced closing completion: when a turn executed tools but the model never produced any user-visible text, force one final text answer so the turn always yields a reply.
ResumePrePass
The approval resume pre-pass: resolve the tool calls a human already decided.
TurnCtx
The turn’s working state, threaded through each TurnStep.

Enums§

StepOutcome
What a TurnStep reports after running.

Traits§

TurnStep
One cohesive slice of turn behavior the turn loop drives.