/** * Lifecycle state machine for idle cleanup and graceful exit. */ export interface LifecycleLiveState { liveSessions: number; liveTabs: number; launchingContexts: number; stagedCreates: number; } type CleanupState = 'idle' | 'in_progress' | 'finished'; export declare class LifecycleController { private readonly cfg; private lastActivityMs; private cleanupFinishedMs; private cleanupState; private liveState; constructor(cfg: { idleCleanupTimeoutMs: number; idleExitTimeoutMs: number; now?: () => number; }); private now; recordRequestStart(): void; recordRequestEnd(): void; recordInteractiveActivity(): void; syncLiveState(state: LifecycleLiveState): void; private hasLiveActivity; private hasLaunchingOrStagedWork; shouldRunCleanup(now?: number): boolean; shouldExit(now?: number): boolean; markCleanupStarted(_now?: number): void; markCleanupFinished(result: 'success' | 'aborted' | 'failed', now?: number): void; snapshot(): { cleanupState: CleanupState; liveState: LifecycleLiveState; }; } export declare const lifecycleController: LifecycleController; export {}; //# sourceMappingURL=lifecycle-controller.d.ts.map