/** * Daemon State Machine * * Guards daemon lifecycle transitions to prevent illegal states. * * States: stopped → starting → running → stopping → stopped * ↓ * stale → stopping */ export type DaemonState = 'stopped' | 'starting' | 'running' | 'stopping' | 'stale'; export declare class DaemonStateMachine { private _state; private _listeners; get state(): DaemonState; /** Transition to a new state. Throws if the transition is illegal. */ transition(to: DaemonState): void; /** Register a listener for state transitions. Returns unsubscribe function. */ onTransition(listener: (from: DaemonState, to: DaemonState) => void): () => void; /** Check if a transition is legal without performing it. */ canTransition(to: DaemonState): boolean; } //# sourceMappingURL=state-machine.d.ts.map