/** * Task state machine — defines valid transitions and guards. * * States: created → running | failed | cancelled | timed_out * running → completed | failed | cancelled | timed_out * * Terminal states reject all further transitions (first-writer-wins). */ import { type TaskState } from './types.js'; /** * Check whether a state transition is valid. */ export declare function isValidTransition(from: TaskState, to: TaskState): boolean; /** * Check whether a state is terminal (no further transitions). */ export declare function isTerminalState(state: TaskState): boolean; /** * Attempt a state transition. Returns the new state on success, * or null if the transition is invalid. */ export declare function transition(from: TaskState, to: TaskState): TaskState | null; /** * Map from terminal state to a human-readable reason. */ export declare const TERMINAL_REASONS: Record; //# sourceMappingURL=state-machine.d.ts.map