State Machine API
Reference for authoring and hosting portable snapshot state machines. The concepts are on State machines; the walkthroughs are Authoring a machine and Declarative authoring.
Trax.StateMachine
- Rules: the string-free vocabulary for declarative guards and reducers.
- Declarative data model:
Rule,Reduction,ContextSchema,DeclarativeModeland the engine definition. - IR format: the exported
machine.ir.json. - Migrations:
MigrateFromand forward-migrating stored drafts. - Result codes: the typed outcomes of advance, rehydrate and the draft operations.
- IrMachine: the engine built from a machine's IR, for a client that holds only the manifest.
Trax.StateMachine.Persistence
- AddStateMachines: discovering machines and wiring the subsystem in one call.
- Machine:
Machine<TState, TTrigger>and its builders. - ISnapshotEffect: the side effect a transition runs once, and its receipt.
- Persistence ports:
ISnapshotPrincipal,ISnapshotStore,ISnapshotDraftServiceand the stores. - IMachineInstances: system-owned instances, created and advanced from code.
- InvokedRun: the instance and owner a train a machine invokes acts for.
- Runtime integrity: the schema-hash handshake, divergence detection and the self-check.
- AddTraxStateMachineSelfCheck: the self-check as an ASP.NET Core health check.
Trax.StateMachine.Testing
- MachineConformance: checking a machine against its committed IR and corpus in a test.
Trax.StateMachine.Client
- .NET client: driving a served machine from Blazor, MAUI or another .NET service.
@traxsharp/state-machine (npm)
- TypeScript package: the engine twin, the stores and hooks, and the server clients.