Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConditionEvaluator ¶ added in v0.3.0
ConditionEvaluator is a function that determines if a transition condition is met.
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is the core state machine runner.
func NewEngine ¶
func NewEngine(loader ports.GraphLoader) *Engine
NewEngine creates a new engine with dependencies.
func (*Engine) Inspect ¶ added in v0.3.0
Inspect returns a structured view of the entire graph by walking all nodes.
func (*Engine) SetEvaluator ¶ added in v0.3.0
func (e *Engine) SetEvaluator(eval ConditionEvaluator)
SetEvaluator sets the condition evaluator for the engine.
func (*Engine) Step ¶
func (e *Engine) Step(ctx context.Context, currentState *domain.State, input string) ([]domain.ActionRequest, *domain.State, error)
Step executes a single step in the state machine. It loads the current node, evaluates transitions, and returns action requests. For MVP, it doesn't persist state, just inputs state and outputs next state + actions. But wait, the Step function usually takes the current State and Input? BOOTSTRAP: "- Input: Estado Atual + Grafo de Decisão + Input do Usuário."