Module phase

Module phase 

Source
Expand description

Declarative conversation phase management.

A PhaseMachine holds named Phases and evaluates guard-based transitions. Each phase carries an instruction (static or dynamic), optional tool filters, and async entry/exit callbacks.

The machine is owned by the control-lane task; no internal locking is required — &self for reads, &mut self for mutations.

Structs§

Phase
A conversation phase with instruction, tools, and transitions.
PhaseMachine
Evaluates transitions and manages phase entry/exit lifecycle.
PhasePreparation
A preparation effect that can materialize state before a phase is entered.
PhaseTransition
Record of a single phase transition for history/debugging.
Transition
A guard-based transition to a named target phase.
TransitionResult
Result of a phase transition, carrying the resolved instruction and any context to inject.

Enums§

InstructionModifier
A modifier that transforms a phase instruction based on runtime state.
PhaseInstruction
Instruction source for a phase — either a fixed string or a closure over state.
TransitionEvaluation
Result of evaluating outbound transitions.
TransitionTrigger
What caused a phase transition.