Skip to content

interactionModel

const interactionModel: StateMachine<never, { type: string; }, {[key: string]: AnyActor; }, "waiting" | "idle", string, unknown, { }, { type: string; }, never, object & object, Record<string, (…args) => void | { children?: any; context?: any; }>, Record<string, AnyActorLogic>, Record<string, Function>, Record<string, number | Function>, never, never> & object & MachineIdentity<{ id: "arona/interaction"; initial: "idle"; states: { idle: { on: { arrive: { target: "waiting"; }; }; }; waiting: { on: { expire: { target: "idle"; }; start: { target: "idle"; }; }; }; }; }>

Defined in: packages/core/src/state-machine/index.ts:642

A buffered interaction waiting for a writer lease.

idle ──arrive──▶ waiting ──start──▶ idle
│
└──expire──▶ idle

The wait is bounded by the caller’s deadline: a press that loses the lease race waits briefly for the current writer, then either runs (start) or is dropped with an explicit expire. Both outcomes return to idle; the handler itself runs inside the lease and is not a state of this machine. This is the “coyote time” for a user action that arrives just outside the legal window.

states: object

readonly id: "arona/interaction" = "arona/interaction"

readonly initial: "idle" = "idle"

readonly states: object

readonly idle: object

readonly on: object

readonly arrive: object

readonly target: "waiting" = "waiting"

readonly waiting: object

readonly on: object

readonly expire: object

readonly target: "idle" = "idle"

readonly start: object

readonly target: "idle" = "idle"