/** * Graceful Shutdown — 优雅退出处理器 * * 封装服务关闭流程:可靠性资源清理、平台适配器停止、事件监听解除等。 * 通过依赖注入解耦,方便测试和内嵌模式复用。 */ export interface GracefulShutdownDependencies { reliabilityLifecycle: { cleanup: () => Promise; }; feishuClient: { stop: () => void; off: (event: string, handler: (...args: any[]) => void) => void; }; opencodeClient: { disconnect: () => void; }; getCachedAdapter: (platform: string) => { stop: () => void; } | null; clearCache: () => void; outputBuffer: { clearAll: () => void; }; delayedResponseHandler: { cleanupExpired: (ms: number) => void; }; questionHandler: { cleanupExpired: (ms: number) => void; }; onFeishuMessage: (...args: any[]) => void; onFeishuChatUnavailable: (...args: any[]) => void; runningInstanceRef: { current: { stop: () => Promise; } | null; }; } export interface GracefulShutdownResult { shutdown: (signal: string) => Promise; signalHandlers: { sigintHandler: () => void; sigtermHandler: () => void; sigusr2Handler: () => void; }; } export declare function createGracefulShutdown(deps: GracefulShutdownDependencies): GracefulShutdownResult; //# sourceMappingURL=shutdown.d.ts.map