Structural description of a forbidden statechart transition.

Mirrors the ForbiddenTransition interface from @causl/sync/src/statechart-reducers.ts exactly so the seam's input/output types are structurally interchangeable with the TS reducers' public shape. The tuple (region, from, to, id) is enough for a wiring shell to construct a public typed error and enough for a future Rust port (issue #1068's engine-rs-core statechart_reducers enums, gated behind feature = "future") to map the rejection onto its own enum without rewriting the decision logic.

Kept structural (not a class, not a thrown value) so the reducer stays a pure function. The shell decides whether to throw; the reducer decides whether the chart permitted the edge.

  • issue #698 — extract pure statechart reducers.
  • issue #1068 — Rust enums + this BackendEngine.evaluateStatechart extension point.
  • packages/sync/src/statechart-reducers.ts — TS reducer source of truth.
interface ForbiddenStatechartTransition {
    from: string;
    id: string;
    region: "resource" | "conflict";
    to: string;
}

Properties

Properties

from: string

Source state tag as the chart names it. For the conflict region this includes the synthetic 'unknown' tag (the registry has never observed the id); the chart itself has no Unknown state.

id: string

The node id the event targeted.

region: "resource" | "conflict"

Which orthogonal region the rejection comes from.

to: string

Target state tag the rejected event would have moved to.