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§
- Case
Candidate - One case the actor may address in a conversation.
- Fixed
Turn Clock - A clock stopped at one instant, for tests and replays.
- Orchestrator
- The runtime that answers a turn (spec §29).
- Orchestrator
Builder - Collects everything one
Orchestratorneeds. - Static
Case Directory - A directory with a fixed list, for tests, examples and single-case surfaces.
- System
Turn Clock - The system clock.
Enums§
- Build
Error - Why an
Orchestratorcould not be built. - Resume
Outcome - What acting on a recovery decision achieved (spec §23.1).
Traits§
- Case
Directory - Names the cases an actor may address (spec §23 step D, §25.4).
- Turn
Clock - Source of the runtime’s own clock, so a turn is testable without waiting.
- Turn
Consequences - 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.