import type { Profile } from "../profiles/types.js"; export interface RunRestoreOptions { profile: Profile; /** مسار الأرشيف الكامل. */ archive: string; /** اسمه وحده — يُكتب في ملفّ التقدّم لتعرف اللوحة أيّ نسخةٍ تُستعاد. */ archiveId?: string; /** سطرٌ لمن يقرأ السجلّ أو الطرفية. لا علاقة له بالشريط. */ onLine?: (line: string) => void; } export type RestoreOutcome = { ok: true; written: number; } /** ‎rolledBack‎ كاذبة تعني: الجهاز ليس على النسخة ولا على ما كان. أسوأ حالة، وتُقال كما هي. */ | { ok: false; reason: string; rolledBack: boolean; }; /** * AR: يستعيد أرشيفًا. **لا يرمي على فشلٍ متوقَّع**: مُناديه الثاني عمليةٌ بلا إنسانٍ أمامها تكتب * الجواب في ملفّ ثمّ تخرج. * * **ولا يسأل شيئًا أبدًا.** مِحَثٌّ في مسارٍ بلا طرفية يُعلّق العملية إلى الأبد — والتأكيد * مسؤولية المُنادي: الأمرُ يسأل في الطرفية، واللوحة تعرض تحذيرها قبل الضغطة. * EN: Restores an archive. **It does not throw on an expected failure**: its second caller is a * process with nobody in front of it, which writes the answer into a file and exits. * * **And it never asks anything.** A prompt on a path with no terminal hangs the process forever — * and the confirmation belongs to the caller: the command asks at the terminal, and the dashboard * shows its warning before the press. */ export declare function runRestore(options: RunRestoreOptions): Promise; //# sourceMappingURL=run-restore.d.ts.map