Kaizen
Browse modulesLifecyclelifecycle/serverInterfaces

Interface: CompiledMachine

Defined in: shared/lifecycle/types/machine.ts:71

A compiled, validated machine produced by defineMachine. Carries an indexed transition map for O(1) (from, event) resolution plus a normalized content hash (machineVersion) that is stable across deploys.

Properties

initial

readonly initial: string;

Defined in: shared/lifecycle/types/machine.ts:74


machineVersion

readonly machineVersion: string;

Defined in: shared/lifecycle/types/machine.ts:82

Normalized content hash over the sorted states/events/transitions/guard names. Reproducible across deploys; recorded on every transition row so a machine-definition change is visible in history.


name

readonly name: string;

Defined in: shared/lifecycle/types/machine.ts:72


states

readonly states: readonly string[];

Defined in: shared/lifecycle/types/machine.ts:73


terminalStates

readonly terminalStates: ReadonlySet<string>;

Defined in: shared/lifecycle/types/machine.ts:75


transitions

readonly transitions: readonly CompiledTransition[];

Defined in: shared/lifecycle/types/machine.ts:76


unreachableStates

readonly unreachableStates: readonly string[];

Defined in: shared/lifecycle/types/machine.ts:84

States with no inbound edge other than the initial state (warnings only).


xstateMachine

readonly xstateMachine: AnyStateMachine;

Defined in: shared/lifecycle/types/machine.ts:92

The XState v5 machine compiled from transitions. It is the runtime AUTHORITY for the graph: resolve/eventsFrom consult it for legality and targets. Built with NO guards and NO actions in setup() — XState never evaluates a guard or runs an effect; those stay engine-owned. Terminal states are type:"final"; allowSelf edges are explicit self-targets.

Methods

eventsFrom()

eventsFrom(state: string): string[];

Defined in: shared/lifecycle/types/machine.ts:96

All events legal from a given state (terminal → empty).

Parameters

ParameterType
statestring

Returns

string[]


hasState()

hasState(state: string): boolean;

Defined in: shared/lifecycle/types/machine.ts:98

Parameters

ParameterType
statestring

Returns

boolean


isTerminal()

isTerminal(state: string): boolean;

Defined in: shared/lifecycle/types/machine.ts:97

Parameters

ParameterType
statestring

Returns

boolean


resolve()

resolve(from: string, event: string): CompiledTransition | undefined;

Defined in: shared/lifecycle/types/machine.ts:94

Resolve the edge for a (from, event) pair, or undefined if none.

Parameters

ParameterType
fromstring
eventstring

Returns

CompiledTransition | undefined

On this page