import { type EventDef, type StateMachineDef } from "./state-machine.js"; import { type TaskState } from "./types.js"; export type TaskEvent = "plan" | "start" | "complete" | "archive"; export declare const defaultStateMachine: { readonly initial: "draft"; readonly states: readonly ["draft", "planned", "in-progress", "done", "archived"]; readonly events: { readonly plan: { readonly from: readonly ["draft"]; readonly to: "planned"; }; readonly start: { readonly from: readonly ["planned"]; readonly to: "in-progress"; }; readonly complete: { readonly from: readonly ["in-progress"]; readonly to: "done"; }; readonly archive: { readonly from: "*"; readonly to: "archived"; }; }; }; export declare function resolveStateMachine(stateMachine?: StateMachineDef): StateMachineDef; export declare function assertEvent(machine: StateMachineDef, fromState: TState, eventName: TEvent): EventDef; export declare function assertTransition(from: TaskState, to: TaskState): void; export declare function assertTransition(machine: StateMachineDef, from: TState, to: TState): void;