FreakingGenius - v0.1.0
    Preparing search index...

    Governs the tutor's high-level behavior through explicit state transitions.

    const fsm = new StateMachine();
    fsm.onTransition((t) => console.log(`${t.from}${t.to}`));
    fsm.transition(TutorStateType.LISTENING);
    Index

    Constructors

    Methods

    • Attempts to transition to a new state. Throws if the transition is not valid from the current state.

      Parameters

      • to: TutorStateType

        The target TutorStateType.

      • Optionalreason: string

        Optional human-readable reason for logging.

      • Optionalmetadata: Record<string, unknown>

        Optional metadata to attach to the new state.

      Returns void