/** * Centralized shutdown and signal handling for the CLI. * Ensures Ctrl+C always works and process exits cleanly. */ /** * Register a cleanup callback to run on shutdown */ export declare function onShutdown(callback: () => void | Promise): () => void; /** * Initiate authorized shutdown with cleanup */ export declare function authorizedShutdown(codeOrReason?: number | string): Promise; /** * Check if shutdown is in progress */ export declare function isShutdownInProgress(): boolean; /** * Get the shutdown reason if shutting down */ export declare function getShutdownReason(): string | undefined; /** * Install process-level signal handlers as fallback * This ensures Ctrl+C always works even if input handling fails */ export declare function installSignalHandlers(): void; /** * Reset Ctrl+C counter (call when input is processed to prevent double-counting) */ export declare function resetCtrlCCounter(): void; /** * Get current Ctrl+C count (for coordination with input handlers) */ export declare function getCtrlCCount(): number; //# sourceMappingURL=shutdown.d.ts.map