/** Structural mirror of `TaskState` in the plan store; kept here to avoid a cycle. */ export type TaskState = "pending" | "in_progress" | "done" | "failed" | "skipped"; export type TaskTransitionDenialCode = "terminal" | "retry-required" | "unsupported"; export interface TaskTransitionDenied { readonly allowed: false; readonly code: TaskTransitionDenialCode; readonly reason: string; } export type TaskTransitionResult = { readonly allowed: true; } | TaskTransitionDenied; /** True when no ordinary `task.update` may move the task any further. */ export declare function isTerminalTaskState(state: TaskState): boolean; /** * Decide whether `task.update` may move a task from `from` to `to`. * Re-asserting the current state is always allowed so idempotent retries and * note-only updates keep working. */ export declare function evaluateTaskTransition(from: TaskState, to: TaskState): TaskTransitionResult;