export declare const RESTART_PENDING_FILE: string; export declare const RESTART_FAILED_LOG: string; /** Metadata about who triggered the restart, persisted across the * parent → child boundary so the new daemon can ack the right thread. */ export interface RestartInitiator { /** Source layer that initiated. Determines who receives the completion * message. */ source: 'im' | 'web' | 'cli'; /** IM platform name as set on MessageContext by the inbound adapter * (wechat / telegram / feishu / dingtalk / discord). Note: this is * the short form used in MessageContext, NOT necessarily the same * string the adapter registers under in registry.ts — restart- * completion's resolveMessenger() bridges that gap. * Empty when source !== 'im'. */ platform?: string; channelId?: string; threadId?: string; userId?: string; /** Message the user sent that triggered this restart (truncated to 120 * chars). Helps the completion message say "✅ 已重启" rather than just * appearing unprompted. */ initialText?: string; } export interface PendingState { version: 1; initiator: RestartInitiator; started_at: number; prev_pid: number; prev_version: string; /** Best guess at when the new daemon should be up. Used by stale * detection — pending files older than this + 5 minutes get garbage * collected on next startup. */ expected_complete_by: number; } export interface InitiateResult { ok: boolean; /** Friendly text the caller should surface back to the user. On success * this is a "重启中..." ack; on failure it's an error explanation. */ message: string; /** Why we refused, when ok=false. Programmatic. */ errors?: string[]; } export declare function initiateRestart(initiator: RestartInitiator): Promise; //# sourceMappingURL=restart-flow.d.ts.map