import type { Profile } from "../profiles/types.js"; import type { BundleManifest } from "../contracts/core.js"; import { reportBundleOutcome } from "../acquire/bundle.js"; import { resolveUpdate, runUpdate } from "./run-update.js"; import type { UpdatePhase, UpdateTrigger } from "./progress-file.js"; import { failedBefore } from "./update-failures.js"; import { recoverInterruptedSwap } from "./interrupted-swap.js"; export type PreBootOutcome = "not-an-appliance" | "no-identity" | "unreachable" | "refused" | "cli-too-old" | "current" | "previously-failed" | "installed" | "failed"; export interface PreBootResult { outcome: PreBootOutcome; /** هل أُقلعت الخدمات داخل الخطوة؟ المُنادي يُقلعها فقط إن لم تُقلَع. */ servicesStarted: boolean; version?: string; } export interface PreBootReporter { info(line: string): void; /** نسبة التنزيل والتثبيت على الشريط كلّه، لمن يرسم شريطًا. */ progress?(percent: number): void; /** * المرحلة الجارية. المشرِف يغلق مُجيب الصيانة عند ‎starting‎ — قبل أن يُقلع ‎runUpdate‎ النواةَ على المنفذ * نفسه. */ phase?(phase: UpdatePhase): void; } /** ما يُحقَن في الاختبار؛ الافتراضات هي الحقيقيّة. */ export interface PreBootDeps { readManifest: (root: string) => BundleManifest | null | undefined; resolve: typeof resolveUpdate; run: typeof runUpdate; report: typeof reportBundleOutcome; /** افتراضيًّا الحقيقيّة (تعمل على ‎profile.runDir‎) — الاختبار يحقنها حين يعنيه الفرع. */ failedBefore?: typeof failedBefore; recover?: typeof recoverInterruptedSwap; } export declare function preBootStep(profile: Profile, options: { trigger: UpdateTrigger; reporter: PreBootReporter; product?: string; /** يجري داخل المشرِف (الإقلاع والنافذة) — لا يُوقَف وحدة النظام التي تحمله. */ insideSupervisor?: boolean; deps?: PreBootDeps; }): Promise; //# sourceMappingURL=pre-boot-step.d.ts.map