Add an event-driven transition
Add a state (optionally hierarchical with children)
Add a timeout-based transition: auto-transition after durationMs in fromState
Get the active child state (if current state is composite)
Get elapsed time in current state (ms)
Get full state path (e.g., 'combat.attacking.windup')
Get all tags from current state and children
Check if current state (or any ancestor) has a tag
Start the FSM
Force a transition
Update the FSM
Hierarchical state machine with composite states, event-driven transitions, timeout transitions, and state tags.
Usage: