@@ -11,12 +11,13 @@ counts as an additive (minor) versus breaking (major) change. Use the
1111
1212## [ Unreleased]
1313
14+ ## [ 0.2.0] - 2026-05-30
15+
1416### Added
1517
16- - Inspection API: a live observer sink for an instance's runtime activity (xstate
17- v5 ` createActor(logic, { inspect }) ` parity). An ` Inspector ` (or the
18- ` InspectorFunc ` closure adapter) receives ` InspectionEvent ` s tagged by
19- ` InspectKind ` — an event received, a transition taken (carrying the live ` Trace ` ),
18+ - Inspection API: a live observer sink for an instance's runtime activity. An
19+ ` Inspector ` (or the ` InspectorFunc ` closure adapter) receives
20+ ` InspectionEvent ` s tagged by ` InspectKind ` — an event received, a transition taken (carrying the live ` Trace ` ),
2021 a snapshot update, an actor spawned/stopped, and a message sent/delivered between
2122 actors. Registered with ** ` WithInspector ` ** at ` Cast ` for the kernel-owned
2223 event/transition/snapshot stream, and ** ` ActorSystem.WithActorInspector ` ** for the
@@ -26,15 +27,15 @@ counts as an additive (minor) versus breaking (major) change. Use the
2627 registered inspector, never IO).
2728- ** ` WaitFor(ctx, inst, predicate, ...opts) ` ** : a host-side helper that drives an
2829 instance until a predicate over its ` Snapshot ` holds, or the context/` timeout `
29- budget elapses (xstate v5 ` waitFor(actor, predicate, { timeout }) ` parity) . It
30+ budget elapses. It
3031 checks the predicate immediately, then advances a host driver one step at a time —
3132 ** ` WithWaitScheduler ` ** ticks a ` Scheduler ` over a ` FakeClock ` so ` after ` -driven
3233 machines progress deterministically, or ** ` WithWaitStepFunc ` ** supplies a bespoke
3334 driver. Time is measured on the instance's clock (a ` FakeClock ` in tests), so the
3435 whole wait is deterministic with no real sleeping. Returns the matching snapshot,
3536 or the typed ** ` *WaitTimeoutError ` ** on budget exhaustion. Helpers
3637 ** ` WaitInState ` ** and ** ` WaitDone ` ** cover the common predicates.
37- - Path enumeration in ` state/analysis ` (the ` @xstate/graph ` analog) :
38+ - Path enumeration in ` state/analysis ` :
3839 ** ` ShortestPaths(m) ` ** returns the shortest event sequence from the initial state
3940 to every reachable state — the multi-target generalization of the kernel's
4041 ` PlanPath ` — and ** ` SimplePaths(m) ` ** enumerates every acyclic (simple) path to
@@ -45,8 +46,7 @@ counts as an additive (minor) versus breaking (major) change. Use the
4546 structural scenario set a conformance harness draws coverage from. Paths expose
4647 ` Events() ` , ` States(initial) ` , and ordered ` Step ` s.
4748- Deep persistence / snapshots: capture a running ` Instance ` 's full runtime state
48- and restore it to resume from exactly that point (xstate v5
49- ` getPersistedSnapshot ` / ` createActor(logic, { snapshot }) ` parity). The IR's
49+ and restore it to resume from exactly that point. The IR's
5050 ` ToJSON ` / ` LoadFromJSON ` persist the machine DEFINITION; a snapshot persists the
5151 INSTANCE runtime state — a different thing.
5252 - ** ` Instance.Snapshot() ` ** returns a serializable ` Snapshot[S, E, C] ` capturing
@@ -59,7 +59,7 @@ counts as an additive (minor) versus breaking (major) change. Use the
5959 mutates, or consults a clock — so ` Fire ` stays pure.
6060 - ** ` Machine.Restore(snap, ...) ` ** rebuilds an ` Instance ` resuming at the
6161 snapshot's configuration, context, and history WITHOUT re-running entry actions
62- (resume, not re-enter — matching xstate ). It validates the snapshot's machine
62+ (resume, not re-enter). It validates the snapshot's machine
6363 name and every configuration leaf, returning the typed ` *SnapshotError ` on a
6464 mismatch, unknown leaf, or empty configuration. Wire a clock with
6565 ` WithRestoreClock ` .
@@ -90,8 +90,8 @@ counts as an additive (minor) versus breaking (major) change. Use the
9090 ` onError ` routing, host-driven so ` Fire ` stays pure.
9191 - ** Start/stop effects.** Entering a state that declares an ` invoke ` emits a
9292 ` StartService{ID, Src, Input, OnDone, OnError, State} ` effect; exiting it
93- before the service completes emits a ` StopService{ID} ` effect (xstate v5
94- auto-stop-on-exit). The kernel never runs a service, never starts a goroutine,
93+ before the service completes emits a ` StopService{ID} ` effect
94+ ( auto-stop-on-exit). The kernel never runs a service, never starts a goroutine,
9595 and performs no IO — it emits these as data alongside the transition's other
9696 effects, and a host runtime runs the service and feeds the result back through
9797 ` Fire ` . Invoke IDs are stable per ` (machine, owning state, invoke index) ` or
@@ -114,7 +114,7 @@ counts as an additive (minor) versus breaking (major) change. Use the
114114 - ** Trace & IR.** Service start/stop record microsteps; the ` invoke ` block (id,
115115 src ref + params, input, onDone/onError) round-trips losslessly through JSON.
116116- Actor model: child-machine actors, an actor system, mailboxes, delivery, and
117- lifecycle, for xstate v5 actor parity — host-driven so ` Fire ` stays pure and the
117+ lifecycle, host-driven so ` Fire ` stays pure and the
118118 kernel stays stdlib-only.
119119 - ** Spawn/stop effects.** Entering a state that invokes a child ` Machine `
120120 (` InvokeActor ` ) emits a `SpawnActor{ID, Src, Input, OnDone, OnError, State,
@@ -152,7 +152,7 @@ counts as an additive (minor) versus breaking (major) change. Use the
152152 through JSON, and a dynamic ` Spawn ` built-in's params survive too; actor refs are
153153 runtime and intentionally absent from the IR.
154154- Actor communication actions: the action-level send/stop sugar on top of the
155- actor runtime, for xstate v5 parity — built-in actions that emit data effects the
155+ actor runtime — built-in actions that emit data effects the
156156 ` ActorSystem ` routes, so ` Fire ` stays pure.
157157 - ** Send/stop built-in actions.** ` SendTo(targetID, event, ...) ` emits a
158158 ` SendTo{TargetID, SystemID, Event} ` effect the system delivers to the addressed
@@ -179,8 +179,8 @@ counts as an additive (minor) versus breaking (major) change. Use the
179179 declarative ` after ` representation drivable, while keeping ` Fire ` pure.
180180 - ** Schedule/cancel effects.** Entering a state that declares an ` after `
181181 transition emits a ` ScheduleAfter{ID, Delay, Event, State} ` effect; exiting it
182- before the delay elapses emits a ` CancelScheduled{ID} ` effect (xstate v5
183- auto-cancel-on-exit). The kernel never reads a clock and never sleeps — it
182+ before the delay elapses emits a ` CancelScheduled{ID} ` effect
183+ ( auto-cancel-on-exit). The kernel never reads a clock and never sleeps — it
184184 emits these as data alongside the transition's other effects, and a host
185185 runtime owns the real timer and feeds the delayed event back through ` Fire ` .
186186 Schedule IDs are stable per ` (machine, source state, delayed edge) ` ; derive
@@ -197,7 +197,7 @@ counts as an additive (minor) versus breaking (major) change. Use the
197197 - ** Trace & IR.** Schedule, cancel, and delayed fires record microsteps; the
198198 ` after ` delay + target round-trip losslessly through JSON, and visualization
199199 annotates a delayed edge with its delay.
200- - Guard combinators and the ` stateIn ` built-in, for xstate v5 guard parity .
200+ - Guard combinators and the ` stateIn ` built-in.
201201 - ** Combinators.** ` And(...) ` , ` Or(...) ` , and ` Not(...) ` compose guards into a
202202 serializable boolean expression tree whose leaves are named-ref guards
203203 (` Guard(name, params...) ` ) or the ` stateIn ` built-in, nested to any depth
@@ -221,7 +221,7 @@ counts as an additive (minor) versus breaking (major) change. Use the
221221 classifies composite-guard leaves (including ` stateIn ` targets) as guard
222222 requirements, and the ` analysis ` and visualization passes treat a transition
223223 with a ` GuardExpr ` as guarded.
224- - Transition-semantics parity with xstate v5 : wildcard, forbidden, ` reenter ` , and
224+ - Transition semantics : wildcard, forbidden, ` reenter ` , and
225225 ` raise ` .
226226 - ** Wildcard catch-all.** ` Transition.Wildcard ` (DSL ` OnAny() ` ) matches any event
227227 no specific ` On ` -keyed transition of the state handles. It is the lowest-priority
@@ -231,8 +231,8 @@ counts as an additive (minor) versus breaking (major) change. Use the
231231 ` ForbidAny() ` ) blocks an event at a state: the event is consumed and ignored and,
232232 unlike an unhandled event, does NOT bubble to ancestors.
233233 - ** ` reenter ` / internal-by-default.** A self- or ancestor-targeted transition is
234- now internal by default (its effects run with no exit/re-entry of the source),
235- matching v5. ` Transition.Reenter ` (DSL ` Reenter() ` ) forces the external form,
234+ now internal by default (its effects run with no exit/re-entry of the source).
235+ ` Transition.Reenter ` (DSL ` Reenter() ` ) forces the external form,
236236 running the target's exit then entry. Existing transitions are unaffected:
237237 ordinary transitions to a distinct target keep their full cascade.
238238 - ** ` raise ` .** ` Transition.Raise ` (DSL ` Raise(events...) ` ) enqueues internal events
@@ -299,5 +299,6 @@ Initial release of the pure state-machine kernel.
299299 clock/ID seams for determinism.
300300- Reusable conformance harness with golden scenarios.
301301
302- [ Unreleased ] : https://github.com/stablekernel/crucible/compare/state/v0.1.0...HEAD
302+ [ Unreleased ] : https://github.com/stablekernel/crucible/compare/state/v0.2.0...HEAD
303+ [ 0.2.0 ] : https://github.com/stablekernel/crucible/releases/tag/state/v0.2.0
303304[ 0.1.0 ] : https://github.com/stablekernel/crucible/releases/tag/state/v0.1.0
0 commit comments