Skip to main content

Module orchestrator

Module orchestrator 

Source
Expand description

The public facade: one turn, start to finish (spec §23, §29).

Orchestrator::handle_turn runs the steps of §23 in order, and the order is the contract: accept (A, B), load and project cases (D, E), judge a card answer (C), issue tokens (F), understand (G), resolve and reduce (J, K), persist cards and pending commands (L), execute and commit once (M, N), re-project and raise the cards the cases now need (O, P), then answer and persist the turn as returned (Q..V). Every step that can fail leaves a phase marker, so crate::recover can tell an interrupted understanding from an interrupted commit.

A turn that carries only a card answer is understood without a model call: its meaning is the stored option.

Structs§

CaseCandidate
One case the actor may address in a conversation.
FixedTurnClock
A clock stopped at one instant, for tests and replays.
Orchestrator
The runtime that answers a turn (spec §29).
OrchestratorBuilder
Collects everything one Orchestrator needs.
StaticCaseDirectory
A directory with a fixed list, for tests, examples and single-case surfaces.
SystemTurnClock
The system clock.

Enums§

BuildError
Why an Orchestrator could not be built.
ResumeOutcome
What acting on a recovery decision achieved (spec §23.1).

Traits§

CaseDirectory
Names the cases an actor may address (spec §23 step D, §25.4).
TurnClock
Source of the runtime’s own clock, so a turn is testable without waiting.
TurnConsequences
What a turn’s writes imply on OTHER cases (spec §23 step M).

Functions§

error_code
A stable code for an orchestrator failure, safe to put on the wire.