export type HandoffRequestType = 'ask_question' | 'mcp' | 'path_approval'; export interface HandoffRoute { chatId: number; threadId?: number; } export interface UpdateHandoffResult { won: boolean; } export interface HandoffRecord { taskId: string; sessionId: string; question: Record; requestType: HandoffRequestType; route?: HandoffRoute; elicitId?: string; createdAt: string; status: 'pending' | 'answered' | 'expired' | 'cancelled'; answer?: unknown; answeredAt?: string; answerSource?: string; originalCommand: string; telegramMessageId?: number; } export declare function writeHandoff(record: HandoffRecord, handoffsDir?: string): Promise; export declare function readHandoff(taskId: string, handoffsDir?: string): Promise; export declare function deleteHandoff(taskId: string, handoffsDir?: string): Promise; export declare function listPendingHandoffs(handoffsDir?: string): Promise; export declare function withHandoffLock(taskId: string, handoffsDir: string, cb: () => Promise): Promise; export declare function updateHandoffAnswer(taskId: string, answer: unknown, source: string, handoffsDir?: string): Promise;