import { networkInterfaces } from "node:os"; import type { DeviceInfo } from "../contracts/core.js"; import type { Profile } from "../profiles/types.js"; import type { PortConflict } from "../probes/port.probe.js"; import type { StartOutcome, StopStep } from "../supervisor/orchestrator.js"; /** * AR: عناوين هذه الآلة على الشبكة، **مرتّبةً بالأرجحية**. * * كانت الدالّة تُعيد «أوّل عنوان IPv4 غير محلّي» — وهو ترتيبُ ويندوز لبطاقاته لا ترتيبُ * صلاحيتها. على آلة الاختبار كان الأوّل ‎192.168.56.1‎ (بطاقة VirtualBox المضيفة) بينما * الشبكة الحقيقية ‎192.168.1.6‎ على الواي-فاي؛ فالسطر المعروض للمالك ليكتبه في هاتفه كان * عنوانًا **لا يفتح شيئًا من أي هاتف** — وهو أسوأ من غياب السطر، لأن الفشل يُقرأ عطبًا في * النظام لا خطأً في العنوان. * EN: This machine's addresses on the network, **ordered by likelihood**. * * The function used to return "the first non-internal IPv4" — which is Windows' ordering of its * cards, not an ordering of their usefulness. On the test machine the first was `192.168.56.1` * (VirtualBox's host-only card) while the real network was `192.168.1.6` over Wi-Fi; so the line * printed for the owner to type into his phone was an address that **opens nothing from any * phone** — worse than no line at all, because the failure reads as a fault in the system rather * than a wrong address. */ export declare function lanAddresses(): string[]; /** نواة الترتيب، مفصولةً عن ‎os‎ لتُختبَر بواجهاتٍ مُصطنعة بدل شبكة آلة البناء. */ export declare function rankLanAddresses(interfaces: ReturnType): string[]; /** أرجح عنوان: هو ما يكتبه المالك في هاتفه للدخول على الجهاز من الشبكة. */ export declare function lanAddress(): string | undefined; /** * AR: عنوان شاشة التفعيل على هذه الآلة. يُطبع كلّما كان الجهاز محجوبًا: **الرسالة التي تقول * «غير مفعَّل» بلا عنوانٍ يُفتح تترك الفنّي يخمّن المسار.** ‎undefined‎ حين لا منفذ في * ملفّ التشغيل أصلًا. * EN: The activation screen's address on this machine. Printed whenever the appliance is blocked: * **a message saying "not activated" without an address to open leaves the technician guessing * the path.** `undefined` when the profile has no port at all. */ export declare function activationUrl(profile: Profile): string | undefined; /** * AR: العناوين الأربعة التي يحتاجها من يقف أمام الجهاز — **وهي أربعة لا اثنان**. * * ‎Portal‎ ما يفتحه الضيف، و‎Login‎ باب المالك، و‎Dashboard‎ اللوحة نفسها بعد الدخول، * و‎Network‎ العنوان الذي يُكتب في هاتفٍ على شبكة الاستراحة. كان السطران الأخيران غائبين: * المالك يعرف أن ثمّة لوحة ولا يعرف مسارها، ومن أراد الاختبار من جوّاله كان يقرأ * ‎localhost‎ — وهو على جهازه هو، لا على الجهاز. * EN: The four addresses whoever stands at the machine needs — **four rather than two**. * * `Portal` is what a guest opens, `Login` the owner's door, `Dashboard` the panel itself once * signed in, and `Network` the address typed into a phone on the rest-house network. The last * two were missing: the owner knew a dashboard existed without knowing its path, and anyone * testing from a phone read `localhost` — which is their own device, not the appliance. */ export type PortalUrls = { portal: string; login: string; dashboard: string; /** ‎null‎ حين لا واجهة شبكة خارجية على هذه الآلة — لا عنوان يُكتب في هاتف. */ network: string | null; /** * AR: بقيّة عناوين الآلة، مرتّبةً. **الترتيب ترجيحٌ لا يقين**، فآلةٌ عليها بطاقتان حقيقيّتان * (سلكية وواي-فاي) لا يعرف أحد أيّهما على شبكة الضيوف. طباعتها تجعل العنوان الخاطئ سطرًا * يُجرَّب غيرُه، لا طريقًا مسدودًا يُقرأ عطبًا في النظام. * EN: The machine's remaining addresses, in order. **The ranking is a guess, not a certainty**, and * on a machine with two real cards (wired and Wi-Fi) nobody knows which one is on the guest * network. Printing them turns a wrong address into a line with an alternative beside it, * rather than a dead end that reads as a fault in the system. */ networkAlternates: string[]; }; /** * AR: العناوين كبيانات لا كنصّ مرسوم. مصدرٌ واحد يقرأه الجدولُ في الطرفية و‎--json‎ معًا، فلا * يقول أحدهما ‎/admin‎ ويسكت الآخر عنه يوم يتغيّر مسار. * EN: The addresses as data rather than drawn text. One source read by both the terminal table and * `--json`, so one of them cannot say `/admin` while the other stays silent about it the day a * path changes. */ export declare function portalUrls(profile: Profile): PortalUrls | null; export declare function renderUrls(profile: Profile): string; /** * AR: تنبيه الجهاز المحجوب — يُطبع في ‎start‎ و‎status‎ معًا، ويغيب تمامًا حين تكون الرخصة سارية. * * **هذا هو السطر الذي كان ناقصًا.** الخدمات تُقلع على جهاز بلا رخصة — وهذا مقصود: النواة * يجب أن تعمل ليُفتَح المتصفّح على شاشة التفعيل أصلًا، وإيقاف الإقلاع كان سيمنع العلاج مع * المرض. لكن الطرفية كانت تقول «كل شيء يعمل» وتنتهي، فيفتح المالك البوّابة ويجد واجهةً * تنهار على كل نداء بلا كلمةٍ واحدة تشرح لماذا. * * ‎null‎ حين لا شيء يُقال: رخصةٌ سارية، أو نواةٌ لم تُسأل بعد (‎device === null‎) — والادّعاء * بأن الجهاز غير مفعَّل لأننا لم نستطع السؤال كذبةٌ بنفس حجم إخفاء الحقيقة. * * EN: The blocked-appliance notice — printed by both `start` and `status`, and absent entirely when * the licence is valid. * * **This is the line that was missing.** The services do start on an unlicensed machine, and * that is deliberate: the core must run for a browser to reach the activation screen at all, and * refusing to boot would withhold the cure along with the disease. But the terminal said * "everything is running" and stopped there, so the owner opened the portal and found an * interface collapsing on every call without one word explaining why. * * `null` when there is nothing to say: a valid licence, or a core that was never asked * (`device === null`) — claiming the machine is unactivated because we could not ask is a lie of * exactly the same size as hiding the truth. */ export declare function renderActivationNotice(profile: Profile, device: DeviceInfo | null): string | null; /** * AR: سطر الباقة عند الإقلاع — **يُطبع حين تكون هناك خدمةٌ غير مشمولة، ويُسكت حين تكون الباقة * شاملة.** سطرٌ يقول «كل شيء مشمول» في كل إقلاع ضجيجٌ يُتعلَّم تجاهله، ثم يُتجاهَل معه السطر * الذي كان يهمّ. * * ومن يقرأ مخرَج ‎start‎ ثم يبحث عن خدمةٍ لا تعمل يجب أن يجد السبب هنا لا بعد ساعة من * التشخيص: خدمة البث المباشر التي «لا تستجيب» قد تكون ببساطة خارج الباقة، والفرق بين * التشخيصين هو الفرق بين مكالمة مبيعات وليلةٍ ضائعة. * EN: The package line at boot — **printed when some service is not included, and silent when the * package covers everything.** A line saying "everything is included" on every boot is noise * that gets learned and ignored, and the line that mattered gets ignored with it. * * And whoever reads `start`'s output and then goes looking for a service that is not running * should find the reason here rather than an hour into diagnosis: a live service that "does not * respond" may simply be outside the package, and the difference between those two diagnoses is * the difference between a sales call and a lost night. */ export declare function renderPackageNotice(device: DeviceInfo | null): string | null; export declare function renderConflicts(conflicts: PortConflict[]): string; export declare function renderStartOutcome(outcome: StartOutcome): string; export declare function renderStopOutcome(steps: StopStep[]): string; //# sourceMappingURL=boot.render.d.ts.map