import type { SessionStatus } from "./types.js"; import { PreconditionError } from "./errors.js"; /** * Legal session state transitions, encoding the documented lifecycle diagram. * * Extended from the docs-site diagram with pragmatic additions: * pending and suspended sessions must be killable (→ stopped). */ export declare const SESSION_TRANSITIONS: ReadonlyMap>; /** Whether transitioning from `from` to `to` is legal per the session lifecycle. */ export declare function isValidTransition(from: SessionStatus, to: SessionStatus): boolean; /** Thrown when code attempts an illegal session state transition. */ export declare class InvalidSessionTransitionError extends PreconditionError { readonly from: SessionStatus; readonly to: SessionStatus; constructor(from: SessionStatus, to: SessionStatus); } /** * Assert that transitioning from `from` to `to` is legal. * Same-state transitions are no-ops. Illegal transitions throw * {@link InvalidSessionTransitionError}. */ export declare function assertTransition(from: SessionStatus, to: SessionStatus): void; //# sourceMappingURL=session-state-machine.d.ts.map