Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
Fix uninstall recovery and restore desktop completion flow (#4425)
mike-inkeepb8cd6fe9e803
diff --git a/.changeset/uninstall-lock-residue.md b/.changeset/uninstall-lock-residue.mdnew file mode 100644index 000000000..0e15aceb3--- /dev/null+++ b/.changeset/uninstall-lock-residue.md@@ -0,0 +1,13 @@+---+"@inkeep/open-knowledge": patch+"@inkeep/open-knowledge-desktop": patch+"@inkeep/open-knowledge-app": patch+"@inkeep/open-knowledge-core": patch+"@inkeep/open-knowledge-server": patch+---++Dismiss the macOS uninstall result after revealing its cleanup log. Restore the localized completion checklist with Cleanup log and Reveal in Finder controls, keeping progress visible while the original app exits and cleanup runs. Use a disposable profile, exit before Finder reveal, and fall back to the system result dialog if the helper fails or its renderer stops responding.++Allow uninstall and project deinitialization to recover malformed server-lock residue only after successful process and listener inspection finds no associated live server candidate. Preserve recovery of dead PID-only locks. Global-only uninstall can retain project state whose lock records another machine or an unverified owner; deinitialization still refuses those locks. Read failures, incomplete inspection, and live server candidates remain blockers. `ok clean` now reports access and ownership refusals, while `ok status`, `ok ps`, and `ok diagnose` identify live PID-only records as having an unverified owner. `ok stop` will not signal those records, even with `--force`.++Clean up owned temporary lock fixtures. Report dependent cleanup skips separately from root failures in human output, retain the JSON `failed[]` contract, and expose blocked dependent operations in an additional `blocked[]` array.diff --git a/docs/content/reference/cli.mdx b/docs/content/reference/cli.mdxindex e8e041d2c..8b1aefd1b 100644--- a/docs/content/reference/cli.mdx+++ b/docs/content/reference/cli.mdx@@ -121,6 +121,10 @@ Each project runs its own local server. These commands let you see and stop them| `ok stop` | Stop the server for the current directory — or pass a port, path, or PID to stop a specific server, or `all` to stop every server. Declines when something is still connected to the target, naming how many clients are attached; pass `--force` to stop it anyway. A server it cannot reach is stopped without the check || `ok clean` | Remove a stale lock file left behind by a crash (never touches live servers) |+`ok clean` retains a lock and exits `1` if it cannot read it, it records another machine, or it has no recorded owner and its PID is still alive locally. The error names the lock and explains what to check. For an unverified owner, inspect the named local PID and stop it if it is an OpenKnowledge server; do not delete the lock while that process is running.++`ok status`, `ok ps`, and the server-lock health check distinguish an unverified owner from a foreign host. `ok status --json` uses `state: "unverified-owner"` and includes the PID, with server liveness reported as unknown. `ok ps --json` uses the same status, `displayStatus: "unverified"`, and `null` for unrecorded host, port, and start time. The directory is the project root for current `.ok/local` and legacy `.ok` locks; it is `null` when a custom lock location does not establish a project root. Such records are not signal authority for `ok stop`, including with `--force`.+## Remote ControlServe this project's web UI and `/mcp` endpoint to your other devices through any HTTPS tunnel, both on one URL. See the [Remote Control overview](/docs/remote-control/overview) for the full setup and access-control model. Use [Connect remote agents](/docs/remote-control/connecting-agents) to point agents at the URL.@@ -160,8 +164,10 @@ Both `ok deinit` and `ok uninstall` wait for servers to exit before deleting the`ok deinit` needs the project's `.ok/` directory; once that directory is gone, it reports nothing to remove. Remove any retained Pi trust entry manually using its reported exact key and file, as described in [installation details](./what-open-knowledge-writes.mdx#pi-folder-trust).+Malformed filesystem residue does not by itself establish a running server. Cleanup can skip it after process and listener inspection succeeds and finds no associated live candidate. A read failure, incomplete inspection, or associated live server remains a blocker. Global-only uninstall can retain foreign-owned or ownership-unverified project state after the same local inspection; selecting project deinitialization keeps those ownership checks strict. Dead PID-only locks are recoverable. Human output lists root blockers once; JSON `failed[]` includes both direct failures and blocked dependent operations, with `blocked[]` providing the dependent subset.+Both commands print their plan and ask before acting; `--dry-run` previews without changing anything. Once `ok uninstall` has finished successfully, an interactive run also asks one optional question about why you're leaving — you can skip it, and `--yes`, `--json`, and non-interactive runs never ask. Anything you do answer is [sent to us](/docs/reference/what-open-knowledge-writes#what-leaves-your-machine).-On the macOS desktop app, **App menu → Uninstall OpenKnowledge…** lets you choose projects to deinitialize, confirm removal, and answer or skip the optional "why are you leaving?" screen. The app then quits before cleanup starts, so shutdown cannot recreate its settings. A separate macOS dialog reports the result: successful cleanup guides you through dragging the app to the Trash; incomplete cleanup points to a retained log so you can repair the problem and retry.+On the macOS desktop app, **App menu → Uninstall OpenKnowledge…** lets you choose projects to deinitialize, confirm removal, and answer or skip the optional "why are you leaving?" screen. The progress window stays visible while the original app quits and cleanup runs, so shutdown cannot recreate its settings. The same window then reports the result: successful cleanup guides you through dragging the app to the Trash; incomplete cleanup points to a retained log so you can repair the problem and retry.To remove the desktop app on the other platforms: on **Windows**, uninstall OpenKnowledge from **Settings → Apps → Installed apps**; on **Linux**, remove the package with your package manager (`sudo apt remove openknowledge` on Debian/Ubuntu, `sudo dnf remove OpenKnowledge` on Fedora/RHEL). Run `ok uninstall` first if you also want the rest of the footprint cleaned up — it works the same on every platform.diff --git a/knip.config.ts b/knip.config.tsindex e67c1c1cd..96d43e981 100644--- a/knip.config.ts+++ b/knip.config.ts@@ -139,7 +139,9 @@ export default {'packages/server': {entry: ['src/**/*.test.ts', 'src/parse-worker.ts'],project: 'src/**',- ignoreDependencies: ['@types/shell-quote'],+ ignoreDependencies: [+ '@types/shell-quote',+ ],},'packages/cli': {entry: ['src/**/*.test.ts', 'scripts/*.ts', 'tests/**/*.ts', 'src/parse-worker.ts'],@@ -150,6 +152,7 @@ export default {},'packages/desktop': {entry: [+ 'src/main/entry.ts','src/utility/server-entry.ts','src/utility/pty-host.ts','src/**/*.test.ts',diff --git a/packages/app/src/locales/ar/messages.json b/packages/app/src/locales/ar/messages.jsonindex 76d94fdc4..e6ebf37a5 100644--- a/packages/app/src/locales/ar/messages.json+++ b/packages/app/src/locales/ar/messages.json@@ -1189,6 +1189,7 @@"BVkqD9": ["تم إيقاف صيانة الفهرس مؤقتًا لأن سمة Git أخرى تتحكم في index.md. قم بتحديث .gitattributes بحيث تستخدم مسارات index.md المحددة النطاق merge=union، ثم حاول مرة أخرى."],+ "BVmgJG": ["يعرض «إظهار في Finder» التطبيق لتتمكن من سحبه إلى سلة المهملات."],"BWTzAb": ["يدوي"],"BY-g4_": ["إضافة نمط"],"Ba4D2x": ["تم استيراد القالب"],@@ -1466,6 +1467,7 @@"EPKVES": ["هل تحدّث «", ["skillName"], "» فوق تعديلاتك؟"],"EPwuTC": [["usedLabel"], " / ", ["sizeLabel"], " رمز مستخدَم"],"EQXPXf": ["التمرير إلى النهاية"],+ "ES1zFv": ["انقل OpenKnowledge.app إلى سلة المهملات"],"ETyvvg": ["لا توجد لغة مطابقة."],"EWCJFu": ["تم إنشاء ", ["target"]],"EWPtMO": ["كود"],@@ -1918,6 +1920,7 @@"JM_aq-": ["استخدم رابط https:// — لا يُسمح بـ http:// إلا للمضيف المحلي."],"JOcPqH": ["أحضر مستودعًا بعيدًا إلى هذا الجهاز."],"JOhCT9": ["الدفع يشمل"],+ "JReD69": ["تمت إزالة ملفات OpenKnowledge"],"JWsZlx": ["افتح مشروعًا للتحرير."],"JYj5R2": ["تصفح الملفات"],"JZ8cO6": ["فاتح أو داكن أو تتبع نظام التشغيل."],@@ -2203,6 +2206,7 @@"M7SqjM": ["إعادة فتح"],"M92_0q": ["إغلاق التعليق"],"M9597s": ["يجري تحضير رابط المشاركة..."],+ "MAVznT": ["تمت إزالة الإعدادات والتكاملات."],"MBKkUy": ["skills.sh غير متاح؛ تُعرض نتائج GitHub (بلا ترتيب حسب التثبيت)."],"MBfjUk": [[@@ -2994,6 +2998,7 @@["configFile"],"</0> في مشروعك، وهو الذي يحكم الفحص لهذا المشروع بالكامل. شغّل القواعد أو أوقفها وحرّر خياراتها هنا؛ وتُكتب التغييرات في الملف."],+ "V3JCWv": ["لم يكتمل التنظيف"],"V3iDh1": ["تحقّق من frontmatter المستندات مقابل ملفات JSON Schema القياسية (draft-06 أو draft-07 أو 2019-09 أو 2020-12). شغّل مخططًا للتحقق من المستندات التي تطابقها أنماطه؛ وتظهر المخالفات كتحذيرات ولا تمنع الكتابة أبدًا. استخدم «تحرير» لفتح ملف المخطط."],@@ -3424,6 +3429,7 @@"ZQJ1IV": ["تنشيط آخر تبويب في المحرر."],"ZQLDTl": ["أنشأ مجلدًا"],"ZQc7C8": ["اكتب للتحرير؛ <0>Cmd/Ctrl+Enter</0> يحفظ، و<1>Esc</1> يلغي."],+ "ZR-8iJ": ["تعذر عرض نتيجة التنظيف"],"ZSoojc": ["فشل الاستنساخ — تحقق من الرابط وحاول مرة أخرى (", ["status"], ")"],"ZU8VV_": ["فشلت الإزالة: ", ["error"]],"ZVOhXM": ["فشل تحديث المزامنة — ", ["detail"]],@@ -3606,6 +3612,7 @@"aSVmqV": ["لم يتم اكتشاف أي أداة ذكاء اصطناعي بعد. بعد تثبيت واحدة، اربطها من الإعدادات > هذا المشروع."],+ "aTDVi6": ["تم الاحتفاظ بمحتواك"],"aWlJai": ["يجري بدء تدفق تسجيل الدخول"],"aXkLuE": ["استجابة التطبيق مشوّهة"],"a_u4ck": ["يجري تحميل الوسوم"],@@ -3691,6 +3698,7 @@"bkQRMh": ["فقرة"],"blFttG": ["البحث في المشاريع"],"bmC18N": ["يجري مسح بيانات التعاون المحلية لـ «", ["docName"], "» قبل إعادة الاتصال."],+ "bmI-q1": ["تمت إزالة ملفات OpenKnowledge"],"bnOTEz": ["يجري الاسترجاع…"],"bn_MDX": ["لماذا يحتاج هذا إلى انتباه"],"bpMVIA": ["تعذّر تحويل هدف الرابط \"", ["shown"], "\" إلى هدف محلي في المشروع."],@@ -3804,6 +3812,7 @@"ciozf1": ["المهارة موجودة بالفعل في المشروع"],"cjtjry": ["تنقّل في سجل تنقّل OpenKnowledge إلى الخلف."],"cklVjM": ["الخط الزمني"],+ "clJ3qM": ["تم."],"cnGeoo": ["حذف"],"cqQyPB": ["اسم المجلد"],"crqzW5": ["أدوات الذكاء الاصطناعي"],@@ -5211,6 +5220,7 @@["2"],"». وسيتوقف كل ما يشير إليه في SKILL.md عن العمل إلى أن يُعاد إنشاؤه."],+ "psUrB1": ["لم تُمس ملفات Markdown والمهارات التي أنشأتها."],"psl2Sj": ["لا يزال تغييرك قيد الحفظ — أعد تشغيل الاختبار بعد قليل."],"ptQ3_N": ["فك الارتباط"],"pvnfJD": ["داكن"],@@ -5858,6 +5868,7 @@]],"vmahUq": ["قد لا يتم تحديث التسطيرات الموجودة على الفور."],+ "vmwZHP": ["أوشكنا على الانتهاء. إليك ما تم وما تبقى."],"vp5vfW": ["ساعة واحدة"],"vppAju": ["أين توضع المرفقات المضافة حديثًا."],"vqJXNe": ["تثبيت مهارة <0>open-knowledge-discovery</0>"],@@ -5905,6 +5916,9 @@"wSBXaS": ["إدارة ", ["rowLabel"]],"wT4iQr": ["افتح بحث المحرر المرئي مع توسيع عناصر الاستبدال."],"wTcjov": ["لا مساحة عمل"],+ "wTf1ag": [+ "ربما لم تتم إزالة بعض الملفات. افتح سجل التنظيف للاطلاع على التفاصيل. يمكنك إعادة فتح OpenKnowledge للمحاولة مرة أخرى."+ ],"wU8WyK": ["حقول العنصر"],"wVa83H": ["تعذّر إنشاء التقرير"],"wWtVYd": ["أدخل منفذًا بين 1 و65535."],@@ -6040,6 +6054,7 @@"xiv-dW": ["لا توجد ملفات بعد."],"xk133d": ["يثبّت المهارة في ", ["path"], " — الموقع الأول يحتفظ بنسختها الأصلية"],"xloBjn": ["المسار النسبي"],+ "xnWySt": ["قد يكون التنظيف ما زال جاريًا."],"xrVr_k": ["تعذّر إنشاء المهارة: ", ["0"]],"xsZhu-": ["رقم الصفحة"],"xtJgSe": ["يحزم هذا المصدر عدة مهارات — اختر ما تريد استيراده."],@@ -6103,6 +6118,7 @@"yQE2r9": ["يجري التحميل"],"yQyglE": ["لا توجد مستندات مطابقة"],"yR5LHI": ["أدخل قيمة ست عشرية من 6 خانات مثل #1A2B3C"],+ "yU_9ur": ["للقيام به."],"yUxR-Q": ["توسيع ", ["keyName"]],"yWSvcf": ["جذر المحتوى"],"yWWThY": ["مرجع الأصل"],diff --git a/packages/app/src/locales/ar/messages.po b/packages/app/src/locales/ar/messages.poindex effb44ef5..4cc00f451 100644--- a/packages/app/src/locales/ar/messages.po+++ b/packages/app/src/locales/ar/messages.po@@ -1901,6 +1901,10 @@ msgstr "القيم المسموح بها (فارغ = أي قيمة)"msgid "Allowed values for {field}"msgstr "القيم المسموح بها لـ {field}"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Almost done. Here's what happened and what's left."+msgstr "أوشكنا على الانتهاء. إليك ما تم وما تبقى."+#: src/editor/image-upload/index.tsmsgid "Already at {assetContentPath} — reusing."msgstr "موجود بالفعل في {assetContentPath} — يعاد استخدامه."@@ -2894,10 +2898,19 @@ msgstr "Claude Code (claude) غير مثبَّت أو غير موجود في PATmsgid "Claude Desktop"msgstr "Claude Desktop"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Cleanup didn’t finish"+msgstr "لم يكتمل التنظيف"+#: src/uninstall/UninstallNoticeScreen.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Cleanup log"msgstr "سجل التنظيف"+#: src/uninstall/UninstallApp.tsx+msgid "Cleanup may still be running."+msgstr "قد يكون التنظيف ما زال جاريًا."+#: src/components/settings/SearchSection.tsx#: src/components/SkillPluginBundleDialog.tsxmsgid "Clear"@@ -3037,6 +3050,8 @@ msgstr "يجري الاستنساخ..."#: src/components/ui/sheet.tsx#: src/editor/find-replace/FindReplaceBar.tsx#: src/lib/native-menu-catalog.ts+#: src/uninstall/UninstallApp.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Close"msgstr "إغلاق"@@ -5105,6 +5120,10 @@ msgstr "تم"msgid "Done"msgstr "تم"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "Done."+msgstr "تم."+#: src/components/ui/tag-pill-input.tsxmsgid "Double-click to edit"msgstr "انقر نقرًا مزدوجًا للتحرير"@@ -7726,6 +7745,10 @@ msgstr "يحافظ على توافق قاعدة معارفك مع Open Knowledgemsgid "Kept both — \"{0}\" is its own skill now"msgstr "تم الاحتفاظ بكليهما — «{0}» أصبحت مهارة قائمة بذاتها الآن"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Kept your content"+msgstr "تم الاحتفاظ بمحتواك"+#: src/components/settings/SearchSection.tsxmsgid "Key ending in {keyHint}"msgstr "مفتاح ينتهي بـ {keyHint}"@@ -8239,6 +8262,10 @@ msgstr "Markdown"msgid "Markdown checks do not apply to this file."msgstr "لا تنطبق فحوصات Markdown على هذا الملف."+#: src/uninstall/UninstallResultScreen.tsx+msgid "Markdown files and authored skills were left untouched."+msgstr "لم تُمس ملفات Markdown والمهارات التي أنشأتها."+#: src/components/EditorModeToggle.tsxmsgid "Markdown source"msgstr "مصدر Markdown"@@ -8453,6 +8480,10 @@ msgstr "نقل الكتلة"msgid "Move down"msgstr "تحريك لأسفل"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Move OpenKnowledge.app to the Trash"+msgstr "انقل OpenKnowledge.app إلى سلة المهملات"+#: src/components/SkillFileRenameDialog.tsxmsgid "Move or rename this file inside the skill — the path stays under references/ or scripts/."msgstr "انقل هذا الملف أو أعد تسميته داخل المهارة — يبقى المسار تحت references/ أو scripts/."@@ -9945,6 +9976,10 @@ msgstr "عدّل OpenKnowledge {subject}"msgid "OpenKnowledge edited a document"msgstr "عدّل OpenKnowledge مستندًا"+#: src/uninstall/UninstallResultScreen.tsx+msgid "OpenKnowledge files were removed"+msgstr "تمت إزالة ملفات OpenKnowledge"+#: src/lib/acp/tool-call-display.tsmsgid "OpenKnowledge imported {source}"msgstr "استورد OpenKnowledge {source}"@@ -11303,6 +11338,10 @@ msgstr "أُزيلت «{0}» من كل موقع آخر — ولا يزال مجmsgid "Removed \"{projectName}\" from recent projects. Its folder no longer exists."msgstr "أُزيل «{projectName}» من المشاريع الحديثة. لم يعد مجلده موجودًا."+#: src/uninstall/UninstallResultScreen.tsx+msgid "Removed OpenKnowledge files"+msgstr "تمت إزالة ملفات OpenKnowledge"+#. placeholder {0}: connection.label#. placeholder {1}: sharedChoice.peers#: src/components/settings/AgentConnectionDialogs.tsx@@ -11794,9 +11833,14 @@ msgstr "الكشف في مستعرض الملفات"#: src/components/command-palette-commands.ts#: src/lib/platform-labels.ts+#: src/uninstall/UninstallResultScreen.tsxmsgid "Reveal in Finder"msgstr "الكشف في Finder"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Reveal in Finder shows the app so you can drag it to the Trash."+msgstr "يعرض «إظهار في Finder» التطبيق لتتمكن من سحبه إلى سلة المهملات."+#: src/components/SkillOriginInline.tsxmsgid "Revert"msgstr "التراجع"@@ -12493,6 +12537,10 @@ msgstr "يجري الإعداد"msgid "Settings"msgstr "الإعدادات"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Settings and integrations were cleaned up."+msgstr "تمت إزالة الإعدادات والتكاملات."+#: src/components/settings/SettingsDialogShell.tsxmsgid "Settings content"msgstr "محتوى الإعدادات"@@ -13009,6 +13057,10 @@ msgstr "تعذّر إدراج بعض الملفات التي تم إفلاتهاmsgid "Some files are not listed — the working tree has too many changes."msgstr "بعض الملفات غير مدرجة: شجرة العمل تحتوي على تغييرات كثيرة جدًا."+#: src/uninstall/UninstallResultScreen.tsx+msgid "Some files may not have been removed. Open the cleanup log for details. You can reopen OpenKnowledge to try again."+msgstr "ربما لم تتم إزالة بعض الملفات. افتح سجل التنظيف للاطلاع على التفاصيل. يمكنك إعادة فتح OpenKnowledge للمحاولة مرة أخرى."+#: src/components/settings/SavedThemesTiles.tsxmsgid "Some saved themes aren’t shown because the theme folder exceeds the scan limit."msgstr "لا تظهر بعض السمات المحفوظة لأن مجلد السمات يتجاوز حد الفحص."@@ -14702,6 +14754,10 @@ msgstr "العنوان"msgid "To do"msgstr "للقيام به"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "To do."+msgstr "للقيام به."+#: src/lib/keyboard-shortcuts.tsmsgid "Toggle a bullet list."msgstr "بدّل القائمة النقطية."@@ -14960,6 +15016,10 @@ msgstr "اكتب للتحرير؛ <0>Cmd/Ctrl+Enter</0> يحفظ، و<1>Esc</1>msgid "Type to find a doc"msgstr "اكتب للعثور على مستند"+#: src/uninstall/UninstallApp.tsx+msgid "Unable to show the cleanup result"+msgstr "تعذر عرض نتيجة التنظيف"+#: src/components/McpConsentDialogBody.tsxmsgid "unavailable on this platform"msgstr "غير متاح على هذه المنصة"diff --git a/packages/app/src/locales/bn/messages.json b/packages/app/src/locales/bn/messages.jsonindex 25267717c..9421421df 100644--- a/packages/app/src/locales/bn/messages.json+++ b/packages/app/src/locales/bn/messages.json@@ -967,6 +967,7 @@"BVkqD9": ["সূচী রক্ষণাবেক্ষণ বিরাম দেওয়া হয়েছে কারণ অন্য Git বৈশিষ্ট্য নিয়ন্ত্রণ করে index.md। .gitattributes আপডেট করুন যাতে স্কোপযুক্ত index.md পাথগুলি merge=union ব্যবহার করে, তারপর আবার চেষ্টা করুন।"],+ "BVmgJG": ["Finder-এ দেখান অ্যাপটি দেখায়, যাতে আপনি সেটি ট্র্যাশে টেনে নিতে পারেন।"],"BWTzAb": ["ম্যানুয়াল"],"BY-g4_": ["প্যাটার্ন যোগ করুন"],"Ba4D2x": ["টেমপ্লেট আমদানি করা হয়েছে"],@@ -1194,6 +1195,7 @@"EPKVES": ["আপনার সম্পাদনার উপরে \"", ["skillName"], "\" হালনাগাদ করবেন?"],"EPwuTC": [["sizeLabel"], "-এর মধ্যে ", ["usedLabel"], " টোকেন ব্যবহৃত"],"EQXPXf": ["শেষে স্ক্রল করুন"],+ "ES1zFv": ["OpenKnowledge.app ট্র্যাশে সরান"],"ETyvvg": ["কোনো ভাষা মেলে না।"],"EWCJFu": [["target"], " তৈরি হয়েছে"],"EWPtMO": ["কোড"],@@ -1596,6 +1598,7 @@"JM_aq-": ["একটি https:// URL ব্যবহার করুন — http:// কেবল localhost-এর জন্য অনুমোদিত।"],"JOcPqH": ["একটি রিমোট রিপোজিটরি এই মেশিনে আনুন।"],"JOhCT9": ["পাঠানোতে অন্তর্ভুক্ত"],+ "JReD69": ["OpenKnowledge-এর ফাইল সরানো হয়েছে"],"JWsZlx": ["সম্পাদনা করতে একটি প্রকল্প খুলুন।"],"JYj5R2": ["ফাইল বেছে নিন"],"JZ8cO6": ["হালকা, গাঢ়, বা OS অনুসরণ করুন।"],@@ -1828,6 +1831,7 @@"M7SqjM": ["আবার খুলুন"],"M92_0q": ["মন্তব্য বন্ধ করুন"],"M9597s": ["শেয়ার URL প্রস্তুত করা হচ্ছে…"],+ "MAVznT": ["সেটিংস এবং ইন্টিগ্রেশন সরানো হয়েছে।"],"MBKkUy": ["skills.sh পাওয়া যাচ্ছে না; GitHub-এর ফলাফল দেখানো হচ্ছে (ইনস্টল অনুযায়ী ক্রম নেই)।"],"MBfjUk": [["0", "plural", { "one": ["#", " সংযুক্তি আপলোড হচ্ছে"], "other": ["#", " সংযুক্তি আপলোড হচ্ছে"] }]@@ -2527,6 +2531,7 @@["configFile"],"</0> ফাইল থেকে আসে, যা এই প্রকল্পের linting পুরোপুরি নিয়ন্ত্রণ করে। নিয়ম এখানে চালু বা বন্ধ করুন ও তাদের বিকল্প সম্পাদনা করুন; পরিবর্তন সেই ফাইলেই ফিরে লেখা হয়।"],+ "V3JCWv": ["পরিষ্কার করা শেষ হয়নি"],"V3iDh1": ["নথির frontmatter আদর্শ JSON Schema ফাইলের (draft-06, draft-07, 2019-09, বা 2020-12) বিপরীতে যাচাই করুন। কোনো স্কিমার গ্লোবের সঙ্গে মেলা নথিগুলো যাচাই করতে সেই স্কিমাটি চালু করুন; লঙ্ঘন সতর্কতা হিসেবে দেখা দেয় এবং কখনও লেখা আটকায় না। স্কিমা ফাইলটি খুলতে Edit ব্যবহার করুন।"],@@ -2894,6 +2899,7 @@"ZQJ1IV": ["শেষ সম্পাদক ট্যাব সক্রিয় করুন।"],"ZQLDTl": ["ফোল্ডার তৈরি হয়েছে"],"ZQc7C8": ["সম্পাদনা করতে লিখুন; <0>Cmd/Ctrl+Enter</0> সংরক্ষণ করে, <1>Esc</1> বাতিল করে।"],+ "ZR-8iJ": ["পরিষ্কার করার ফলাফল দেখানো যাচ্ছে না"],"ZSoojc": ["ক্লোন ব্যর্থ — URL যাচাই করে আবার চেষ্টা করুন (", ["status"], ")"],"ZU8VV_": ["সরানো ব্যর্থ: ", ["error"]],"ZVOhXM": ["সিঙ্ক হালনাগাদ করতে ব্যর্থ — ", ["detail"]],@@ -3057,6 +3063,7 @@"aSVmqV": ["এখনও কোনো AI টুল পাওয়া যায়নি। একটি ইনস্টল করার পর Settings > This project থেকে সেটি যুক্ত করুন।"],+ "aTDVi6": ["আপনার বিষয়বস্তু রাখা হয়েছে"],"aWlJai": ["সাইন-ইন প্রক্রিয়া শুরু করা হচ্ছে"],"aXkLuE": ["অ্যাপ্লাই প্রতিক্রিয়ার গঠন ত্রুটিপূর্ণ"],"a_u4ck": ["ট্যাগ লোড হচ্ছে"],@@ -3129,6 +3136,7 @@"bkQRMh": ["অনুচ্ছেদ"],"blFttG": ["প্রকল্প খুঁজুন"],"bmC18N": ["পুনরায় যুক্ত হওয়ার আগে \"", ["docName"], "\"-এর স্থানীয় সহযোগিতা তথ্য মুছে ফেলা হচ্ছে।"],+ "bmI-q1": ["OpenKnowledge-এর ফাইল সরানো হয়েছে"],"bnOTEz": ["আনা হচ্ছে…"],"bn_MDX": ["কেন এটির প্রতি মনোযোগ প্রয়োজন"],"bpMVIA": ["লিংকের লক্ষ্য \"", ["shown"], "\"-কে প্রকল্পের স্থানীয় লক্ষ্য হিসেবে নির্ণয় করা যায়নি।"],@@ -3226,6 +3234,7 @@"ciozf1": ["ইতিমধ্যে প্রকল্পে দক্ষতা"],"cjtjry": ["OpenKnowledge-এর নেভিগেশন ইতিহাসে পিছনে যান।"],"cklVjM": ["কালানুক্রম"],+ "clJ3qM": ["সম্পন্ন।"],"cnGeoo": ["মুছুন"],"cqQyPB": ["ফোল্ডারের নাম"],"crqzW5": ["AI টুল"],@@ -4422,6 +4431,7 @@["1"]," স্থায়ীভাবে সরিয়ে দেয়। SKILL.md-এ যা কিছু সেটির দিকে নির্দেশ করে, তা পুনরায় তৈরি না করা পর্যন্ত কাজ করবে না।"],+ "psUrB1": ["Markdown ফাইল এবং আপনার তৈরি স্কিল অপরিবর্তিত রাখা হয়েছে।"],"psl2Sj": ["আপনার পরিবর্তন এখনও সংরক্ষিত হচ্ছে — একটু পরে পরীক্ষাটি আবার চালান।"],"ptQ3_N": ["আনলিংক করুন"],"pvnfJD": ["গাঢ়"],@@ -4954,6 +4964,7 @@]],"vmahUq": ["বিদ্যমান আন্ডারলাইনগুলো সঙ্গে সঙ্গে আপডেট নাও হতে পারে।"],+ "vmwZHP": ["প্রায় শেষ। কী হয়েছে আর কী বাকি আছে তা দেখুন।"],"vp5vfW": ["1 ঘণ্টা"],"vppAju": ["নতুন যোগ করা সংযুক্তি কোথায় রাখা হয়।"],"vqJXNe": ["<0>open-knowledge-discovery</0> স্কিল ইনস্টল করুন"],@@ -4999,6 +5010,9 @@"wSBXaS": [["rowLabel"], " পরিচালনা করুন"],"wT4iQr": ["দৃশ্য-সম্পাদকের খোঁজা বদলানোর নিয়ন্ত্রণ মেলে ধরা অবস্থায় খুলুন।"],"wTcjov": ["কোনো ওয়ার্কস্পেস নেই"],+ "wTf1ag": [+ "কিছু ফাইল হয়তো সরানো হয়নি। বিস্তারিত জানতে পরিষ্কার করার লগ খুলুন। আবার চেষ্টা করতে OpenKnowledge পুনরায় খুলতে পারেন।"+ ],"wU8WyK": ["উপাদান ফিল্ড"],"wVa83H": ["রিপোর্ট তৈরি করা যায়নি"],"wWtVYd": ["১ থেকে ৬৫৫৩৫-এর মধ্যে একটি পোর্ট লিখুন।"],@@ -5112,6 +5126,7 @@"xiv-dW": ["এখনও কোনো ফাইল নেই।"],"xk133d": ["স্কিলটি ", ["path"], "-এ ইনস্টল করে — প্রথম অবস্থানটি এর নিজস্ব কপি রাখে"],"xloBjn": ["আপেক্ষিক পথ"],+ "xnWySt": ["পরিষ্কার করা এখনও চলতে পারে।"],"xrVr_k": ["স্কিল তৈরি করা যায়নি: ", ["0"]],"xsZhu-": ["পাতার সংখ্যা"],"xtJgSe": ["এই উৎসে কয়েকটি স্কিল আছে — আমদানি করার জন্য একটি বাছুন।"],@@ -5155,6 +5170,7 @@"yQE2r9": ["লোড হচ্ছে"],"yQyglE": ["মিলে যাওয়া কোনো নথি নেই"],"yR5LHI": ["#1A2B3C-এর মতো ৬-অঙ্কের হেক্স দিন"],+ "yU_9ur": ["করণীয়।"],"yUxR-Q": [["keyName"], " মেলে ধরুন"],"yWSvcf": ["বিষয়বস্তুর রুট"],"yWWThY": ["সম্পদ রেফারেন্স"],diff --git a/packages/app/src/locales/bn/messages.po b/packages/app/src/locales/bn/messages.poindex c7dff7c6a..d3f560262 100644--- a/packages/app/src/locales/bn/messages.po+++ b/packages/app/src/locales/bn/messages.po@@ -1897,6 +1897,10 @@ msgstr "অনুমোদিত মান (খালি = যেকোনো)"msgid "Allowed values for {field}"msgstr "{field}-এর জন্য অনুমোদিত মান"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Almost done. Here's what happened and what's left."+msgstr "প্রায় শেষ। কী হয়েছে আর কী বাকি আছে তা দেখুন।"+#: src/editor/image-upload/index.tsmsgid "Already at {assetContentPath} — reusing."msgstr "আগে থেকেই {assetContentPath}-এ — পুনরায় ব্যবহার করা হচ্ছে।"@@ -2890,10 +2894,19 @@ msgstr "Claude Code (claude) ইনস্টল করা নেই বা আmsgid "Claude Desktop"msgstr "Claude Desktop"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Cleanup didn’t finish"+msgstr "পরিষ্কার করা শেষ হয়নি"+#: src/uninstall/UninstallNoticeScreen.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Cleanup log"msgstr "পরিষ্কারের লগ"+#: src/uninstall/UninstallApp.tsx+msgid "Cleanup may still be running."+msgstr "পরিষ্কার করা এখনও চলতে পারে।"+#: src/components/settings/SearchSection.tsx#: src/components/SkillPluginBundleDialog.tsxmsgid "Clear"@@ -3033,6 +3046,8 @@ msgstr "ক্লোন করা হচ্ছে…"#: src/components/ui/sheet.tsx#: src/editor/find-replace/FindReplaceBar.tsx#: src/lib/native-menu-catalog.ts+#: src/uninstall/UninstallApp.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Close"msgstr "বন্ধ করুন"@@ -5101,6 +5116,10 @@ msgstr "সম্পন্ন"msgid "Done"msgstr "সম্পন্ন"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "Done."+msgstr "সম্পন্ন।"+#: src/components/ui/tag-pill-input.tsxmsgid "Double-click to edit"msgstr "সম্পাদনা করতে ডাবল-ক্লিক করুন"@@ -7722,6 +7741,10 @@ msgstr "আপনার জ্ঞানভান্ডারকে Open Knowledgmsgid "Kept both — \"{0}\" is its own skill now"msgstr "দুটোই রাখা হয়েছে — \"{0}\" এখন নিজেই একটি স্কিল"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Kept your content"+msgstr "আপনার বিষয়বস্তু রাখা হয়েছে"+#: src/components/settings/SearchSection.tsxmsgid "Key ending in {keyHint}"msgstr "{keyHint}-এ শেষ হওয়া কী"@@ -8235,6 +8258,10 @@ msgstr "Markdown"msgid "Markdown checks do not apply to this file."msgstr "Markdown যাচাই এই ফাইলে প্রযোজ্য নয়।"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Markdown files and authored skills were left untouched."+msgstr "Markdown ফাইল এবং আপনার তৈরি স্কিল অপরিবর্তিত রাখা হয়েছে।"+#: src/components/EditorModeToggle.tsxmsgid "Markdown source"msgstr "Markdown সোর্স"@@ -8449,6 +8476,10 @@ msgstr "ব্লক সরান"msgid "Move down"msgstr "নিচে সরান"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Move OpenKnowledge.app to the Trash"+msgstr "OpenKnowledge.app ট্র্যাশে সরান"+#: src/components/SkillFileRenameDialog.tsxmsgid "Move or rename this file inside the skill — the path stays under references/ or scripts/."msgstr "এই ফাইলটি স্কিলের ভেতরে সরান বা এর নাম বদলান — পথটি references/ বা scripts/-এর নিচেই থাকে।"@@ -9941,6 +9972,10 @@ msgstr "OpenKnowledge {subject} সম্পাদনা করেছে"msgid "OpenKnowledge edited a document"msgstr "OpenKnowledge একটি নথি সম্পাদনা করেছে"+#: src/uninstall/UninstallResultScreen.tsx+msgid "OpenKnowledge files were removed"+msgstr "OpenKnowledge-এর ফাইল সরানো হয়েছে"+#: src/lib/acp/tool-call-display.tsmsgid "OpenKnowledge imported {source}"msgstr "OpenKnowledge {source} আমদানি করেছে"@@ -11299,6 +11334,10 @@ msgstr "\"{0}\"-কে অন্য প্রতিটি জায়গা থmsgid "Removed \"{projectName}\" from recent projects. Its folder no longer exists."msgstr "\"{projectName}\"-কে সাম্প্রতিক প্রকল্প থেকে সরানো হয়েছে। এর ফোল্ডারটি আর নেই।"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Removed OpenKnowledge files"+msgstr "OpenKnowledge-এর ফাইল সরানো হয়েছে"+#. placeholder {0}: connection.label#. placeholder {1}: sharedChoice.peers#: src/components/settings/AgentConnectionDialogs.tsx@@ -11790,9 +11829,14 @@ msgstr "File Explorer-এ দেখান"#: src/components/command-palette-commands.ts#: src/lib/platform-labels.ts+#: src/uninstall/UninstallResultScreen.tsxmsgid "Reveal in Finder"msgstr "Finder-এ দেখান"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Reveal in Finder shows the app so you can drag it to the Trash."+msgstr "Finder-এ দেখান অ্যাপটি দেখায়, যাতে আপনি সেটি ট্র্যাশে টেনে নিতে পারেন।"+#: src/components/SkillOriginInline.tsxmsgid "Revert"msgstr "ফিরিয়ে নিন"@@ -12489,6 +12533,10 @@ msgstr "সেট আপ করা হচ্ছে"msgid "Settings"msgstr "সেটিং"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Settings and integrations were cleaned up."+msgstr "সেটিংস এবং ইন্টিগ্রেশন সরানো হয়েছে।"+#: src/components/settings/SettingsDialogShell.tsxmsgid "Settings content"msgstr "সেটিং-এর বিষয়বস্তু"@@ -13005,6 +13053,10 @@ msgstr "ফেলে দেওয়া কিছু ফাইল নিরাmsgid "Some files are not listed — the working tree has too many changes."msgstr "কিছু ফাইল তালিকায় নেই: ওয়ার্কিং ট্রিতে অনেক বেশি পরিবর্তন আছে।"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Some files may not have been removed. Open the cleanup log for details. You can reopen OpenKnowledge to try again."+msgstr "কিছু ফাইল হয়তো সরানো হয়নি। বিস্তারিত জানতে পরিষ্কার করার লগ খুলুন। আবার চেষ্টা করতে OpenKnowledge পুনরায় খুলতে পারেন।"+#: src/components/settings/SavedThemesTiles.tsxmsgid "Some saved themes aren’t shown because the theme folder exceeds the scan limit."msgstr "থিম ফোল্ডারটি স্ক্যানের সীমা ছাড়িয়ে যাওয়ায় কিছু সংরক্ষিত থিম দেখানো হচ্ছে না।"@@ -14698,6 +14750,10 @@ msgstr "শিরোনাম"msgid "To do"msgstr "করণীয়"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "To do."+msgstr "করণীয়।"+#: src/lib/keyboard-shortcuts.tsmsgid "Toggle a bullet list."msgstr "বুলেট তালিকা চালু বা বন্ধ করুন।"@@ -14956,6 +15012,10 @@ msgstr "সম্পাদনা করতে লিখুন; <0>Cmd/Ctrl+Entermsgid "Type to find a doc"msgstr "একটি নথি খুঁজতে লিখুন"+#: src/uninstall/UninstallApp.tsx+msgid "Unable to show the cleanup result"+msgstr "পরিষ্কার করার ফলাফল দেখানো যাচ্ছে না"+#: src/components/McpConsentDialogBody.tsxmsgid "unavailable on this platform"msgstr "এই প্ল্যাটফর্মে পাওয়া যায় না"diff --git a/packages/app/src/locales/en/messages.json b/packages/app/src/locales/en/messages.jsonindex fc7b07bcd..f0fbb2a1f 100644--- a/packages/app/src/locales/en/messages.json+++ b/packages/app/src/locales/en/messages.json@@ -998,6 +998,7 @@"BVkqD9": ["Index maintenance is paused because another Git attribute controls index.md. Update .gitattributes so the scoped index.md paths use merge=union, then try again."],+ "BVmgJG": ["Reveal in Finder shows the app so you can drag it to the Trash."],"BWTzAb": ["Manual"],"BY-g4_": ["Add pattern"],"Ba4D2x": ["Template imported"],@@ -1231,6 +1232,7 @@"EPKVES": ["Update \"", ["skillName"], "\" over your edits?"],"EPwuTC": [["usedLabel"], " / ", ["sizeLabel"], " tokens used"],"EQXPXf": ["Scroll to end"],+ "ES1zFv": ["Move OpenKnowledge.app to the Trash"],"ETyvvg": ["No language match."],"EWCJFu": ["Created ", ["target"]],"EWPtMO": ["Code"],@@ -1650,6 +1652,7 @@"JM_aq-": ["Use an https:// URL — http:// is only allowed for localhost."],"JOcPqH": ["Bring a remote repository onto this machine."],"JOhCT9": ["Push includes"],+ "JReD69": ["OpenKnowledge files were removed"],"JWsZlx": ["Open a project to edit."],"JYj5R2": ["Browse files"],"JZ8cO6": ["Light, dark, or follow the OS."],@@ -1892,6 +1895,7 @@"M7SqjM": ["Reopen"],"M92_0q": ["Close comment"],"M9597s": ["Preparing share URL..."],+ "MAVznT": ["Settings and integrations were cleaned up."],"MBKkUy": ["skills.sh is unavailable; showing GitHub results (no install ranking)."],"MBfjUk": [[@@ -2605,6 +2609,7 @@["configFile"],"</0> file, which fully governs linting for this project. Turn rules on or off and edit their options here; changes write back to the file."],+ "V3JCWv": ["Cleanup didn’t finish"],"V3iDh1": ["Validate document frontmatter against standard JSON Schema files (draft-06, draft-07, 2019-09, or 2020-12). Toggle a schema on to validate the docs its globs match; violations surface as warnings and never block a write. Use Edit to open the schema file."],@@ -2969,6 +2974,7 @@"ZQJ1IV": ["Activate the last editor tab."],"ZQLDTl": ["created folder"],"ZQc7C8": ["Type to edit; <0>Cmd/Ctrl+Enter</0> saves, <1>Esc</1> cancels."],+ "ZR-8iJ": ["Unable to show the cleanup result"],"ZSoojc": ["Clone failed — check the URL and try again (", ["status"], ")"],"ZU8VV_": ["Remove failed: ", ["error"]],"ZVOhXM": ["Failed to update sync — ", ["detail"]],@@ -3134,6 +3140,7 @@"aSVmqV": ["No AI tools detected yet. Once you install one, connect it from Settings > This project."],+ "aTDVi6": ["Kept your content"],"aWlJai": ["Starting sign-in flow"],"aXkLuE": ["Malformed apply response"],"a_u4ck": ["Loading tags"],@@ -3208,6 +3215,7 @@"bkQRMh": ["Paragraph"],"blFttG": ["Search projects"],"bmC18N": ["Clearing local collaboration data for \"", ["docName"], "\" before reconnecting."],+ "bmI-q1": ["Removed OpenKnowledge files"],"bnOTEz": ["Retrieving…"],"bn_MDX": ["Why this needs attention"],"bpMVIA": ["Link target \"", ["shown"], "\" could not be resolved to a project-local target."],@@ -3315,6 +3323,7 @@"ciozf1": ["Skill already in project"],"cjtjry": ["Traverse OpenKnowledge navigation history backward."],"cklVjM": ["Timeline"],+ "clJ3qM": ["Done."],"cnGeoo": ["Delete"],"cqQyPB": ["Folder name"],"crqzW5": ["AI tools"],@@ -4570,6 +4579,7 @@["2"],"\" skill. Anything in SKILL.md that points at it will break until it's recreated."],+ "psUrB1": ["Markdown files and authored skills were left untouched."],"psl2Sj": ["Your change is still being saved — run the test again in a moment."],"ptQ3_N": ["unlink"],"pvnfJD": ["Dark"],@@ -5135,6 +5145,7 @@]],"vmahUq": ["Existing underlines may not update immediately."],+ "vmwZHP": ["Almost done. Here's what happened and what's left."],"vp5vfW": ["1 hour"],"vppAju": ["Where newly added attachments are placed."],"vqJXNe": ["Install the <0>open-knowledge-discovery</0> skill"],@@ -5182,6 +5193,9 @@"wSBXaS": ["Manage ", ["rowLabel"]],"wT4iQr": ["Open visual-editor find with replace controls expanded."],"wTcjov": ["No workspace"],+ "wTf1ag": [+ "Some files may not have been removed. Open the cleanup log for details. You can reopen OpenKnowledge to try again."+ ],"wU8WyK": ["Element fields"],"wVa83H": ["Couldn't create the report"],"wWtVYd": ["Enter a port between 1 and 65535."],@@ -5300,6 +5314,7 @@"xiv-dW": ["No files yet."],"xk133d": ["Installs the skill to ", ["path"], " — the first location holds its own copy"],"xloBjn": ["Relative Path"],+ "xnWySt": ["Cleanup may still be running."],"xrVr_k": ["Couldn't create skill: ", ["0"]],"xsZhu-": ["Page number"],"xtJgSe": ["This source bundles several skills — choose the one to import."],@@ -5348,6 +5363,7 @@"yQE2r9": ["Loading"],"yQyglE": ["No matching docs"],"yR5LHI": ["Enter a 6-digit hex like #1A2B3C"],+ "yU_9ur": ["To do."],"yUxR-Q": ["Expand ", ["keyName"]],"yWSvcf": ["Content root"],"yWWThY": ["Asset reference"],diff --git a/packages/app/src/locales/en/messages.po b/packages/app/src/locales/en/messages.poindex 07f269f7a..869a1d96e 100644--- a/packages/app/src/locales/en/messages.po+++ b/packages/app/src/locales/en/messages.po@@ -1901,6 +1901,10 @@ msgstr "Allowed values (empty = any)"msgid "Allowed values for {field}"msgstr "Allowed values for {field}"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Almost done. Here's what happened and what's left."+msgstr "Almost done. Here's what happened and what's left."+#: src/editor/image-upload/index.tsmsgid "Already at {assetContentPath} — reusing."msgstr "Already at {assetContentPath} — reusing."@@ -2894,10 +2898,19 @@ msgstr "Claude Code (claude) isn't installed or on your PATH."msgid "Claude Desktop"msgstr "Claude Desktop"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Cleanup didn’t finish"+msgstr "Cleanup didn’t finish"+#: src/uninstall/UninstallNoticeScreen.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Cleanup log"msgstr "Cleanup log"+#: src/uninstall/UninstallApp.tsx+msgid "Cleanup may still be running."+msgstr "Cleanup may still be running."+#: src/components/settings/SearchSection.tsx#: src/components/SkillPluginBundleDialog.tsxmsgid "Clear"@@ -3037,6 +3050,8 @@ msgstr "Cloning..."#: src/components/ui/sheet.tsx#: src/editor/find-replace/FindReplaceBar.tsx#: src/lib/native-menu-catalog.ts+#: src/uninstall/UninstallApp.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Close"msgstr "Close"@@ -5105,6 +5120,10 @@ msgstr "done"msgid "Done"msgstr "Done"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "Done."+msgstr "Done."+#: src/components/ui/tag-pill-input.tsxmsgid "Double-click to edit"msgstr "Double-click to edit"@@ -7726,6 +7745,10 @@ msgstr "Keeps your knowledge base aligned with the Open Knowledge Format."msgid "Kept both — \"{0}\" is its own skill now"msgstr "Kept both — \"{0}\" is its own skill now"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Kept your content"+msgstr "Kept your content"+#: src/components/settings/SearchSection.tsxmsgid "Key ending in {keyHint}"msgstr "Key ending in {keyHint}"@@ -8239,6 +8262,10 @@ msgstr "Markdown"msgid "Markdown checks do not apply to this file."msgstr "Markdown checks do not apply to this file."+#: src/uninstall/UninstallResultScreen.tsx+msgid "Markdown files and authored skills were left untouched."+msgstr "Markdown files and authored skills were left untouched."+#: src/components/EditorModeToggle.tsxmsgid "Markdown source"msgstr "Markdown source"@@ -8453,6 +8480,10 @@ msgstr "Move block"msgid "Move down"msgstr "Move down"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Move OpenKnowledge.app to the Trash"+msgstr "Move OpenKnowledge.app to the Trash"+#: src/components/SkillFileRenameDialog.tsxmsgid "Move or rename this file inside the skill — the path stays under references/ or scripts/."msgstr "Move or rename this file inside the skill — the path stays under references/ or scripts/."@@ -9945,6 +9976,10 @@ msgstr "OpenKnowledge edited {subject}"msgid "OpenKnowledge edited a document"msgstr "OpenKnowledge edited a document"+#: src/uninstall/UninstallResultScreen.tsx+msgid "OpenKnowledge files were removed"+msgstr "OpenKnowledge files were removed"+#: src/lib/acp/tool-call-display.tsmsgid "OpenKnowledge imported {source}"msgstr "OpenKnowledge imported {source}"@@ -11303,6 +11338,10 @@ msgstr "Removed \"{0}\" from every other location — its source folder still lomsgid "Removed \"{projectName}\" from recent projects. Its folder no longer exists."msgstr "Removed \"{projectName}\" from recent projects. Its folder no longer exists."+#: src/uninstall/UninstallResultScreen.tsx+msgid "Removed OpenKnowledge files"+msgstr "Removed OpenKnowledge files"+#. placeholder {0}: connection.label#. placeholder {1}: sharedChoice.peers#: src/components/settings/AgentConnectionDialogs.tsx@@ -11794,9 +11833,14 @@ msgstr "Reveal in File Explorer"#: src/components/command-palette-commands.ts#: src/lib/platform-labels.ts+#: src/uninstall/UninstallResultScreen.tsxmsgid "Reveal in Finder"msgstr "Reveal in Finder"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Reveal in Finder shows the app so you can drag it to the Trash."+msgstr "Reveal in Finder shows the app so you can drag it to the Trash."+#: src/components/SkillOriginInline.tsxmsgid "Revert"msgstr "Revert"@@ -12493,6 +12537,10 @@ msgstr "Setting up"msgid "Settings"msgstr "Settings"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Settings and integrations were cleaned up."+msgstr "Settings and integrations were cleaned up."+#: src/components/settings/SettingsDialogShell.tsxmsgid "Settings content"msgstr "Settings content"@@ -13009,6 +13057,10 @@ msgstr "Some dropped files could not be inserted safely."msgid "Some files are not listed — the working tree has too many changes."msgstr "Some files are not listed — the working tree has too many changes."+#: src/uninstall/UninstallResultScreen.tsx+msgid "Some files may not have been removed. Open the cleanup log for details. You can reopen OpenKnowledge to try again."+msgstr "Some files may not have been removed. Open the cleanup log for details. You can reopen OpenKnowledge to try again."+#: src/components/settings/SavedThemesTiles.tsxmsgid "Some saved themes aren’t shown because the theme folder exceeds the scan limit."msgstr "Some saved themes aren’t shown because the theme folder exceeds the scan limit."@@ -14702,6 +14754,10 @@ msgstr "Title"msgid "To do"msgstr "To do"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "To do."+msgstr "To do."+#: src/lib/keyboard-shortcuts.tsmsgid "Toggle a bullet list."msgstr "Toggle a bullet list."@@ -14960,6 +15016,10 @@ msgstr "Type to edit; <0>Cmd/Ctrl+Enter</0> saves, <1>Esc</1> cancels."msgid "Type to find a doc"msgstr "Type to find a doc"+#: src/uninstall/UninstallApp.tsx+msgid "Unable to show the cleanup result"+msgstr "Unable to show the cleanup result"+#: src/components/McpConsentDialogBody.tsxmsgid "unavailable on this platform"msgstr "unavailable on this platform"diff --git a/packages/app/src/locales/es/messages.json b/packages/app/src/locales/es/messages.jsonindex b1fe0788f..370d06323 100644--- a/packages/app/src/locales/es/messages.json+++ b/packages/app/src/locales/es/messages.json@@ -1177,6 +1177,9 @@"BVkqD9": ["El mantenimiento del índice está en pausa porque otro atributo de Git controla index.md. Actualiza .gitattributes para que las rutas index.md de ese ámbito usen merge=union y vuelve a intentarlo."],+ "BVmgJG": [+ "Mostrar en Finder muestra la aplicación para que puedas arrastrarla a la Papelera."+ ],"BWTzAb": ["Manual"],"BY-g4_": ["Añadir patrón"],"Ba4D2x": ["Plantilla importada"],@@ -1450,6 +1453,7 @@"EPKVES": ["¿Actualizar \"", ["skillName"], "\" sobre tus ediciones?"],"EPwuTC": [["usedLabel"], " / ", ["sizeLabel"], " tokens usados"],"EQXPXf": ["Desplazar hasta el final"],+ "ES1zFv": ["Mueve OpenKnowledge.app a la Papelera"],"ETyvvg": ["Ningún idioma coincide."],"EWCJFu": ["Se creó ", ["target"]],"EWPtMO": ["Código"],@@ -1935,6 +1939,7 @@"JM_aq-": ["Usa una URL https://; http:// solo se admite para localhost."],"JOcPqH": ["Trae un repositorio remoto a este equipo."],"JOhCT9": ["Push incluye"],+ "JReD69": ["Se eliminaron los archivos de OpenKnowledge"],"JWsZlx": ["Abre un proyecto para editarlo."],"JYj5R2": ["Examinar archivos"],"JZ8cO6": ["Claro, oscuro o seguir al sistema."],@@ -2210,6 +2215,7 @@"M7SqjM": ["Reabrir"],"M92_0q": ["Cerrar comentario"],"M9597s": ["Preparando la URL para compartir..."],+ "MAVznT": ["Se eliminaron los ajustes y las integraciones."],"MBKkUy": ["skills.sh no está disponible; se muestran resultados de GitHub (sin clasificación por instalaciones)."],@@ -3014,6 +3020,7 @@["configFile"],"</0> de tu proyecto, que gobierna por completo el análisis de este proyecto. Activa o desactiva reglas y edita sus opciones aquí; los cambios se escriben en el archivo."],+ "V3JCWv": ["La limpieza no terminó"],"V3iDh1": ["Valida el frontmatter de los documentos contra archivos JSON Schema estándar (draft-06, draft-07, 2019-09 o 2020-12). Activa un esquema para validar los documentos que coincidan con sus globs; las infracciones aparecen como advertencias y nunca bloquean una escritura. Usa Editar para abrir el archivo de esquema."],@@ -3455,6 +3462,7 @@"ZQJ1IV": ["Activa la última pestaña del editor."],"ZQLDTl": ["carpeta creada"],"ZQc7C8": ["Escribe para editar; <0>Cmd/Ctrl+Enter</0> guarda, <1>Esc</1> cancela."],+ "ZR-8iJ": ["No se puede mostrar el resultado de la limpieza"],"ZSoojc": ["No se pudo clonar: revisa la URL e inténtalo de nuevo (", ["status"], ")"],"ZU8VV_": ["Falló al quitarlo: ", ["error"]],"ZVOhXM": ["No se pudo actualizar la sincronización — ", ["detail"]],@@ -3631,6 +3639,7 @@"aSVmqV": ["Todavía no se ha detectado ninguna herramienta de IA. Cuando instales una, conéctala desde Ajustes > Este proyecto."],+ "aTDVi6": ["Tu contenido se conservó"],"aWlJai": ["Iniciando el flujo de inicio de sesión"],"aXkLuE": ["Respuesta de aplicación con formato incorrecto"],"a_u4ck": ["Cargando etiquetas"],@@ -3726,6 +3735,7 @@["docName"],"\" antes de reconectar."],+ "bmI-q1": ["Archivos de OpenKnowledge eliminados"],"bnOTEz": ["Recuperando…"],"bn_MDX": ["Por qué esto requiere atención"],"bpMVIA": [@@ -3849,6 +3859,7 @@"ciozf1": ["La habilidad ya está en el proyecto"],"cjtjry": ["Retrocede por el historial de navegación de OpenKnowledge."],"cklVjM": ["Cronología"],+ "clJ3qM": ["Listo."],"cnGeoo": ["Eliminar"],"cqQyPB": ["Nombre de la carpeta"],"crqzW5": ["Herramientas de IA"],@@ -5277,6 +5288,7 @@["2"],"». Todo lo que apunte a ese archivo en SKILL.md dejará de funcionar hasta que se vuelva a crear."],+ "psUrB1": ["Los archivos Markdown y las habilidades creadas no se modificaron."],"psl2Sj": ["Tu cambio todavía se está guardando; vuelve a ejecutar la prueba en un momento."],"ptQ3_N": ["desenlazar"],"pvnfJD": ["Oscuro"],@@ -5924,6 +5936,7 @@]],"vmahUq": ["Puede que los subrayados existentes no se actualicen de inmediato."],+ "vmwZHP": ["Casi listo. Esto es lo que se hizo y lo que queda pendiente."],"vp5vfW": ["1 hora"],"vppAju": ["Dónde se colocan los adjuntos recién añadidos."],"vqJXNe": ["Instalar la habilidad <0>open-knowledge-discovery</0>"],@@ -5977,6 +5990,9 @@"wSBXaS": ["Gestionar ", ["rowLabel"]],"wT4iQr": ["Abre la búsqueda del editor visual con los controles de reemplazo desplegados."],"wTcjov": ["Sin espacio de trabajo"],+ "wTf1ag": [+ "Es posible que algunos archivos no se hayan eliminado. Abre el registro de limpieza para ver los detalles. Puedes volver a abrir OpenKnowledge para intentarlo de nuevo."+ ],"wU8WyK": ["Campos del elemento"],"wVa83H": ["No se pudo crear el informe"],"wWtVYd": ["Introduce un puerto entre 1 y 65535."],@@ -6105,6 +6121,7 @@"xiv-dW": ["Todavía no hay archivos."],"xk133d": ["Instala la skill en ", ["path"], " — la primera ubicación guarda su propia copia"],"xloBjn": ["Ruta relativa"],+ "xnWySt": ["Puede que la limpieza siga en curso."],"xrVr_k": ["No se pudo crear la habilidad: ", ["0"]],"xsZhu-": ["Número de página"],"xtJgSe": ["Este origen incluye varias habilidades: elige cuál importar."],@@ -6158,6 +6175,7 @@"yQE2r9": ["Cargando"],"yQyglE": ["Ningún documento coincide"],"yR5LHI": ["Escribe un valor hexadecimal de 6 dígitos, como #1A2B3C"],+ "yU_9ur": ["Por hacer."],"yUxR-Q": ["Expandir ", ["keyName"]],"yWSvcf": ["Raíz del contenido"],"yWWThY": ["Referencia al recurso"],diff --git a/packages/app/src/locales/es/messages.po b/packages/app/src/locales/es/messages.poindex 03066feb2..2a8f0b39f 100644--- a/packages/app/src/locales/es/messages.po+++ b/packages/app/src/locales/es/messages.po@@ -1901,6 +1901,10 @@ msgstr "Valores permitidos (vacío = cualquiera)"msgid "Allowed values for {field}"msgstr "Valores permitidos para {field}"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Almost done. Here's what happened and what's left."+msgstr "Casi listo. Esto es lo que se hizo y lo que queda pendiente."+#: src/editor/image-upload/index.tsmsgid "Already at {assetContentPath} — reusing."msgstr "Ya está en {assetContentPath}: se reutiliza."@@ -2894,10 +2898,19 @@ msgstr "Claude Code (claude) no está instalado ni en tu PATH."msgid "Claude Desktop"msgstr "Claude Desktop"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Cleanup didn’t finish"+msgstr "La limpieza no terminó"+#: src/uninstall/UninstallNoticeScreen.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Cleanup log"msgstr "Registro de limpieza"+#: src/uninstall/UninstallApp.tsx+msgid "Cleanup may still be running."+msgstr "Puede que la limpieza siga en curso."+#: src/components/settings/SearchSection.tsx#: src/components/SkillPluginBundleDialog.tsxmsgid "Clear"@@ -3037,6 +3050,8 @@ msgstr "Clonando..."#: src/components/ui/sheet.tsx#: src/editor/find-replace/FindReplaceBar.tsx#: src/lib/native-menu-catalog.ts+#: src/uninstall/UninstallApp.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Close"msgstr "Cerrar"@@ -5105,6 +5120,10 @@ msgstr "listo"msgid "Done"msgstr "Listo"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "Done."+msgstr "Listo."+#: src/components/ui/tag-pill-input.tsxmsgid "Double-click to edit"msgstr "Haz doble clic para editar"@@ -7726,6 +7745,10 @@ msgstr "Mantiene tu base de conocimientos alineada con el Open Knowledge Format.msgid "Kept both — \"{0}\" is its own skill now"msgstr "Se conservaron ambos: \"{0}\" ahora es una habilidad aparte"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Kept your content"+msgstr "Tu contenido se conservó"+#: src/components/settings/SearchSection.tsxmsgid "Key ending in {keyHint}"msgstr "Clave terminada en {keyHint}"@@ -8239,6 +8262,10 @@ msgstr "Markdown"msgid "Markdown checks do not apply to this file."msgstr "Las comprobaciones de Markdown no se aplican a este archivo."+#: src/uninstall/UninstallResultScreen.tsx+msgid "Markdown files and authored skills were left untouched."+msgstr "Los archivos Markdown y las habilidades creadas no se modificaron."+#: src/components/EditorModeToggle.tsxmsgid "Markdown source"msgstr "Código markdown"@@ -8453,6 +8480,10 @@ msgstr "Mover el bloque"msgid "Move down"msgstr "Bajar"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Move OpenKnowledge.app to the Trash"+msgstr "Mueve OpenKnowledge.app a la Papelera"+#: src/components/SkillFileRenameDialog.tsxmsgid "Move or rename this file inside the skill — the path stays under references/ or scripts/."msgstr "Mueve o renombra este archivo dentro de la habilidad: la ruta se mantiene bajo references/ o scripts/."@@ -9945,6 +9976,10 @@ msgstr "OpenKnowledge editó {subject}"msgid "OpenKnowledge edited a document"msgstr "OpenKnowledge editó un documento"+#: src/uninstall/UninstallResultScreen.tsx+msgid "OpenKnowledge files were removed"+msgstr "Se eliminaron los archivos de OpenKnowledge"+#: src/lib/acp/tool-call-display.tsmsgid "OpenKnowledge imported {source}"msgstr "OpenKnowledge importó {source}"@@ -11303,6 +11338,10 @@ msgstr "Se quitó \"{0}\" de todas las demás ubicaciones; su carpeta de origenmsgid "Removed \"{projectName}\" from recent projects. Its folder no longer exists."msgstr "Se quitó \"{projectName}\" de los proyectos recientes. Su carpeta ya no existe."+#: src/uninstall/UninstallResultScreen.tsx+msgid "Removed OpenKnowledge files"+msgstr "Archivos de OpenKnowledge eliminados"+#. placeholder {0}: connection.label#. placeholder {1}: sharedChoice.peers#: src/components/settings/AgentConnectionDialogs.tsx@@ -11794,9 +11833,14 @@ msgstr "Mostrar en el Explorador de archivos"#: src/components/command-palette-commands.ts#: src/lib/platform-labels.ts+#: src/uninstall/UninstallResultScreen.tsxmsgid "Reveal in Finder"msgstr "Mostrar en el Finder"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Reveal in Finder shows the app so you can drag it to the Trash."+msgstr "Mostrar en Finder muestra la aplicación para que puedas arrastrarla a la Papelera."+#: src/components/SkillOriginInline.tsxmsgid "Revert"msgstr "Revertir"@@ -12493,6 +12537,10 @@ msgstr "Configurando"msgid "Settings"msgstr "Ajustes"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Settings and integrations were cleaned up."+msgstr "Se eliminaron los ajustes y las integraciones."+#: src/components/settings/SettingsDialogShell.tsxmsgid "Settings content"msgstr "Contenido de los ajustes"@@ -13009,6 +13057,10 @@ msgstr "Algunos archivos soltados no se pudieron insertar de forma segura."msgid "Some files are not listed — the working tree has too many changes."msgstr "Algunos archivos no aparecen: el árbol de trabajo tiene demasiados cambios."+#: src/uninstall/UninstallResultScreen.tsx+msgid "Some files may not have been removed. Open the cleanup log for details. You can reopen OpenKnowledge to try again."+msgstr "Es posible que algunos archivos no se hayan eliminado. Abre el registro de limpieza para ver los detalles. Puedes volver a abrir OpenKnowledge para intentarlo de nuevo."+#: src/components/settings/SavedThemesTiles.tsxmsgid "Some saved themes aren’t shown because the theme folder exceeds the scan limit."msgstr "Algunos temas guardados no se muestran porque la carpeta de temas supera el límite de análisis."@@ -14702,6 +14754,10 @@ msgstr "Título"msgid "To do"msgstr "Por hacer"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "To do."+msgstr "Por hacer."+#: src/lib/keyboard-shortcuts.tsmsgid "Toggle a bullet list."msgstr "Activa o desactiva una lista con viñetas."@@ -14960,6 +15016,10 @@ msgstr "Escribe para editar; <0>Cmd/Ctrl+Enter</0> guarda, <1>Esc</1> cancela."msgid "Type to find a doc"msgstr "Escribe para encontrar un documento"+#: src/uninstall/UninstallApp.tsx+msgid "Unable to show the cleanup result"+msgstr "No se puede mostrar el resultado de la limpieza"+#: src/components/McpConsentDialogBody.tsxmsgid "unavailable on this platform"msgstr "no disponible en esta plataforma"diff --git a/packages/app/src/locales/fr/messages.json b/packages/app/src/locales/fr/messages.jsonindex a17598bd6..f81ad1e47 100644--- a/packages/app/src/locales/fr/messages.json+++ b/packages/app/src/locales/fr/messages.json@@ -1204,6 +1204,9 @@"BVkqD9": ["La maintenance de l'index est suspendue car un autre attribut Git contrôle index.md. Mettez à jour .gitattributes pour que les chemins index.md définis utilisent merge=union, puis réessayez."],+ "BVmgJG": [+ "Afficher dans le Finder affiche l’application pour que vous puissiez la faire glisser dans la Corbeille."+ ],"BWTzAb": ["Manuel"],"BY-g4_": ["Ajouter un motif"],"Ba4D2x": ["Modèle importé"],@@ -1479,6 +1482,7 @@"EPKVES": ["Mettre à jour « ", ["skillName"], " » par-dessus vos modifications ?"],"EPwuTC": [["usedLabel"], " / ", ["sizeLabel"], " tokens utilisés"],"EQXPXf": ["Défiler jusqu'à la fin"],+ "ES1zFv": ["Placez OpenKnowledge.app dans la Corbeille"],"ETyvvg": ["Aucune langue correspondante."],"EWCJFu": [["target"], " créé"],"EWPtMO": ["Code"],@@ -1965,6 +1969,7 @@"JM_aq-": ["Utilisez une URL https:// — http:// n'est autorisé que pour localhost."],"JOcPqH": ["Récupérer un dépôt distant sur cette machine."],"JOhCT9": ["Pousser inclut"],+ "JReD69": ["Les fichiers OpenKnowledge ont été supprimés"],"JWsZlx": ["Ouvrez un projet pour le modifier."],"JYj5R2": ["Parcourir les fichiers"],"JZ8cO6": ["Clair, sombre, ou suivre le système."],@@ -2253,6 +2258,7 @@"M7SqjM": ["Rouvrir"],"M92_0q": ["Fermer le commentaire"],"M9597s": ["Préparation de l'URL de partage…"],+ "MAVznT": ["Les réglages et les intégrations ont été supprimés."],"MBKkUy": ["skills.sh est indisponible ; affichage des résultats GitHub (sans classement par installations)."],@@ -3056,6 +3062,7 @@["configFile"],"</0> de votre projet, qui régit entièrement la vérification pour ce projet. Activez ou désactivez des règles et modifiez leurs options ici ; les changements sont réécrits dans le fichier."],+ "V3JCWv": ["Le nettoyage n’a pas abouti"],"V3iDh1": ["Valide le frontmatter des documents à l'aide de fichiers JSON Schema standard (draft-06, draft-07, 2019-09 ou 2020-12). Activez un schéma pour valider les documents que ses globs sélectionnent ; les manquements apparaissent en avertissements et ne bloquent jamais une écriture. Utilisez Modifier pour ouvrir le fichier de schéma."],@@ -3500,6 +3507,7 @@"ZQJ1IV": ["Active le dernier onglet de l'éditeur."],"ZQLDTl": ["dossier créé"],"ZQc7C8": ["Saisissez pour modifier ; <0>Cmd/Ctrl+Enter</0> enregistre, <1>Échap</1> annule."],+ "ZR-8iJ": ["Impossible d’afficher le résultat du nettoyage"],"ZSoojc": ["Échec du clonage — vérifiez l'URL et réessayez (", ["status"], ")"],"ZU8VV_": ["Échec du retrait : ", ["error"]],"ZVOhXM": ["Échec de la mise à jour de la synchronisation — ", ["detail"]],@@ -3678,6 +3686,7 @@"aSVmqV": ["Aucun outil IA détecté pour l'instant. Une fois que vous en installez un, connectez-le depuis Paramètres > Ce projet."],+ "aTDVi6": ["Votre contenu a été conservé"],"aWlJai": ["Démarrage du processus de connexion"],"aXkLuE": ["Réponse d'application mal formée"],"a_u4ck": ["Chargement des étiquettes"],@@ -3769,6 +3778,7 @@["docName"]," » avant la reconnexion."],+ "bmI-q1": ["Fichiers OpenKnowledge supprimés"],"bnOTEz": ["Récupération…"],"bn_MDX": ["Pourquoi cela demande votre attention"],"bpMVIA": [@@ -3901,6 +3911,7 @@"ciozf1": ["Compétence déjà en projet"],"cjtjry": ["Recule dans l'historique de navigation d'OpenKnowledge."],"cklVjM": ["Chronologie"],+ "clJ3qM": ["Terminé."],"cnGeoo": ["Supprimer"],"cqQyPB": ["Nom du dossier"],"crqzW5": ["Outils IA"],@@ -5332,6 +5343,9 @@["2"]," ». Tout ce qui y renvoie dans SKILL.md cessera de fonctionner jusqu’à sa recréation."],+ "psUrB1": [+ "Les fichiers Markdown et les compétences que vous avez créées sont restés intacts."+ ],"psl2Sj": ["Votre modification est encore en cours d'enregistrement — relancez le test dans un instant."],@@ -5997,6 +6011,7 @@]],"vmahUq": ["Les soulignements existants peuvent ne pas se mettre à jour immédiatement."],+ "vmwZHP": ["Presque terminé. Voici ce qui a été fait et ce qu’il reste à faire."],"vp5vfW": ["1 heure"],"vppAju": ["Où sont placées les pièces jointes nouvellement ajoutées."],"vqJXNe": ["Installer la compétence <0>open-knowledge-discovery</0>"],@@ -6050,6 +6065,9 @@"Ouvre la recherche de l'éditeur visuel avec les contrôles de remplacement dépliés."],"wTcjov": ["Aucun espace de travail"],+ "wTf1ag": [+ "Certains fichiers n’ont peut-être pas été supprimés. Ouvrez le journal de nettoyage pour en savoir plus. Vous pouvez rouvrir OpenKnowledge pour réessayer."+ ],"wU8WyK": ["Champs d'élément"],"wVa83H": ["Impossible de créer le rapport"],"wWtVYd": ["Saisissez un port entre 1 et 65535."],@@ -6178,6 +6196,7 @@" — le premier emplacement conserve sa propre copie"],"xloBjn": ["Chemin relatif"],+ "xnWySt": ["Le nettoyage est peut-être encore en cours."],"xrVr_k": ["Impossible de créer la compétence : ", ["0"]],"xsZhu-": ["Numéro de page"],"xtJgSe": ["Cette source regroupe plusieurs compétences — choisissez celle à importer."],@@ -6231,6 +6250,7 @@"yQE2r9": ["Chargement"],"yQyglE": ["Aucun document correspondant"],"yR5LHI": ["Saisissez une valeur hexadécimale à 6 chiffres, par ex. #1A2B3C"],+ "yU_9ur": ["À faire."],"yUxR-Q": ["Développer ", ["keyName"]],"yWSvcf": ["Racine du contenu"],"yWWThY": ["Référence de ressource"],diff --git a/packages/app/src/locales/fr/messages.po b/packages/app/src/locales/fr/messages.poindex 7c739e480..5d0431654 100644--- a/packages/app/src/locales/fr/messages.po+++ b/packages/app/src/locales/fr/messages.po@@ -1901,6 +1901,10 @@ msgstr "Valeurs autorisées (vide = toutes)"msgid "Allowed values for {field}"msgstr "Valeurs autorisées pour {field}"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Almost done. Here's what happened and what's left."+msgstr "Presque terminé. Voici ce qui a été fait et ce qu’il reste à faire."+#: src/editor/image-upload/index.tsmsgid "Already at {assetContentPath} — reusing."msgstr "Déjà dans {assetContentPath} — réutilisation."@@ -2894,10 +2898,19 @@ msgstr "Claude Code (claude) n'est pas installé ni présent dans votre PATH."msgid "Claude Desktop"msgstr "Claude Desktop"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Cleanup didn’t finish"+msgstr "Le nettoyage n’a pas abouti"+#: src/uninstall/UninstallNoticeScreen.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Cleanup log"msgstr "Journal de nettoyage"+#: src/uninstall/UninstallApp.tsx+msgid "Cleanup may still be running."+msgstr "Le nettoyage est peut-être encore en cours."+#: src/components/settings/SearchSection.tsx#: src/components/SkillPluginBundleDialog.tsxmsgid "Clear"@@ -3037,6 +3050,8 @@ msgstr "Clonage…"#: src/components/ui/sheet.tsx#: src/editor/find-replace/FindReplaceBar.tsx#: src/lib/native-menu-catalog.ts+#: src/uninstall/UninstallApp.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Close"msgstr "Fermer"@@ -5105,6 +5120,10 @@ msgstr "terminé"msgid "Done"msgstr "Terminé"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "Done."+msgstr "Terminé."+#: src/components/ui/tag-pill-input.tsxmsgid "Double-click to edit"msgstr "Double-cliquez pour modifier"@@ -7726,6 +7745,10 @@ msgstr "Maintient votre base de connaissances alignée sur l’Open Knowledge Fomsgid "Kept both — \"{0}\" is its own skill now"msgstr "Les deux conservés — « {0} » est désormais une compétence à part entière"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Kept your content"+msgstr "Votre contenu a été conservé"+#: src/components/settings/SearchSection.tsxmsgid "Key ending in {keyHint}"msgstr "Clé se terminant par {keyHint}"@@ -8239,6 +8262,10 @@ msgstr "Markdown"msgid "Markdown checks do not apply to this file."msgstr "Les vérifications Markdown ne s’appliquent pas à ce fichier."+#: src/uninstall/UninstallResultScreen.tsx+msgid "Markdown files and authored skills were left untouched."+msgstr "Les fichiers Markdown et les compétences que vous avez créées sont restés intacts."+#: src/components/EditorModeToggle.tsxmsgid "Markdown source"msgstr "Source markdown"@@ -8453,6 +8480,10 @@ msgstr "Déplacer le bloc"msgid "Move down"msgstr "Descendre"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Move OpenKnowledge.app to the Trash"+msgstr "Placez OpenKnowledge.app dans la Corbeille"+#: src/components/SkillFileRenameDialog.tsxmsgid "Move or rename this file inside the skill — the path stays under references/ or scripts/."msgstr "Déplacez ou renommez ce fichier à l'intérieur de la compétence — le chemin reste sous references/ ou scripts/."@@ -9945,6 +9976,10 @@ msgstr "OpenKnowledge a modifié {subject}"msgid "OpenKnowledge edited a document"msgstr "OpenKnowledge a modifié un document"+#: src/uninstall/UninstallResultScreen.tsx+msgid "OpenKnowledge files were removed"+msgstr "Les fichiers OpenKnowledge ont été supprimés"+#: src/lib/acp/tool-call-display.tsmsgid "OpenKnowledge imported {source}"msgstr "OpenKnowledge a importé {source}"@@ -11303,6 +11338,10 @@ msgstr "« {0} » retiré de tous les autres emplacements — son dossier sourcemsgid "Removed \"{projectName}\" from recent projects. Its folder no longer exists."msgstr "« {projectName} » retiré des projets récents. Son dossier n'existe plus."+#: src/uninstall/UninstallResultScreen.tsx+msgid "Removed OpenKnowledge files"+msgstr "Fichiers OpenKnowledge supprimés"+#. placeholder {0}: connection.label#. placeholder {1}: sharedChoice.peers#: src/components/settings/AgentConnectionDialogs.tsx@@ -11794,9 +11833,14 @@ msgstr "Afficher dans l'Explorateur de fichiers"#: src/components/command-palette-commands.ts#: src/lib/platform-labels.ts+#: src/uninstall/UninstallResultScreen.tsxmsgid "Reveal in Finder"msgstr "Afficher dans le Finder"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Reveal in Finder shows the app so you can drag it to the Trash."+msgstr "Afficher dans le Finder affiche l’application pour que vous puissiez la faire glisser dans la Corbeille."+#: src/components/SkillOriginInline.tsxmsgid "Revert"msgstr "Rétablir"@@ -12493,6 +12537,10 @@ msgstr "Configuration en cours"msgid "Settings"msgstr "Paramètres"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Settings and integrations were cleaned up."+msgstr "Les réglages et les intégrations ont été supprimés."+#: src/components/settings/SettingsDialogShell.tsxmsgid "Settings content"msgstr "Contenu des paramètres"@@ -13009,6 +13057,10 @@ msgstr "Certains fichiers déposés n’ont pas pu être insérés en toute sécmsgid "Some files are not listed — the working tree has too many changes."msgstr "Certains fichiers ne sont pas listés : l'arbre de travail contient trop de modifications."+#: src/uninstall/UninstallResultScreen.tsx+msgid "Some files may not have been removed. Open the cleanup log for details. You can reopen OpenKnowledge to try again."+msgstr "Certains fichiers n’ont peut-être pas été supprimés. Ouvrez le journal de nettoyage pour en savoir plus. Vous pouvez rouvrir OpenKnowledge pour réessayer."+#: src/components/settings/SavedThemesTiles.tsxmsgid "Some saved themes aren’t shown because the theme folder exceeds the scan limit."msgstr "Certains thèmes enregistrés ne sont pas affichés car le dossier des thèmes dépasse la limite d’analyse."@@ -14702,6 +14754,10 @@ msgstr "Titre"msgid "To do"msgstr "À faire"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "To do."+msgstr "À faire."+#: src/lib/keyboard-shortcuts.tsmsgid "Toggle a bullet list."msgstr "Bascule une liste à puces."@@ -14960,6 +15016,10 @@ msgstr "Saisissez pour modifier ; <0>Cmd/Ctrl+Enter</0> enregistre, <1>Échap</1msgid "Type to find a doc"msgstr "Saisissez pour trouver un document"+#: src/uninstall/UninstallApp.tsx+msgid "Unable to show the cleanup result"+msgstr "Impossible d’afficher le résultat du nettoyage"+#: src/components/McpConsentDialogBody.tsxmsgid "unavailable on this platform"msgstr "indisponible sur cette plateforme"diff --git a/packages/app/src/locales/hi/messages.json b/packages/app/src/locales/hi/messages.jsonindex c1cdf34f8..586da4dc9 100644--- a/packages/app/src/locales/hi/messages.json+++ b/packages/app/src/locales/hi/messages.json@@ -974,6 +974,7 @@"BVkqD9": ["सूचकांक रखरखाव रोक दिया गया है क्योंकि एक अन्य Git विशेषता index.md को नियंत्रित करती है। .gitattributes को अपडेट करें ताकि दायरे वाले index.md पथ merge=union का उपयोग करें, फिर पुनः प्रयास करें।"],+ "BVmgJG": ["Finder में दिखाएँ से ऐप दिखाई देता है, ताकि आप उसे ट्रैश में खींच सकें।"],"BWTzAb": ["मैन्युअल"],"BY-g4_": ["पैटर्न जोड़ें"],"Ba4D2x": ["टेम्पलेट आयात किया गया"],@@ -1207,6 +1208,7 @@"EPKVES": ["अपने संपादनों के ऊपर \"", ["skillName"], "\" अपडेट करें?"],"EPwuTC": [["usedLabel"], " / ", ["sizeLabel"], " टोकन उपयोग में"],"EQXPXf": ["अंत तक स्क्रॉल करें"],+ "ES1zFv": ["OpenKnowledge.app को ट्रैश में ले जाएँ"],"ETyvvg": ["कोई भाषा मेल नहीं खाती।"],"EWCJFu": [["target"], " बनाया गया"],"EWPtMO": ["कोड"],@@ -1597,6 +1599,7 @@"JM_aq-": ["कोई https:// URL उपयोग करें — http:// केवल localhost के लिए अनुमत है।"],"JOcPqH": ["एक रिमोट रिपॉज़िटरी को इस मशीन पर लाएँ।"],"JOhCT9": ["भेजें में शामिल"],+ "JReD69": ["OpenKnowledge की फ़ाइलें हटा दी गईं"],"JWsZlx": ["संपादित करने के लिए कोई प्रोजेक्ट खोलें।"],"JYj5R2": ["फ़ाइलें चुनें"],"JZ8cO6": ["हल्का, गहरा, या OS का अनुसरण।"],@@ -1834,6 +1837,7 @@"M7SqjM": ["फिर से खोलें"],"M92_0q": ["टिप्पणी बंद करें"],"M9597s": ["साझा URL तैयार किया जा रहा है…"],+ "MAVznT": ["सेटिंग और इंटीग्रेशन हटा दिए गए।"],"MBKkUy": ["skills.sh अनुपलब्ध है; GitHub के परिणाम दिखाए जा रहे हैं (इंस्टॉल के अनुसार क्रम नहीं)।"],"MBfjUk": [[@@ -2525,6 +2529,7 @@["configFile"],"</0> फ़ाइल से आते हैं, जो इस प्रोजेक्ट की linting पूरी तरह तय करती है। नियम यहाँ चालू या बंद करें और उनके विकल्प संपादित करें; बदलाव उसी फ़ाइल में लिखे जाते हैं।"],+ "V3JCWv": ["सफ़ाई पूरी नहीं हुई"],"V3iDh1": ["दस्तावेज़ के frontmatter को मानक JSON Schema फ़ाइलों (draft-06, draft-07, 2019-09, या 2020-12) के विरुद्ध सत्यापित करें। जिन दस्तावेज़ों से किसी स्कीमा के ग्लोब मेल खाते हैं उन्हें सत्यापित करने के लिए उस स्कीमा को चालू करें; उल्लंघन चेतावनी के रूप में दिखते हैं और कभी लिखने से नहीं रोकते। स्कीमा फ़ाइल खोलने के लिए Edit का उपयोग करें।"],@@ -2887,6 +2892,7 @@"ZQJ1IV": ["अंतिम संपादक टैब सक्रिय करें।"],"ZQLDTl": ["फ़ोल्डर बनाया गया"],"ZQc7C8": ["संपादित करने के लिए लिखें; <0>Cmd/Ctrl+Enter</0> सहेजता है, <1>Esc</1> रद्द करता है।"],+ "ZR-8iJ": ["सफ़ाई का परिणाम नहीं दिखाया जा सका"],"ZSoojc": ["क्लोन विफल — URL जाँचें और फिर से प्रयास करें (", ["status"], ")"],"ZU8VV_": ["हटाना विफल: ", ["error"]],"ZVOhXM": ["सिंक अपडेट करने में विफल — ", ["detail"]],@@ -3049,6 +3055,7 @@"aRI3Om": ["विंडो बंद करें"],"aS77on": ["क्या बदलता है?"],"aSVmqV": ["अभी तक कोई AI टूल नहीं मिला। एक इंस्टॉल करने के बाद उसे Settings > This project से जोड़ें।"],+ "aTDVi6": ["आपका कॉन्टेंट सुरक्षित रखा गया"],"aWlJai": ["साइन-इन प्रक्रिया शुरू की जा रही है"],"aXkLuE": ["अप्लाई प्रतिक्रिया का प्रारूप गलत है"],"a_u4ck": ["टैग लोड हो रहे हैं"],@@ -3126,6 +3133,7 @@"bkQRMh": ["पैराग्राफ़"],"blFttG": ["प्रोजेक्ट खोजें"],"bmC18N": ["फिर से जुड़ने से पहले \"", ["docName"], "\" का स्थानीय सहयोग डेटा साफ़ किया जा रहा है।"],+ "bmI-q1": ["OpenKnowledge की फ़ाइलें हटाई गईं"],"bnOTEz": ["लाया जा रहा है…"],"bn_MDX": ["इस पर ध्यान क्यों देना है"],"bpMVIA": ["लिंक लक्ष्य \"", ["shown"], "\" को प्रोजेक्ट के स्थानीय लक्ष्य के रूप में हल नहीं किया जा सका।"],@@ -3220,6 +3228,7 @@"ciozf1": ["कौशल पहले से ही परियोजना में है"],"cjtjry": ["OpenKnowledge के नेविगेशन इतिहास में पीछे जाएँ।"],"cklVjM": ["समयरेखा"],+ "clJ3qM": ["पूर्ण।"],"cnGeoo": ["हटाएँ"],"cqQyPB": ["फ़ोल्डर का नाम"],"crqzW5": ["AI टूल"],@@ -4417,6 +4426,7 @@["1"]," को स्थायी रूप से हटा देता है। SKILL.md में जो कुछ भी उसकी ओर इशारा करता है, वह दोबारा बनाए जाने तक काम नहीं करेगा।"],+ "psUrB1": ["Markdown फ़ाइलों और आपके बनाए स्किल में कोई बदलाव नहीं किया गया।"],"psl2Sj": ["आपका बदलाव अब भी सहेजा जा रहा है — कुछ देर बाद परीक्षण फिर चलाएँ।"],"ptQ3_N": ["अनलिंक करें"],"pvnfJD": ["गहरा"],@@ -4941,6 +4951,7 @@]],"vmahUq": ["मौजूदा रेखांकन तुरंत अपडेट नहीं हो सकते।"],+ "vmwZHP": ["लगभग पूरा हो गया। देखें कि क्या हुआ और क्या करना बाकी है।"],"vp5vfW": ["1 घंटा"],"vppAju": ["नए जोड़े गए संलग्नक कहाँ रखे जाते हैं।"],"vqJXNe": ["<0>open-knowledge-discovery</0> स्किल इंस्टॉल करें"],@@ -4988,6 +4999,9 @@"wSBXaS": [["rowLabel"], " प्रबंधित करें"],"wT4iQr": ["दृश्य-संपादक की खोज फैले हुए बदलें-नियंत्रणों के साथ खोलें।"],"wTcjov": ["कोई कार्यक्षेत्र नहीं"],+ "wTf1ag": [+ "हो सकता है कि कुछ फ़ाइलें हटाई न गई हों। जानकारी के लिए सफ़ाई लॉग खोलें। दोबारा कोशिश करने के लिए OpenKnowledge फिर से खोल सकते हैं।"+ ],"wU8WyK": ["तत्व फ़ील्ड"],"wVa83H": ["रिपोर्ट नहीं बनाई जा सकी"],"wWtVYd": ["1 और 65535 के बीच एक port दर्ज करें।"],@@ -5103,6 +5117,7 @@"xiv-dW": ["अभी कोई फ़ाइल नहीं।"],"xk133d": ["स्किल को ", ["path"], " में इंस्टॉल करता है — पहला स्थान इसकी अपनी प्रति रखता है"],"xloBjn": ["सापेक्ष पथ"],+ "xnWySt": ["सफ़ाई अभी भी चल रही हो सकती है।"],"xrVr_k": ["स्किल नहीं बनाई जा सकी: ", ["0"]],"xsZhu-": ["पेज संख्या"],"xtJgSe": ["इस स्रोत में कई स्किल हैं — आयात करने के लिए एक चुनें।"],@@ -5146,6 +5161,7 @@"yQE2r9": ["लोड हो रहा है"],"yQyglE": ["कोई मेल खाता दस्तावेज़ नहीं"],"yR5LHI": ["#1A2B3C जैसा 6-अंकों का हेक्स मान डालें"],+ "yU_9ur": ["करना है।"],"yUxR-Q": [["keyName"], " फैलाएँ"],"yWSvcf": ["सामग्री रूट"],"yWWThY": ["एसेट संदर्भ"],diff --git a/packages/app/src/locales/hi/messages.po b/packages/app/src/locales/hi/messages.poindex ee522b5d4..5feed31c6 100644--- a/packages/app/src/locales/hi/messages.po+++ b/packages/app/src/locales/hi/messages.po@@ -1897,6 +1897,10 @@ msgstr "अनुमत मान (खाली = कोई भी)"msgid "Allowed values for {field}"msgstr "{field} के लिए अनुमत मान"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Almost done. Here's what happened and what's left."+msgstr "लगभग पूरा हो गया। देखें कि क्या हुआ और क्या करना बाकी है।"+#: src/editor/image-upload/index.tsmsgid "Already at {assetContentPath} — reusing."msgstr "पहले से ही {assetContentPath} पर — पुन: उपयोग किया जा रहा है।"@@ -2890,10 +2894,19 @@ msgstr "Claude Code (claude) इंस्टॉल नहीं है याmsgid "Claude Desktop"msgstr "Claude Desktop"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Cleanup didn’t finish"+msgstr "सफ़ाई पूरी नहीं हुई"+#: src/uninstall/UninstallNoticeScreen.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Cleanup log"msgstr "सफ़ाई लॉग"+#: src/uninstall/UninstallApp.tsx+msgid "Cleanup may still be running."+msgstr "सफ़ाई अभी भी चल रही हो सकती है।"+#: src/components/settings/SearchSection.tsx#: src/components/SkillPluginBundleDialog.tsxmsgid "Clear"@@ -3033,6 +3046,8 @@ msgstr "क्लोन किया जा रहा है…"#: src/components/ui/sheet.tsx#: src/editor/find-replace/FindReplaceBar.tsx#: src/lib/native-menu-catalog.ts+#: src/uninstall/UninstallApp.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Close"msgstr "बंद करें"@@ -5101,6 +5116,10 @@ msgstr "पूर्ण"msgid "Done"msgstr "पूर्ण"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "Done."+msgstr "पूर्ण।"+#: src/components/ui/tag-pill-input.tsxmsgid "Double-click to edit"msgstr "संपादित करने के लिए डबल-क्लिक करें"@@ -7722,6 +7741,10 @@ msgstr "आपके ज्ञानकोष को Open Knowledge Format कmsgid "Kept both — \"{0}\" is its own skill now"msgstr "दोनों रखे गए — \"{0}\" अब अपनी अलग स्किल है"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Kept your content"+msgstr "आपका कॉन्टेंट सुरक्षित रखा गया"+#: src/components/settings/SearchSection.tsxmsgid "Key ending in {keyHint}"msgstr "{keyHint} पर समाप्त होने वाली कुंजी"@@ -8235,6 +8258,10 @@ msgstr "Markdown"msgid "Markdown checks do not apply to this file."msgstr "Markdown जाँच इस फ़ाइल पर लागू नहीं होती है।"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Markdown files and authored skills were left untouched."+msgstr "Markdown फ़ाइलों और आपके बनाए स्किल में कोई बदलाव नहीं किया गया।"+#: src/components/EditorModeToggle.tsxmsgid "Markdown source"msgstr "Markdown स्रोत"@@ -8449,6 +8476,10 @@ msgstr "ब्लॉक हिलाएँ"msgid "Move down"msgstr "नीचे ले जाएँ"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Move OpenKnowledge.app to the Trash"+msgstr "OpenKnowledge.app को ट्रैश में ले जाएँ"+#: src/components/SkillFileRenameDialog.tsxmsgid "Move or rename this file inside the skill — the path stays under references/ or scripts/."msgstr "इस फ़ाइल को स्किल के भीतर हिलाएँ या इसका नाम बदलें — पथ references/ या scripts/ के अंतर्गत ही रहता है।"@@ -9941,6 +9972,10 @@ msgstr "OpenKnowledge ने {subject} को संपादित कियाmsgid "OpenKnowledge edited a document"msgstr "OpenKnowledge ने एक दस्तावेज़ संपादित किया"+#: src/uninstall/UninstallResultScreen.tsx+msgid "OpenKnowledge files were removed"+msgstr "OpenKnowledge की फ़ाइलें हटा दी गईं"+#: src/lib/acp/tool-call-display.tsmsgid "OpenKnowledge imported {source}"msgstr "OpenKnowledge ने {source} आयात किया"@@ -11299,6 +11334,10 @@ msgstr "\"{0}\" को बाकी हर स्थान से हटा दmsgid "Removed \"{projectName}\" from recent projects. Its folder no longer exists."msgstr "\"{projectName}\" को हाल के प्रोजेक्ट से हटा दिया गया। इसका फ़ोल्डर अब मौजूद नहीं है।"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Removed OpenKnowledge files"+msgstr "OpenKnowledge की फ़ाइलें हटाई गईं"+#. placeholder {0}: connection.label#. placeholder {1}: sharedChoice.peers#: src/components/settings/AgentConnectionDialogs.tsx@@ -11790,9 +11829,14 @@ msgstr "File Explorer में दिखाएँ"#: src/components/command-palette-commands.ts#: src/lib/platform-labels.ts+#: src/uninstall/UninstallResultScreen.tsxmsgid "Reveal in Finder"msgstr "Finder में दिखाएँ"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Reveal in Finder shows the app so you can drag it to the Trash."+msgstr "Finder में दिखाएँ से ऐप दिखाई देता है, ताकि आप उसे ट्रैश में खींच सकें।"+#: src/components/SkillOriginInline.tsxmsgid "Revert"msgstr "वापस लें"@@ -12489,6 +12533,10 @@ msgstr "सेट अप किया जा रहा है"msgid "Settings"msgstr "सेटिंग"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Settings and integrations were cleaned up."+msgstr "सेटिंग और इंटीग्रेशन हटा दिए गए।"+#: src/components/settings/SettingsDialogShell.tsxmsgid "Settings content"msgstr "सेटिंग सामग्री"@@ -13005,6 +13053,10 @@ msgstr "छोड़ी गई कुछ फ़ाइलों को सुरmsgid "Some files are not listed — the working tree has too many changes."msgstr "कुछ फ़ाइलें सूचीबद्ध नहीं हैं: वर्किंग ट्री में बहुत अधिक बदलाव हैं।"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Some files may not have been removed. Open the cleanup log for details. You can reopen OpenKnowledge to try again."+msgstr "हो सकता है कि कुछ फ़ाइलें हटाई न गई हों। जानकारी के लिए सफ़ाई लॉग खोलें। दोबारा कोशिश करने के लिए OpenKnowledge फिर से खोल सकते हैं।"+#: src/components/settings/SavedThemesTiles.tsxmsgid "Some saved themes aren’t shown because the theme folder exceeds the scan limit."msgstr "कुछ सहेजी गई थीम नहीं दिखाई जा रही हैं क्योंकि थीम फ़ोल्डर स्कैन सीमा से बड़ा है।"@@ -14698,6 +14750,10 @@ msgstr "शीर्षक"msgid "To do"msgstr "करना है"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "To do."+msgstr "करना है।"+#: src/lib/keyboard-shortcuts.tsmsgid "Toggle a bullet list."msgstr "बुलेट सूची चालू या बंद करें।"@@ -14956,6 +15012,10 @@ msgstr "संपादित करने के लिए लिखें; <0>msgid "Type to find a doc"msgstr "कोई दस्तावेज़ खोजने के लिए लिखें"+#: src/uninstall/UninstallApp.tsx+msgid "Unable to show the cleanup result"+msgstr "सफ़ाई का परिणाम नहीं दिखाया जा सका"+#: src/components/McpConsentDialogBody.tsxmsgid "unavailable on this platform"msgstr "इस प्लेटफ़ॉर्म पर अनुपलब्ध"diff --git a/packages/app/src/locales/id/messages.json b/packages/app/src/locales/id/messages.jsonindex fb642be48..92ebec001 100644--- a/packages/app/src/locales/id/messages.json+++ b/packages/app/src/locales/id/messages.json@@ -996,6 +996,9 @@"BVkqD9": ["Pemeliharaan indeks dihentikan sementara karena atribut Git lainnya mengontrol index.md. Perbarui .gitattributes sehingga jalur index.md yang dicakup menggunakan merge=union, lalu coba lagi."],+ "BVmgJG": [+ "Tampilkan di Finder menampilkan aplikasi agar Anda dapat menyeretnya ke Tong Sampah."+ ],"BWTzAb": ["Manual"],"BY-g4_": ["Tambahkan pola"],"Ba4D2x": ["Templat diimpor"],@@ -1232,6 +1235,7 @@"EPKVES": ["Perbarui \"", ["skillName"], "\" menimpa suntingan Anda?"],"EPwuTC": [["usedLabel"], " / ", ["sizeLabel"], " token terpakai"],"EQXPXf": ["Gulir ke akhir"],+ "ES1zFv": ["Pindahkan OpenKnowledge.app ke Tong Sampah"],"ETyvvg": ["Tidak ada bahasa yang cocok."],"EWCJFu": [["target"], " dibuat"],"EWPtMO": ["Kode"],@@ -1674,6 +1678,7 @@"JM_aq-": ["Pakai URL https:// — http:// hanya diizinkan untuk localhost."],"JOcPqH": ["Bawa repositori remote ke komputer ini."],"JOhCT9": ["Push menyertakan"],+ "JReD69": ["File OpenKnowledge telah dihapus"],"JWsZlx": ["Buka sebuah proyek untuk menyunting."],"JYj5R2": ["Pilih file"],"JZ8cO6": ["Terang, gelap, atau ikuti sistem."],@@ -1909,6 +1914,7 @@"M7SqjM": ["Buka lagi"],"M92_0q": ["Tutup komentar"],"M9597s": ["Menyiapkan URL berbagi..."],+ "MAVznT": ["Pengaturan dan integrasi telah dihapus."],"MBKkUy": ["skills.sh tidak tersedia; menampilkan hasil GitHub (tanpa peringkat pemasangan)."],"MBfjUk": [["0", "plural", { "other": ["Mengunggah ", "#", " lampiran"] }]],"MCjC9A": ["Hapus ", ["deleteDescriptorLabel"]],@@ -2612,6 +2618,7 @@["configFile"],"</0> proyek Anda, yang sepenuhnya mengatur lint untuk proyek ini. Nyalakan atau matikan aturan dan sunting opsinya di sini; perubahannya ditulis kembali ke berkas itu."],+ "V3JCWv": ["Pembersihan belum selesai"],"V3iDh1": ["Memvalidasi frontmatter dokumen terhadap berkas JSON Schema standar (draft-06, draft-07, 2019-09, atau 2020-12). Nyalakan sebuah skema untuk memvalidasi dokumen yang cocok dengan glob-nya; pelanggaran muncul sebagai peringatan dan tidak pernah menghalangi penulisan. Gunakan Sunting untuk membuka berkas skemanya."],@@ -2996,6 +3003,7 @@"ZQJ1IV": ["Mengaktifkan tab penyunting terakhir."],"ZQLDTl": ["folder dibuat"],"ZQc7C8": ["Ketik untuk menyunting; <0>Cmd/Ctrl+Enter</0> menyimpan, <1>Esc</1> membatalkan."],+ "ZR-8iJ": ["Tidak dapat menampilkan hasil pembersihan"],"ZSoojc": ["Kloning gagal — periksa URL lalu coba lagi (", ["status"], ")"],"ZU8VV_": ["Gagal menghapus: ", ["error"]],"ZVOhXM": ["Gagal memperbarui sinkronisasi — ", ["detail"]],@@ -3153,6 +3161,7 @@"aSVmqV": ["Belum ada alat AI yang terdeteksi. Setelah Anda memasang satu, hubungkan dari Pengaturan > Proyek ini."],+ "aTDVi6": ["Konten Anda dipertahankan"],"aWlJai": ["Memulai alur masuk"],"aXkLuE": ["Respons apply salah bentuk"],"a_u4ck": ["Memuat tag"],@@ -3240,6 +3249,7 @@["docName"],"\" sebelum menyambung ulang."],+ "bmI-q1": ["File OpenKnowledge dihapus"],"bnOTEz": ["Mengambil…"],"bn_MDX": ["Mengapa ini perlu diperhatikan"],"bpMVIA": [@@ -3348,6 +3358,7 @@"ciozf1": ["Keterampilan sudah ada dalam proyek"],"cjtjry": ["Menyusuri riwayat navigasi OpenKnowledge ke belakang."],"cklVjM": ["Lini masa"],+ "clJ3qM": ["Selesai."],"cnGeoo": ["Hapus"],"cqQyPB": ["Nama folder"],"crqzW5": ["Alat AI"],@@ -4599,6 +4610,7 @@["2"],"”. Apa pun di SKILL.md yang menunjuk ke berkas itu akan rusak sampai dibuat ulang."],+ "psUrB1": ["File Markdown dan skill yang Anda buat tidak diubah."],"psl2Sj": ["Perubahan Anda masih disimpan — jalankan pengujiannya lagi sebentar."],"ptQ3_N": ["lepas tautan"],"pvnfJD": ["Gelap"],@@ -5148,6 +5160,7 @@]],"vmahUq": ["Garis bawah yang sudah ada mungkin tidak langsung diperbarui."],+ "vmwZHP": ["Hampir selesai. Berikut yang sudah dilakukan dan yang masih perlu dilakukan."],"vp5vfW": ["1 jam"],"vppAju": ["Tempat lampiran yang baru ditambahkan diletakkan."],"vqJXNe": ["Pasang skill <0>open-knowledge-discovery</0>"],@@ -5199,6 +5212,9 @@"wSBXaS": ["Kelola ", ["rowLabel"]],"wT4iQr": ["Membuka pencarian penyunting visual dengan kendali penggantian terbentang."],"wTcjov": ["Tanpa ruang kerja"],+ "wTf1ag": [+ "Beberapa file mungkin belum dihapus. Buka log pembersihan untuk melihat detailnya. Anda dapat membuka kembali OpenKnowledge untuk mencoba lagi."+ ],"wU8WyK": ["Bidang elemen"],"wVa83H": ["Laporannya tidak bisa dibuat"],"wWtVYd": ["Masukkan port antara 1 dan 65535."],@@ -5311,6 +5327,7 @@"xiv-dW": ["Belum ada berkas."],"xk133d": ["Memasang skill ke ", ["path"], " — lokasi pertama menyimpan salinan aslinya"],"xloBjn": ["Jalur Relatif"],+ "xnWySt": ["Pembersihan mungkin masih berlangsung."],"xrVr_k": ["Keterampilan tidak bisa dibuat: ", ["0"]],"xsZhu-": ["Nomor halaman"],"xtJgSe": ["Sumber ini memuat beberapa keterampilan — pilih yang akan diimpor."],@@ -5354,6 +5371,7 @@"yQE2r9": ["Memuat"],"yQyglE": ["Tidak ada dokumen yang cocok"],"yR5LHI": ["Masukkan nilai heksa 6 digit seperti #1A2B3C"],+ "yU_9ur": ["Akan dikerjakan."],"yUxR-Q": ["Bentangkan ", ["keyName"]],"yWSvcf": ["Akar konten"],"yWWThY": ["Referensi aset"],diff --git a/packages/app/src/locales/id/messages.po b/packages/app/src/locales/id/messages.poindex 0d43d1462..c626516a0 100644--- a/packages/app/src/locales/id/messages.po+++ b/packages/app/src/locales/id/messages.po@@ -1897,6 +1897,10 @@ msgstr "Nilai yang diizinkan (kosong = apa saja)"msgid "Allowed values for {field}"msgstr "Nilai yang diizinkan untuk {field}"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Almost done. Here's what happened and what's left."+msgstr "Hampir selesai. Berikut yang sudah dilakukan dan yang masih perlu dilakukan."+#: src/editor/image-upload/index.tsmsgid "Already at {assetContentPath} — reusing."msgstr "Sudah ada di {assetContentPath} — memakai ulang."@@ -2890,10 +2894,19 @@ msgstr "Claude Code (claude) belum terpasang atau tidak ada di PATH Anda."msgid "Claude Desktop"msgstr "Claude Desktop"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Cleanup didn’t finish"+msgstr "Pembersihan belum selesai"+#: src/uninstall/UninstallNoticeScreen.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Cleanup log"msgstr "Log pembersihan"+#: src/uninstall/UninstallApp.tsx+msgid "Cleanup may still be running."+msgstr "Pembersihan mungkin masih berlangsung."+#: src/components/settings/SearchSection.tsx#: src/components/SkillPluginBundleDialog.tsxmsgid "Clear"@@ -3033,6 +3046,8 @@ msgstr "Mengkloning..."#: src/components/ui/sheet.tsx#: src/editor/find-replace/FindReplaceBar.tsx#: src/lib/native-menu-catalog.ts+#: src/uninstall/UninstallApp.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Close"msgstr "Tutup"@@ -5101,6 +5116,10 @@ msgstr "selesai"msgid "Done"msgstr "Selesai"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "Done."+msgstr "Selesai."+#: src/components/ui/tag-pill-input.tsxmsgid "Double-click to edit"msgstr "Klik dua kali untuk menyunting"@@ -7722,6 +7741,10 @@ msgstr "Menjaga basis pengetahuan Anda tetap selaras dengan Open Knowledge Formamsgid "Kept both — \"{0}\" is its own skill now"msgstr "Keduanya disimpan — \"{0}\" kini menjadi keterampilan tersendiri"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Kept your content"+msgstr "Konten Anda dipertahankan"+#: src/components/settings/SearchSection.tsxmsgid "Key ending in {keyHint}"msgstr "Kunci yang berakhiran {keyHint}"@@ -8235,6 +8258,10 @@ msgstr "Markdown"msgid "Markdown checks do not apply to this file."msgstr "Pemeriksaan Markdown tidak berlaku untuk file ini."+#: src/uninstall/UninstallResultScreen.tsx+msgid "Markdown files and authored skills were left untouched."+msgstr "File Markdown dan skill yang Anda buat tidak diubah."+#: src/components/EditorModeToggle.tsxmsgid "Markdown source"msgstr "Sumber markdown"@@ -8449,6 +8476,10 @@ msgstr "Pindahkan blok"msgid "Move down"msgstr "Turunkan"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Move OpenKnowledge.app to the Trash"+msgstr "Pindahkan OpenKnowledge.app ke Tong Sampah"+#: src/components/SkillFileRenameDialog.tsxmsgid "Move or rename this file inside the skill — the path stays under references/ or scripts/."msgstr "Pindahkan atau ganti nama berkas ini di dalam keterampilan — jalurnya tetap di bawah references/ atau scripts/."@@ -9941,6 +9972,10 @@ msgstr "OpenKnowledge menyunting {subject}"msgid "OpenKnowledge edited a document"msgstr "OpenKnowledge menyunting sebuah dokumen"+#: src/uninstall/UninstallResultScreen.tsx+msgid "OpenKnowledge files were removed"+msgstr "File OpenKnowledge telah dihapus"+#: src/lib/acp/tool-call-display.tsmsgid "OpenKnowledge imported {source}"msgstr "OpenKnowledge mengimpor {source}"@@ -11299,6 +11334,10 @@ msgstr "\"{0}\" dihapus dari semua lokasi lain — folder sumbernya tetap dimuatmsgid "Removed \"{projectName}\" from recent projects. Its folder no longer exists."msgstr "\"{projectName}\" dihapus dari proyek terbaru. Foldernya sudah tidak ada."+#: src/uninstall/UninstallResultScreen.tsx+msgid "Removed OpenKnowledge files"+msgstr "File OpenKnowledge dihapus"+#. placeholder {0}: connection.label#. placeholder {1}: sharedChoice.peers#: src/components/settings/AgentConnectionDialogs.tsx@@ -11790,9 +11829,14 @@ msgstr "Tampilkan di Penjelajah Berkas"#: src/components/command-palette-commands.ts#: src/lib/platform-labels.ts+#: src/uninstall/UninstallResultScreen.tsxmsgid "Reveal in Finder"msgstr "Tampilkan di Finder"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Reveal in Finder shows the app so you can drag it to the Trash."+msgstr "Tampilkan di Finder menampilkan aplikasi agar Anda dapat menyeretnya ke Tong Sampah."+#: src/components/SkillOriginInline.tsxmsgid "Revert"msgstr "Kembalikan"@@ -12489,6 +12533,10 @@ msgstr "Menyiapkan"msgid "Settings"msgstr "Pengaturan"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Settings and integrations were cleaned up."+msgstr "Pengaturan dan integrasi telah dihapus."+#: src/components/settings/SettingsDialogShell.tsxmsgid "Settings content"msgstr "Isi pengaturan"@@ -13005,6 +13053,10 @@ msgstr "Beberapa file yang dilepas tidak dapat disisipkan dengan aman."msgid "Some files are not listed — the working tree has too many changes."msgstr "Sebagian file tidak ditampilkan: working tree memiliki terlalu banyak perubahan."+#: src/uninstall/UninstallResultScreen.tsx+msgid "Some files may not have been removed. Open the cleanup log for details. You can reopen OpenKnowledge to try again."+msgstr "Beberapa file mungkin belum dihapus. Buka log pembersihan untuk melihat detailnya. Anda dapat membuka kembali OpenKnowledge untuk mencoba lagi."+#: src/components/settings/SavedThemesTiles.tsxmsgid "Some saved themes aren’t shown because the theme folder exceeds the scan limit."msgstr "Beberapa tema tersimpan tidak ditampilkan karena folder tema melewati batas pemindaian."@@ -14698,6 +14750,10 @@ msgstr "Judul"msgid "To do"msgstr "Akan dikerjakan"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "To do."+msgstr "Akan dikerjakan."+#: src/lib/keyboard-shortcuts.tsmsgid "Toggle a bullet list."msgstr "Menyalakan atau mematikan daftar berpoin."@@ -14956,6 +15012,10 @@ msgstr "Ketik untuk menyunting; <0>Cmd/Ctrl+Enter</0> menyimpan, <1>Esc</1> membmsgid "Type to find a doc"msgstr "Ketik untuk menemukan sebuah dokumen"+#: src/uninstall/UninstallApp.tsx+msgid "Unable to show the cleanup result"+msgstr "Tidak dapat menampilkan hasil pembersihan"+#: src/components/McpConsentDialogBody.tsxmsgid "unavailable on this platform"msgstr "tidak tersedia di platform ini"diff --git a/packages/app/src/locales/ko/messages.json b/packages/app/src/locales/ko/messages.jsonindex e4a216393..147f761e6 100644--- a/packages/app/src/locales/ko/messages.json+++ b/packages/app/src/locales/ko/messages.json@@ -962,6 +962,7 @@"BVkqD9": ["다른 Git 속성이 index.md를 제어하므로 인덱스 유지 관리가 일시 중지되었습니다. 범위가 지정된 index.md 경로가 merge=union을 사용하도록 .gitattributes를 업데이트한 후 다시 시도합니다."],+ "BVmgJG": ["Finder에서 보기를 누르면 앱이 표시되어 휴지통으로 드래그할 수 있습니다."],"BWTzAb": ["수동"],"BY-g4_": ["패턴 추가"],"Ba4D2x": ["템플릿을 가져왔습니다"],@@ -1190,6 +1191,7 @@"EPKVES": ["\"", ["skillName"], "\"을 편집한 내용 위에 업데이트할까요?"],"EPwuTC": [["usedLabel"], " / ", ["sizeLabel"], " 토큰 사용"],"EQXPXf": ["끝으로 스크롤"],+ "ES1zFv": ["OpenKnowledge.app을 휴지통으로 이동하세요"],"ETyvvg": ["일치하는 언어가 없습니다."],"EWCJFu": [["target"], " 생성됨"],"EWPtMO": ["코드"],@@ -1599,6 +1601,7 @@"JM_aq-": ["https:// URL을 사용합니다. http://는 localhost에만 허용됩니다."],"JOcPqH": ["원격 리포지토리를 이 컴퓨터로 가져옵니다."],"JOhCT9": ["푸시에 포함됨"],+ "JReD69": ["OpenKnowledge 파일을 제거했습니다"],"JWsZlx": ["편집할 프로젝트를 엽니다."],"JYj5R2": ["파일 찾아보기"],"JZ8cO6": ["밝은 테마, 어두운 테마 또는 운영 체제 설정을 따릅니다."],@@ -1827,6 +1830,7 @@"M7SqjM": ["다시 열기"],"M92_0q": ["댓글 닫기"],"M9597s": ["공유 URL 준비 중…"],+ "MAVznT": ["설정과 연동을 정리했습니다."],"MBKkUy": ["skills.sh를 사용할 수 없어 GitHub 결과를 보기로 전환합니다(설치 순위 없음)."],"MBfjUk": [["0", "plural", { "other": ["첨부 ", "#", "개 업로드 중"] }]],"MCjC9A": [["deleteDescriptorLabel"], " 삭제"],@@ -2511,6 +2515,7 @@["configFile"],"</0> 파일에서 가져오며, 이 파일이 프로젝트의 linting을 완전히 관리합니다. 여기서 규칙을 켜거나 끄고 옵션을 편집하면 파일에 다시 기록됩니다."],+ "V3JCWv": ["정리가 완료되지 않았습니다"],"V3iDh1": ["표준 JSON Schema 파일(draft-06, draft-07, 2019-09, 2020-12)에 대해 문서 frontmatter를 검증합니다. 스키마를 켜면 glob과 일치하는 문서를 검증하며, 위반은 경고로 나타나고 저장을 차단하지 않습니다. 스키마 파일을 열려면 편집을 사용합니다."],@@ -2870,6 +2875,7 @@"ZQJ1IV": ["마지막 편집기 탭 활성화"],"ZQLDTl": ["폴더 생성됨"],"ZQc7C8": ["입력하여 편집하세요. <0>Cmd/Ctrl+Enter</0>로 저장하고 <1>Esc</1>로 취소합니다."],+ "ZR-8iJ": ["정리 결과를 표시할 수 없습니다"],"ZSoojc": ["클론 실패, URL을 확인하고 다시 시도하세요 (", ["status"], ")"],"ZU8VV_": ["제거 실패: ", ["error"]],"ZVOhXM": ["동기화를 업데이트하지 못했습니다. ", ["detail"]],@@ -3027,6 +3033,7 @@"aRI3Om": ["창 닫기"],"aS77on": ["무엇이 바뀌나요?"],"aSVmqV": ["아직 감지된 AI 도구가 없습니다. 설치한 후 Settings > This project에서 연결하세요."],+ "aTDVi6": ["콘텐츠를 보관했습니다"],"aWlJai": ["로그인 흐름 시작 중"],"aXkLuE": ["잘못된 apply 응답"],"a_u4ck": ["태그 불러오는 중"],@@ -3099,6 +3106,7 @@"bkQRMh": ["문단"],"blFttG": ["프로젝트 검색"],"bmC18N": ["다시 연결하기 전에 \"", ["docName"], "\"의 로컬 협업 데이터를 지우는 중입니다."],+ "bmI-q1": ["OpenKnowledge 파일 제거 완료"],"bnOTEz": ["가져오는 중…"],"bn_MDX": ["주의가 필요한 이유"],"bpMVIA": ["링크 대상 \"", ["shown"], "\"을 프로젝트 로컬 대상으로 확인할 수 없습니다."],@@ -3199,6 +3207,7 @@"ciozf1": ["이미 프로젝트에 있는 스킬"],"cjtjry": ["OpenKnowledge 탐색 기록을 뒤로 이동합니다."],"cklVjM": ["타임라인"],+ "clJ3qM": ["완료"],"cnGeoo": ["삭제"],"cqQyPB": ["폴더 이름"],"crqzW5": ["AI 도구"],@@ -4390,6 +4399,7 @@["2"],"\" 스킬에서 영구적으로 삭제됩니다. 이를 가리키는 SKILL.md의 항목은 다시 만들 때까지 작동하지 않습니다."],+ "psUrB1": ["Markdown 파일과 직접 작성한 스킬은 변경하지 않았습니다."],"psl2Sj": ["변경사항을 아직 저장 중입니다. 잠시 후 테스트를 다시 실행합니다."],"ptQ3_N": ["링크 해제"],"pvnfJD": ["어두운 테마"],@@ -4901,6 +4911,7 @@["count", "plural", { "other": ["자동 수정이 알려진 문제 ", "#", "개를 즉시 수정합니다."] }]],"vmahUq": ["기존 밑줄은 즉시 업데이트되지 않을 수 있습니다."],+ "vmwZHP": ["거의 완료되었습니다. 완료된 작업과 남은 작업을 확인하세요."],"vp5vfW": ["1시간"],"vppAju": ["새로 추가한 첨부 파일의 위치"],"vqJXNe": ["<0>open-knowledge-discovery</0> 스킬 설치"],@@ -4950,6 +4961,9 @@"wSBXaS": [["rowLabel"], " 관리"],"wT4iQr": ["교체 컨트롤을 확장한 상태로 비주얼 편집기 찾기를 엽니다."],"wTcjov": ["워크스페이스 없음"],+ "wTf1ag": [+ "일부 파일이 제거되지 않았을 수 있습니다. 정리 로그를 열어 자세한 내용을 확인하세요. OpenKnowledge를 다시 열어 재시도할 수 있습니다."+ ],"wU8WyK": ["요소 필드"],"wVa83H": ["보고서를 만들지 못했습니다"],"wWtVYd": ["1에서 65535 사이의 포트를 입력하세요."],@@ -5066,6 +5080,7 @@"xiv-dW": ["아직 파일이 없습니다."],"xk133d": ["스킬을 ", ["path"], "에 설치합니다 — 첫 위치가 스킬의 원본 사본을 보관합니다"],"xloBjn": ["상대 경로"],+ "xnWySt": ["정리가 아직 진행 중일 수 있습니다."],"xrVr_k": ["스킬 생성 실패: ", ["0"]],"xsZhu-": ["페이지 번호"],"xtJgSe": ["이 소스에는 여러 스킬이 들어 있습니다. 가져올 항목을 선택하세요."],@@ -5107,6 +5122,7 @@"yQE2r9": ["로드 중"],"yQyglE": ["일치하는 문서 없음"],"yR5LHI": ["6자리 16진수 입력, 예: #1A2B3C"],+ "yU_9ur": ["할 일"],"yUxR-Q": [["keyName"], " 펼치기"],"yWSvcf": ["콘텐츠 루트"],"yWWThY": ["에셋 참조"],diff --git a/packages/app/src/locales/ko/messages.po b/packages/app/src/locales/ko/messages.poindex 23e575b3d..290c96b29 100644--- a/packages/app/src/locales/ko/messages.po+++ b/packages/app/src/locales/ko/messages.po@@ -1901,6 +1901,10 @@ msgstr "허용되는 값 (비워 두면 모두 허용)"msgid "Allowed values for {field}"msgstr "{field}에 허용되는 값"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Almost done. Here's what happened and what's left."+msgstr "거의 완료되었습니다. 완료된 작업과 남은 작업을 확인하세요."+#: src/editor/image-upload/index.tsmsgid "Already at {assetContentPath} — reusing."msgstr "이미 {assetContentPath}에 있으므로 재사용합니다."@@ -2894,10 +2898,19 @@ msgstr "Claude Code (claude) 미설치 또는 PATH 미등록"msgid "Claude Desktop"msgstr "Claude Desktop"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Cleanup didn’t finish"+msgstr "정리가 완료되지 않았습니다"+#: src/uninstall/UninstallNoticeScreen.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Cleanup log"msgstr "정리 로그"+#: src/uninstall/UninstallApp.tsx+msgid "Cleanup may still be running."+msgstr "정리가 아직 진행 중일 수 있습니다."+#: src/components/settings/SearchSection.tsx#: src/components/SkillPluginBundleDialog.tsxmsgid "Clear"@@ -3037,6 +3050,8 @@ msgstr "클론 중…"#: src/components/ui/sheet.tsx#: src/editor/find-replace/FindReplaceBar.tsx#: src/lib/native-menu-catalog.ts+#: src/uninstall/UninstallApp.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Close"msgstr "닫기"@@ -5105,6 +5120,10 @@ msgstr "완료"msgid "Done"msgstr "완료"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "Done."+msgstr "완료"+#: src/components/ui/tag-pill-input.tsxmsgid "Double-click to edit"msgstr "편집하려면 두 번 클릭"@@ -7726,6 +7745,10 @@ msgstr "지식 베이스를 Open Knowledge Format에 맞게 유지합니다."msgid "Kept both — \"{0}\" is its own skill now"msgstr "둘 다 유지됨. \"{0}\"은 이제 별도 스킬입니다"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Kept your content"+msgstr "콘텐츠를 보관했습니다"+#: src/components/settings/SearchSection.tsxmsgid "Key ending in {keyHint}"msgstr "끝이 {keyHint}인 키"@@ -8239,6 +8262,10 @@ msgstr "Markdown"msgid "Markdown checks do not apply to this file."msgstr "Markdown 검사는 이 파일에 적용되지 않습니다."+#: src/uninstall/UninstallResultScreen.tsx+msgid "Markdown files and authored skills were left untouched."+msgstr "Markdown 파일과 직접 작성한 스킬은 변경하지 않았습니다."+#: src/components/EditorModeToggle.tsxmsgid "Markdown source"msgstr "Markdown 소스"@@ -8453,6 +8480,10 @@ msgstr "블록 이동"msgid "Move down"msgstr "아래로 이동"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Move OpenKnowledge.app to the Trash"+msgstr "OpenKnowledge.app을 휴지통으로 이동하세요"+#: src/components/SkillFileRenameDialog.tsxmsgid "Move or rename this file inside the skill — the path stays under references/ or scripts/."msgstr "이 스킬 내부에서 파일을 이동하거나 이름을 바꿉니다. 경로는 references/ 또는 scripts/ 아래에 유지됩니다."@@ -9945,6 +9976,10 @@ msgstr "OpenKnowledge에서 {subject} 편집"msgid "OpenKnowledge edited a document"msgstr "OpenKnowledge에서 문서 편집"+#: src/uninstall/UninstallResultScreen.tsx+msgid "OpenKnowledge files were removed"+msgstr "OpenKnowledge 파일을 제거했습니다"+#: src/lib/acp/tool-call-display.tsmsgid "OpenKnowledge imported {source}"msgstr "OpenKnowledge에서 {source} 가져오기"@@ -11303,6 +11338,10 @@ msgstr "다른 모든 위치에서 \"{0}\"을 제거했습니다. 소스 폴더msgid "Removed \"{projectName}\" from recent projects. Its folder no longer exists."msgstr "최근 프로젝트에서 \"{projectName}\"을 제거했습니다. 폴더가 더 이상 존재하지 않습니다."+#: src/uninstall/UninstallResultScreen.tsx+msgid "Removed OpenKnowledge files"+msgstr "OpenKnowledge 파일 제거 완료"+#. placeholder {0}: connection.label#. placeholder {1}: sharedChoice.peers#: src/components/settings/AgentConnectionDialogs.tsx@@ -11794,9 +11833,14 @@ msgstr "파일 탐색기에서 보기"#: src/components/command-palette-commands.ts#: src/lib/platform-labels.ts+#: src/uninstall/UninstallResultScreen.tsxmsgid "Reveal in Finder"msgstr "Finder에서 보기"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Reveal in Finder shows the app so you can drag it to the Trash."+msgstr "Finder에서 보기를 누르면 앱이 표시되어 휴지통으로 드래그할 수 있습니다."+#: src/components/SkillOriginInline.tsxmsgid "Revert"msgstr "되돌리기"@@ -12493,6 +12537,10 @@ msgstr "설정 중"msgid "Settings"msgstr "설정"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Settings and integrations were cleaned up."+msgstr "설정과 연동을 정리했습니다."+#: src/components/settings/SettingsDialogShell.tsxmsgid "Settings content"msgstr "설정 콘텐츠"@@ -13009,6 +13057,10 @@ msgstr "놓은 파일 중 일부를 안전하게 삽입할 수 없습니다."msgid "Some files are not listed — the working tree has too many changes."msgstr "일부 파일이 표시되지 않았습니다. 작업 트리의 변경 사항이 너무 많습니다."+#: src/uninstall/UninstallResultScreen.tsx+msgid "Some files may not have been removed. Open the cleanup log for details. You can reopen OpenKnowledge to try again."+msgstr "일부 파일이 제거되지 않았을 수 있습니다. 정리 로그를 열어 자세한 내용을 확인하세요. OpenKnowledge를 다시 열어 재시도할 수 있습니다."+#: src/components/settings/SavedThemesTiles.tsxmsgid "Some saved themes aren’t shown because the theme folder exceeds the scan limit."msgstr "테마 폴더가 스캔 한도를 초과해 일부 저장된 테마가 나타나지 않습니다."@@ -14702,6 +14754,10 @@ msgstr "제목"msgid "To do"msgstr "할 일"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "To do."+msgstr "할 일"+#: src/lib/keyboard-shortcuts.tsmsgid "Toggle a bullet list."msgstr "글머리 기호 목록을 전환합니다."@@ -14960,6 +15016,10 @@ msgstr "입력하여 편집하세요. <0>Cmd/Ctrl+Enter</0>로 저장하고 <1>Emsgid "Type to find a doc"msgstr "문서를 찾으려면 입력"+#: src/uninstall/UninstallApp.tsx+msgid "Unable to show the cleanup result"+msgstr "정리 결과를 표시할 수 없습니다"+#: src/components/McpConsentDialogBody.tsxmsgid "unavailable on this platform"msgstr "이 플랫폼에서 사용 불가"diff --git a/packages/app/src/locales/pseudo/messages.json b/packages/app/src/locales/pseudo/messages.jsonindex 557e4c37a..69c17e198 100644--- a/packages/app/src/locales/pseudo/messages.json+++ b/packages/app/src/locales/pseudo/messages.json@@ -998,6 +998,7 @@"BVkqD9": ["Ĩńďēx ḿàĩńţēńàńćē ĩś ƥàũśēď ƀēćàũśē àńōţĥēŕ Ĝĩţ àţţŕĩƀũţē ćōńţŕōĺś ĩńďēx.ḿď. Ũƥďàţē .ĝĩţàţţŕĩƀũţēś śō ţĥē śćōƥēď ĩńďēx.ḿď ƥàţĥś ũśē ḿēŕĝē=ũńĩōń, ţĥēń ţŕŷ àĝàĩń."],+ "BVmgJG": ["Ŕēvēàĺ ĩń Ƒĩńďēŕ śĥōŵś ţĥē àƥƥ śō ŷōũ ćàń ďŕàĝ ĩţ ţō ţĥē Ţŕàśĥ."],"BWTzAb": ["Ḿàńũàĺ"],"BY-g4_": ["Àďď ƥàţţēŕń"],"Ba4D2x": ["Ţēḿƥĺàţē ĩḿƥōŕţēď"],@@ -1231,6 +1232,7 @@"EPKVES": ["Ũƥďàţē \"", ["skillName"], "\" ōvēŕ ŷōũŕ ēďĩţś?"],"EPwuTC": [["usedLabel"], " / ", ["sizeLabel"], " ţōķēńś ũśēď"],"EQXPXf": ["Śćŕōĺĺ ţō ēńď"],+ "ES1zFv": ["Ḿōvē ŌƥēńĶńōŵĺēďĝē.àƥƥ ţō ţĥē Ţŕàśĥ"],"ETyvvg": ["Ńō ĺàńĝũàĝē ḿàţćĥ."],"EWCJFu": ["Ćŕēàţēď ", ["target"]],"EWPtMO": ["Ćōďē"],@@ -1650,6 +1652,7 @@"JM_aq-": ["Ũśē àń ĥţţƥś:// ŨŔĹ — ĥţţƥ:// ĩś ōńĺŷ àĺĺōŵēď ƒōŕ ĺōćàĺĥōśţ."],"JOcPqH": ["ßŕĩńĝ à ŕēḿōţē ŕēƥōśĩţōŕŷ ōńţō ţĥĩś ḿàćĥĩńē."],"JOhCT9": ["Ƥũśĥ ĩńćĺũďēś"],+ "JReD69": ["ŌƥēńĶńōŵĺēďĝē ƒĩĺēś ŵēŕē ŕēḿōvēď"],"JWsZlx": ["Ōƥēń à ƥŕōĴēćţ ţō ēďĩţ."],"JYj5R2": ["ßŕōŵśē ƒĩĺēś"],"JZ8cO6": ["Ĺĩĝĥţ, ďàŕķ, ōŕ ƒōĺĺōŵ ţĥē ŌŚ."],@@ -1892,6 +1895,7 @@"M7SqjM": ["Ŕēōƥēń"],"M92_0q": ["Ćĺōśē ćōḿḿēńţ"],"M9597s": ["Ƥŕēƥàŕĩńĝ śĥàŕē ŨŔĹ..."],+ "MAVznT": ["Śēţţĩńĝś àńď ĩńţēĝŕàţĩōńś ŵēŕē ćĺēàńēď ũƥ."],"MBKkUy": ["śķĩĺĺś.śĥ ĩś ũńàvàĩĺàƀĺē; śĥōŵĩńĝ ĜĩţĤũƀ ŕēśũĺţś (ńō ĩńśţàĺĺ ŕàńķĩńĝ)."],"MBfjUk": [[@@ -2605,6 +2609,7 @@["configFile"],"</0> ƒĩĺē, ŵĥĩćĥ ƒũĺĺŷ ĝōvēŕńś ĺĩńţĩńĝ ƒōŕ ţĥĩś ƥŕōĴēćţ. Ţũŕń ŕũĺēś ōń ōŕ ōƒƒ àńď ēďĩţ ţĥēĩŕ ōƥţĩōńś ĥēŕē; ćĥàńĝēś ŵŕĩţē ƀàćķ ţō ţĥē ƒĩĺē."],+ "V3JCWv": ["Ćĺēàńũƥ ďĩďń’ţ ƒĩńĩśĥ"],"V3iDh1": ["Vàĺĩďàţē ďōćũḿēńţ ƒŕōńţḿàţţēŕ àĝàĩńśţ śţàńďàŕď ĵŚŌŃ Śćĥēḿà ƒĩĺēś (ďŕàƒţ-06, ďŕàƒţ-07, 2019-09, ōŕ 2020-12). Ţōĝĝĺē à śćĥēḿà ōń ţō vàĺĩďàţē ţĥē ďōćś ĩţś ĝĺōƀś ḿàţćĥ; vĩōĺàţĩōńś śũŕƒàćē àś ŵàŕńĩńĝś àńď ńēvēŕ ƀĺōćķ à ŵŕĩţē. Ũśē Ēďĩţ ţō ōƥēń ţĥē śćĥēḿà ƒĩĺē."],@@ -2969,6 +2974,7 @@"ZQJ1IV": ["Àćţĩvàţē ţĥē ĺàśţ ēďĩţōŕ ţàƀ."],"ZQLDTl": ["ćŕēàţēď ƒōĺďēŕ"],"ZQc7C8": ["Ţŷƥē ţō ēďĩţ; <0>Ćḿď/Ćţŕĺ+Ēńţēŕ</0> śàvēś, <1>Ēść</1> ćàńćēĺś."],+ "ZR-8iJ": ["Ũńàƀĺē ţō śĥōŵ ţĥē ćĺēàńũƥ ŕēśũĺţ"],"ZSoojc": ["Ćĺōńē ƒàĩĺēď — ćĥēćķ ţĥē ŨŔĹ àńď ţŕŷ àĝàĩń (", ["status"], ")"],"ZU8VV_": ["Ŕēḿōvē ƒàĩĺēď: ", ["error"]],"ZVOhXM": ["Ƒàĩĺēď ţō ũƥďàţē śŷńć — ", ["detail"]],@@ -3134,6 +3140,7 @@"aSVmqV": ["Ńō ÀĨ ţōōĺś ďēţēćţēď ŷēţ. Ōńćē ŷōũ ĩńśţàĺĺ ōńē, ćōńńēćţ ĩţ ƒŕōḿ Śēţţĩńĝś > Ţĥĩś ƥŕōĴēćţ."],+ "aTDVi6": ["Ķēƥţ ŷōũŕ ćōńţēńţ"],"aWlJai": ["Śţàŕţĩńĝ śĩĝń-ĩń ƒĺōŵ"],"aXkLuE": ["Ḿàĺƒōŕḿēď àƥƥĺŷ ŕēśƥōńśē"],"a_u4ck": ["Ĺōàďĩńĝ ţàĝś"],@@ -3208,6 +3215,7 @@"bkQRMh": ["Ƥàŕàĝŕàƥĥ"],"blFttG": ["Śēàŕćĥ ƥŕōĴēćţś"],"bmC18N": ["Ćĺēàŕĩńĝ ĺōćàĺ ćōĺĺàƀōŕàţĩōń ďàţà ƒōŕ \"", ["docName"], "\" ƀēƒōŕē ŕēćōńńēćţĩńĝ."],+ "bmI-q1": ["Ŕēḿōvēď ŌƥēńĶńōŵĺēďĝē ƒĩĺēś"],"bnOTEz": ["Ŕēţŕĩēvĩńĝ…"],"bn_MDX": ["Ŵĥŷ ţĥĩś ńēēďś àţţēńţĩōń"],"bpMVIA": ["Ĺĩńķ ţàŕĝēţ \"", ["shown"], "\" ćōũĺď ńōţ ƀē ŕēśōĺvēď ţō à ƥŕōĴēćţ-ĺōćàĺ ţàŕĝēţ."],@@ -3315,6 +3323,7 @@"ciozf1": ["Śķĩĺĺ àĺŕēàďŷ ĩń ƥŕōĴēćţ"],"cjtjry": ["Ţŕàvēŕśē ŌƥēńĶńōŵĺēďĝē ńàvĩĝàţĩōń ĥĩśţōŕŷ ƀàćķŵàŕď."],"cklVjM": ["Ţĩḿēĺĩńē"],+ "clJ3qM": ["Ďōńē."],"cnGeoo": ["Ďēĺēţē"],"cqQyPB": ["Ƒōĺďēŕ ńàḿē"],"crqzW5": ["ÀĨ ţōōĺś"],@@ -4570,6 +4579,7 @@["2"],"\" śķĩĺĺ. Àńŷţĥĩńĝ ĩń ŚĶĨĹĹ.ḿď ţĥàţ ƥōĩńţś àţ ĩţ ŵĩĺĺ ƀŕēàķ ũńţĩĺ ĩţ'ś ŕēćŕēàţēď."],+ "psUrB1": ["Ḿàŕķďōŵń ƒĩĺēś àńď àũţĥōŕēď śķĩĺĺś ŵēŕē ĺēƒţ ũńţōũćĥēď."],"psl2Sj": ["Ŷōũŕ ćĥàńĝē ĩś śţĩĺĺ ƀēĩńĝ śàvēď — ŕũń ţĥē ţēśţ àĝàĩń ĩń à ḿōḿēńţ."],"ptQ3_N": ["ũńĺĩńķ"],"pvnfJD": ["Ďàŕķ"],@@ -5135,6 +5145,7 @@]],"vmahUq": ["Ēxĩśţĩńĝ ũńďēŕĺĩńēś ḿàŷ ńōţ ũƥďàţē ĩḿḿēďĩàţēĺŷ."],+ "vmwZHP": ["Àĺḿōśţ ďōńē. Ĥēŕē'ś ŵĥàţ ĥàƥƥēńēď àńď ŵĥàţ'ś ĺēƒţ."],"vp5vfW": ["1 ĥōũŕ"],"vppAju": ["Ŵĥēŕē ńēŵĺŷ àďďēď àţţàćĥḿēńţś àŕē ƥĺàćēď."],"vqJXNe": ["Ĩńśţàĺĺ ţĥē <0>ōƥēń-ķńōŵĺēďĝē-ďĩśćōvēŕŷ</0> śķĩĺĺ"],@@ -5182,6 +5193,9 @@"wSBXaS": ["Ḿàńàĝē ", ["rowLabel"]],"wT4iQr": ["Ōƥēń vĩśũàĺ-ēďĩţōŕ ƒĩńď ŵĩţĥ ŕēƥĺàćē ćōńţŕōĺś ēxƥàńďēď."],"wTcjov": ["Ńō ŵōŕķśƥàćē"],+ "wTf1ag": [+ "Śōḿē ƒĩĺēś ḿàŷ ńōţ ĥàvē ƀēēń ŕēḿōvēď. Ōƥēń ţĥē ćĺēàńũƥ ĺōĝ ƒōŕ ďēţàĩĺś. Ŷōũ ćàń ŕēōƥēń ŌƥēńĶńōŵĺēďĝē ţō ţŕŷ àĝàĩń."+ ],"wU8WyK": ["Ēĺēḿēńţ ƒĩēĺďś"],"wVa83H": ["Ćōũĺďń'ţ ćŕēàţē ţĥē ŕēƥōŕţ"],"wWtVYd": ["Ēńţēŕ à ƥōŕţ ƀēţŵēēń 1 àńď 65535."],@@ -5300,6 +5314,7 @@"xiv-dW": ["Ńō ƒĩĺēś ŷēţ."],"xk133d": ["Ĩńśţàĺĺś ţĥē śķĩĺĺ ţō ", ["path"], " — ţĥē ƒĩŕśţ ĺōćàţĩōń ĥōĺďś ĩţś ōŵń ćōƥŷ"],"xloBjn": ["Ŕēĺàţĩvē Ƥàţĥ"],+ "xnWySt": ["Ćĺēàńũƥ ḿàŷ śţĩĺĺ ƀē ŕũńńĩńĝ."],"xrVr_k": ["Ćōũĺďń'ţ ćŕēàţē śķĩĺĺ: ", ["0"]],"xsZhu-": ["Ƥàĝē ńũḿƀēŕ"],"xtJgSe": ["Ţĥĩś śōũŕćē ƀũńďĺēś śēvēŕàĺ śķĩĺĺś — ćĥōōśē ţĥē ōńē ţō ĩḿƥōŕţ."],@@ -5348,6 +5363,7 @@"yQE2r9": ["Ĺōàďĩńĝ"],"yQyglE": ["Ńō ḿàţćĥĩńĝ ďōćś"],"yR5LHI": ["Ēńţēŕ à 6-ďĩĝĩţ ĥēx ĺĩķē #1À2ß3Ć"],+ "yU_9ur": ["Ţō ďō."],"yUxR-Q": ["Ēxƥàńď ", ["keyName"]],"yWSvcf": ["Ćōńţēńţ ŕōōţ"],"yWWThY": ["Àśśēţ ŕēƒēŕēńćē"],diff --git a/packages/app/src/locales/pseudo/messages.po b/packages/app/src/locales/pseudo/messages.poindex 425a0ca23..bff7a2b68 100644--- a/packages/app/src/locales/pseudo/messages.po+++ b/packages/app/src/locales/pseudo/messages.po@@ -1897,6 +1897,10 @@ msgstr ""msgid "Allowed values for {field}"msgstr ""+#: src/uninstall/UninstallResultScreen.tsx+msgid "Almost done. Here's what happened and what's left."+msgstr ""+#: src/editor/image-upload/index.tsmsgid "Already at {assetContentPath} — reusing."msgstr ""@@ -2890,10 +2894,19 @@ msgstr ""msgid "Claude Desktop"msgstr ""+#: src/uninstall/UninstallResultScreen.tsx+msgid "Cleanup didn’t finish"+msgstr ""+#: src/uninstall/UninstallNoticeScreen.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Cleanup log"msgstr ""+#: src/uninstall/UninstallApp.tsx+msgid "Cleanup may still be running."+msgstr ""+#: src/components/settings/SearchSection.tsx#: src/components/SkillPluginBundleDialog.tsxmsgid "Clear"@@ -3033,6 +3046,8 @@ msgstr ""#: src/components/ui/sheet.tsx#: src/editor/find-replace/FindReplaceBar.tsx#: src/lib/native-menu-catalog.ts+#: src/uninstall/UninstallApp.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Close"msgstr ""@@ -5101,6 +5116,10 @@ msgstr ""msgid "Done"msgstr ""+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "Done."+msgstr ""+#: src/components/ui/tag-pill-input.tsxmsgid "Double-click to edit"msgstr ""@@ -7722,6 +7741,10 @@ msgstr ""msgid "Kept both — \"{0}\" is its own skill now"msgstr ""+#: src/uninstall/UninstallResultScreen.tsx+msgid "Kept your content"+msgstr ""+#: src/components/settings/SearchSection.tsxmsgid "Key ending in {keyHint}"msgstr ""@@ -8235,6 +8258,10 @@ msgstr ""msgid "Markdown checks do not apply to this file."msgstr ""+#: src/uninstall/UninstallResultScreen.tsx+msgid "Markdown files and authored skills were left untouched."+msgstr ""+#: src/components/EditorModeToggle.tsxmsgid "Markdown source"msgstr ""@@ -8449,6 +8476,10 @@ msgstr ""msgid "Move down"msgstr ""+#: src/uninstall/UninstallResultScreen.tsx+msgid "Move OpenKnowledge.app to the Trash"+msgstr ""+#: src/components/SkillFileRenameDialog.tsxmsgid "Move or rename this file inside the skill — the path stays under references/ or scripts/."msgstr ""@@ -9941,6 +9972,10 @@ msgstr ""msgid "OpenKnowledge edited a document"msgstr ""+#: src/uninstall/UninstallResultScreen.tsx+msgid "OpenKnowledge files were removed"+msgstr ""+#: src/lib/acp/tool-call-display.tsmsgid "OpenKnowledge imported {source}"msgstr ""@@ -11299,6 +11334,10 @@ msgstr ""msgid "Removed \"{projectName}\" from recent projects. Its folder no longer exists."msgstr ""+#: src/uninstall/UninstallResultScreen.tsx+msgid "Removed OpenKnowledge files"+msgstr ""+#. placeholder {0}: connection.label#. placeholder {1}: sharedChoice.peers#: src/components/settings/AgentConnectionDialogs.tsx@@ -11790,9 +11829,14 @@ msgstr ""#: src/components/command-palette-commands.ts#: src/lib/platform-labels.ts+#: src/uninstall/UninstallResultScreen.tsxmsgid "Reveal in Finder"msgstr ""+#: src/uninstall/UninstallResultScreen.tsx+msgid "Reveal in Finder shows the app so you can drag it to the Trash."+msgstr ""+#: src/components/SkillOriginInline.tsxmsgid "Revert"msgstr ""@@ -12489,6 +12533,10 @@ msgstr ""msgid "Settings"msgstr ""+#: src/uninstall/UninstallResultScreen.tsx+msgid "Settings and integrations were cleaned up."+msgstr ""+#: src/components/settings/SettingsDialogShell.tsxmsgid "Settings content"msgstr ""@@ -13005,6 +13053,10 @@ msgstr ""msgid "Some files are not listed — the working tree has too many changes."msgstr ""+#: src/uninstall/UninstallResultScreen.tsx+msgid "Some files may not have been removed. Open the cleanup log for details. You can reopen OpenKnowledge to try again."+msgstr ""+#: src/components/settings/SavedThemesTiles.tsxmsgid "Some saved themes aren’t shown because the theme folder exceeds the scan limit."msgstr ""@@ -14698,6 +14750,10 @@ msgstr ""msgid "To do"msgstr ""+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "To do."+msgstr ""+#: src/lib/keyboard-shortcuts.tsmsgid "Toggle a bullet list."msgstr ""@@ -14956,6 +15012,10 @@ msgstr ""msgid "Type to find a doc"msgstr ""+#: src/uninstall/UninstallApp.tsx+msgid "Unable to show the cleanup result"+msgstr ""+#: src/components/McpConsentDialogBody.tsxmsgid "unavailable on this platform"msgstr ""diff --git a/packages/app/src/locales/pt-BR/messages.json b/packages/app/src/locales/pt-BR/messages.jsonindex d6fdd5616..5dd1271c3 100644--- a/packages/app/src/locales/pt-BR/messages.json+++ b/packages/app/src/locales/pt-BR/messages.json@@ -1165,6 +1165,7 @@"BVkqD9": ["A manutenção do índice está pausada porque outro atributo Git controla index.md. Atualize .gitattributes para que os caminhos index.md com escopo usem merge=union e tente novamente."],+ "BVmgJG": ["Mostrar no Finder exibe o aplicativo para você arrastá-lo para o Lixo."],"BWTzAb": ["Manual"],"BY-g4_": ["Adicionar padrão"],"Ba4D2x": ["Modelo importado"],@@ -1428,6 +1429,7 @@"EPKVES": ["Atualizar \"", ["skillName"], "\" por cima das suas edições?"],"EPwuTC": [["usedLabel"], " / ", ["sizeLabel"], " tokens usados"],"EQXPXf": ["Rolar até o fim"],+ "ES1zFv": ["Mova OpenKnowledge.app para o Lixo"],"ETyvvg": ["Nenhum idioma corresponde."],"EWCJFu": [["target"], " criado"],"EWPtMO": ["Código"],@@ -1918,6 +1920,7 @@"JM_aq-": ["Use uma URL https:// — http:// só é aceito para localhost."],"JOcPqH": ["Traga um repositório remoto para este computador."],"JOhCT9": ["O Push inclui"],+ "JReD69": ["Os arquivos do OpenKnowledge foram removidos"],"JWsZlx": ["Abra um projeto para editar."],"JYj5R2": ["Procurar arquivos"],"JZ8cO6": ["Claro, escuro ou seguir o sistema."],@@ -2185,6 +2188,7 @@"M7SqjM": ["Reabrir"],"M92_0q": ["Fechar comentário"],"M9597s": ["Preparando a URL de compartilhamento..."],+ "MAVznT": ["As configurações e integrações foram removidas."],"MBKkUy": ["O skills.sh está indisponível; mostrando resultados do GitHub (sem classificação por instalações)."],@@ -2975,6 +2979,7 @@["configFile"],"</0> do seu projeto, que governa por completo a análise deste projeto. Ligue ou desligue regras e edite as opções delas aqui; as alterações são gravadas no arquivo."],+ "V3JCWv": ["A limpeza não foi concluída"],"V3iDh1": ["Valida o frontmatter dos documentos contra arquivos JSON Schema padrão (draft-06, draft-07, 2019-09 ou 2020-12). Ligue um esquema para validar os documentos que os globs dele alcançam; as violações aparecem como avisos e nunca bloqueiam uma escrita. Use Editar para abrir o arquivo de esquema."],@@ -3397,6 +3402,7 @@"ZQJ1IV": ["Ativa a última aba do editor."],"ZQLDTl": ["pasta criada"],"ZQc7C8": ["Digite para editar; <0>Cmd/Ctrl+Enter</0> salva, <1>Esc</1> cancela."],+ "ZR-8iJ": ["Não foi possível mostrar o resultado da limpeza"],"ZSoojc": ["Falha ao clonar — verifique a URL e tente novamente (", ["status"], ")"],"ZU8VV_": ["Falha ao remover: ", ["error"]],"ZVOhXM": ["Falha ao atualizar a sincronização — ", ["detail"]],@@ -3565,6 +3571,7 @@"aSVmqV": ["Nenhuma ferramenta de IA detectada ainda. Depois de instalar uma, conecte-a em Configurações > Este projeto."],+ "aTDVi6": ["Seu conteúdo foi preservado"],"aWlJai": ["Iniciando o fluxo de login"],"aXkLuE": ["Resposta de aplicação malformada"],"a_u4ck": ["Carregando tags"],@@ -3656,6 +3663,7 @@["docName"],"\" antes de reconectar."],+ "bmI-q1": ["Arquivos do OpenKnowledge removidos"],"bnOTEz": ["Recuperando…"],"bn_MDX": ["Por que isso requer atenção"],"bpMVIA": [@@ -3776,6 +3784,7 @@"ciozf1": ["Habilidade já em projeto"],"cjtjry": ["Volta pelo histórico de navegação do OpenKnowledge."],"cklVjM": ["Linha do tempo"],+ "clJ3qM": ["Concluído."],"cnGeoo": ["Excluir"],"cqQyPB": ["Nome da pasta"],"crqzW5": ["Ferramentas de IA"],@@ -5179,6 +5188,7 @@["2"],"”. Tudo o que apontar para esse arquivo no SKILL.md deixará de funcionar até que ele seja recriado."],+ "psUrB1": ["Os arquivos Markdown e as habilidades criadas não foram alterados."],"psl2Sj": ["Sua alteração ainda está sendo salva — rode o teste de novo em instantes."],"ptQ3_N": ["desvincular"],"pvnfJD": ["Escuro"],@@ -5815,6 +5825,7 @@]],"vmahUq": ["Os sublinhados existentes podem não ser atualizados imediatamente."],+ "vmwZHP": ["Quase pronto. Veja o que foi feito e o que falta fazer."],"vp5vfW": ["1 hora"],"vppAju": ["Onde os anexos recém-adicionados são colocados."],"vqJXNe": ["Instalar a habilidade <0>open-knowledge-discovery</0>"],@@ -5864,6 +5875,9 @@"wSBXaS": ["Gerenciar ", ["rowLabel"]],"wT4iQr": ["Abre a busca do editor visual com os controles de substituição expandidos."],"wTcjov": ["Sem espaço de trabalho"],+ "wTf1ag": [+ "Alguns arquivos podem não ter sido removidos. Abra o log de limpeza para ver os detalhes. Você pode reabrir o OpenKnowledge para tentar novamente."+ ],"wU8WyK": ["Campos do elemento"],"wVa83H": ["Não deu para criar o relatório"],"wWtVYd": ["Digite uma porta entre 1 e 65535."],@@ -5994,6 +6008,7 @@"xiv-dW": ["Ainda não há arquivos."],"xk133d": ["Instala a skill em ", ["path"], " — o primeiro local guarda a própria cópia"],"xloBjn": ["Caminho relativo"],+ "xnWySt": ["A limpeza pode ainda estar em andamento."],"xrVr_k": ["Não deu para criar a habilidade: ", ["0"]],"xsZhu-": ["Número da página"],"xtJgSe": ["Esta fonte traz várias habilidades — escolha qual importar."],@@ -6045,6 +6060,7 @@"yQE2r9": ["Carregando"],"yQyglE": ["Nenhum documento corresponde"],"yR5LHI": ["Digite um valor hexadecimal de 6 dígitos, como #1A2B3C"],+ "yU_9ur": ["A fazer."],"yUxR-Q": ["Expandir ", ["keyName"]],"yWSvcf": ["Raiz do conteúdo"],"yWWThY": ["Referência de recurso"],diff --git a/packages/app/src/locales/pt-BR/messages.po b/packages/app/src/locales/pt-BR/messages.poindex 522848475..95af1c2a2 100644--- a/packages/app/src/locales/pt-BR/messages.po+++ b/packages/app/src/locales/pt-BR/messages.po@@ -1897,6 +1897,10 @@ msgstr "Valores permitidos (vazio = qualquer)"msgid "Allowed values for {field}"msgstr "Valores permitidos para {field}"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Almost done. Here's what happened and what's left."+msgstr "Quase pronto. Veja o que foi feito e o que falta fazer."+#: src/editor/image-upload/index.tsmsgid "Already at {assetContentPath} — reusing."msgstr "Já está em {assetContentPath} — reaproveitando."@@ -2890,10 +2894,19 @@ msgstr "O Claude Code (claude) não está instalado nem no seu PATH."msgid "Claude Desktop"msgstr "Claude Desktop"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Cleanup didn’t finish"+msgstr "A limpeza não foi concluída"+#: src/uninstall/UninstallNoticeScreen.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Cleanup log"msgstr "Log de limpeza"+#: src/uninstall/UninstallApp.tsx+msgid "Cleanup may still be running."+msgstr "A limpeza pode ainda estar em andamento."+#: src/components/settings/SearchSection.tsx#: src/components/SkillPluginBundleDialog.tsxmsgid "Clear"@@ -3033,6 +3046,8 @@ msgstr "Clonando..."#: src/components/ui/sheet.tsx#: src/editor/find-replace/FindReplaceBar.tsx#: src/lib/native-menu-catalog.ts+#: src/uninstall/UninstallApp.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Close"msgstr "Fechar"@@ -5101,6 +5116,10 @@ msgstr "pronto"msgid "Done"msgstr "Concluído"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "Done."+msgstr "Concluído."+#: src/components/ui/tag-pill-input.tsxmsgid "Double-click to edit"msgstr "Clique duas vezes para editar"@@ -7722,6 +7741,10 @@ msgstr "Mantém sua base de conhecimento alinhada ao Open Knowledge Format."msgid "Kept both — \"{0}\" is its own skill now"msgstr "Os dois foram mantidos — \"{0}\" agora é uma habilidade própria"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Kept your content"+msgstr "Seu conteúdo foi preservado"+#: src/components/settings/SearchSection.tsxmsgid "Key ending in {keyHint}"msgstr "Chave terminada em {keyHint}"@@ -8235,6 +8258,10 @@ msgstr "Markdown"msgid "Markdown checks do not apply to this file."msgstr "As verificações de Markdown não se aplicam a este arquivo."+#: src/uninstall/UninstallResultScreen.tsx+msgid "Markdown files and authored skills were left untouched."+msgstr "Os arquivos Markdown e as habilidades criadas não foram alterados."+#: src/components/EditorModeToggle.tsxmsgid "Markdown source"msgstr "Código markdown"@@ -8449,6 +8476,10 @@ msgstr "Mover o bloco"msgid "Move down"msgstr "Mover para baixo"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Move OpenKnowledge.app to the Trash"+msgstr "Mova OpenKnowledge.app para o Lixo"+#: src/components/SkillFileRenameDialog.tsxmsgid "Move or rename this file inside the skill — the path stays under references/ or scripts/."msgstr "Mova ou renomeie este arquivo dentro da habilidade — o caminho continua sob references/ ou scripts/."@@ -9941,6 +9972,10 @@ msgstr "OpenKnowledge editou {subject}"msgid "OpenKnowledge edited a document"msgstr "OpenKnowledge editou um documento"+#: src/uninstall/UninstallResultScreen.tsx+msgid "OpenKnowledge files were removed"+msgstr "Os arquivos do OpenKnowledge foram removidos"+#: src/lib/acp/tool-call-display.tsmsgid "OpenKnowledge imported {source}"msgstr "OpenKnowledge importou {source}"@@ -11299,6 +11334,10 @@ msgstr "\"{0}\" foi removido de todos os outros locais — a pasta de origem delmsgid "Removed \"{projectName}\" from recent projects. Its folder no longer exists."msgstr "\"{projectName}\" foi removido dos projetos recentes. A pasta dele não existe mais."+#: src/uninstall/UninstallResultScreen.tsx+msgid "Removed OpenKnowledge files"+msgstr "Arquivos do OpenKnowledge removidos"+#. placeholder {0}: connection.label#. placeholder {1}: sharedChoice.peers#: src/components/settings/AgentConnectionDialogs.tsx@@ -11790,9 +11829,14 @@ msgstr "Mostrar no Explorador de Arquivos"#: src/components/command-palette-commands.ts#: src/lib/platform-labels.ts+#: src/uninstall/UninstallResultScreen.tsxmsgid "Reveal in Finder"msgstr "Mostrar no Finder"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Reveal in Finder shows the app so you can drag it to the Trash."+msgstr "Mostrar no Finder exibe o aplicativo para você arrastá-lo para o Lixo."+#: src/components/SkillOriginInline.tsxmsgid "Revert"msgstr "Reverter"@@ -12489,6 +12533,10 @@ msgstr "Configurando"msgid "Settings"msgstr "Configurações"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Settings and integrations were cleaned up."+msgstr "As configurações e integrações foram removidas."+#: src/components/settings/SettingsDialogShell.tsxmsgid "Settings content"msgstr "Conteúdo das configurações"@@ -13005,6 +13053,10 @@ msgstr "Alguns arquivos soltos não puderam ser inseridos com segurança."msgid "Some files are not listed — the working tree has too many changes."msgstr "Alguns arquivos não estão listados: a árvore de trabalho tem alterações demais."+#: src/uninstall/UninstallResultScreen.tsx+msgid "Some files may not have been removed. Open the cleanup log for details. You can reopen OpenKnowledge to try again."+msgstr "Alguns arquivos podem não ter sido removidos. Abra o log de limpeza para ver os detalhes. Você pode reabrir o OpenKnowledge para tentar novamente."+#: src/components/settings/SavedThemesTiles.tsxmsgid "Some saved themes aren’t shown because the theme folder exceeds the scan limit."msgstr "Alguns temas salvos não são exibidos porque a pasta de temas excede o limite de verificação."@@ -14698,6 +14750,10 @@ msgstr "Título"msgid "To do"msgstr "A fazer"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "To do."+msgstr "A fazer."+#: src/lib/keyboard-shortcuts.tsmsgid "Toggle a bullet list."msgstr "Liga ou desliga uma lista com marcadores."@@ -14956,6 +15012,10 @@ msgstr "Digite para editar; <0>Cmd/Ctrl+Enter</0> salva, <1>Esc</1> cancela."msgid "Type to find a doc"msgstr "Digite para encontrar um documento"+#: src/uninstall/UninstallApp.tsx+msgid "Unable to show the cleanup result"+msgstr "Não foi possível mostrar o resultado da limpeza"+#: src/components/McpConsentDialogBody.tsxmsgid "unavailable on this platform"msgstr "indisponível nesta plataforma"diff --git a/packages/app/src/locales/ur/messages.json b/packages/app/src/locales/ur/messages.jsonindex 665593dea..441102e7f 100644--- a/packages/app/src/locales/ur/messages.json+++ b/packages/app/src/locales/ur/messages.json@@ -1010,6 +1010,7 @@"BVkqD9": ["انڈیکس کی دیکھ بھال موقوف ہے کیونکہ ایک اور Git وصف کنٹرول کرتا ہے index.md۔ .gitattributes کو اپ ڈیٹ کریں تاکہ دائرہ کار والے index.md راستے merge=union استعمال کریں، پھر دوبارہ کوشش کریں۔"],+ "BVmgJG": ["Finder میں دکھائیں سے ایپ دکھائی دیتی ہے تاکہ آپ اسے کوڑے دان میں کھینچ سکیں۔"],"BWTzAb": ["دستی"],"BY-g4_": ["پیٹرن شامل کریں"],"Ba4D2x": ["ٹیمپلیٹ درآمد ہو گیا"],@@ -1249,6 +1250,7 @@"EPKVES": ["کیا «", ["skillName"], "» کو آپ کی ترامیم پر اپ ڈیٹ کر دیا جائے؟"],"EPwuTC": [["usedLabel"], " / ", ["sizeLabel"], " ٹوکنز استعمال شدہ"],"EQXPXf": ["آخر تک سکرول کریں"],+ "ES1zFv": ["OpenKnowledge.app کو کوڑے دان میں منتقل کریں"],"ETyvvg": ["کوئی زبان مماثل نہیں۔"],"EWCJFu": [["target"], " بن گیا"],"EWPtMO": ["کوڈ"],@@ -1677,6 +1679,7 @@"JM_aq-": ["https:// والا URL استعمال کریں — http:// کی اجازت صرف localhost کے لیے ہے۔"],"JOcPqH": ["کسی ریموٹ ریپازٹری کو اس مشین پر لائیں۔"],"JOhCT9": ["پُش میں شامل"],+ "JReD69": ["OpenKnowledge کی فائلیں ہٹا دی گئیں"],"JWsZlx": ["ترمیم کے لیے کوئی پروجیکٹ کھولیں۔"],"JYj5R2": ["فائلیں منتخب کریں"],"JZ8cO6": ["روشن، تاریک، یا OS کی پیروی۔"],@@ -1926,6 +1929,7 @@"M7SqjM": ["دوبارہ کھولیں"],"M92_0q": ["تبصرہ بند کریں"],"M9597s": ["شیئر URL تیار کیا جا رہا ہے..."],+ "MAVznT": ["ترتیبات اور انضمام ہٹا دیے گئے۔"],"MBKkUy": ["skills.sh دستیاب نہیں؛ GitHub کے نتائج دکھائے جا رہے ہیں (تنصیب کی درجہ بندی کے بغیر)۔"],@@ -2653,6 +2657,7 @@["configFile"],"</0> فائل سے آتے ہیں، جو اس پروجیکٹ کے لِنٹنگ کو مکمل طور پر چلاتی ہے۔ قواعد یہاں فعال یا بند کریں اور ان کے آپشنز میں ترمیم کریں؛ تبدیلیاں واپس فائل میں لکھی جاتی ہیں۔"],+ "V3JCWv": ["صفائی مکمل نہیں ہوئی"],"V3iDh1": ["دستاویز کے frontmatter کی توثیق معیاری JSON Schema فائلوں سے کریں (draft-06، draft-07، 2019-09، یا 2020-12)۔ کسی اسکیما کو فعال کریں تاکہ اس کے گلوبز سے مماثل دستاویزات کی توثیق ہو؛ خلاف ورزیاں انتباہات کے طور پر ظاہر ہوتی ہیں اور کبھی لکھنے سے نہیں روکتیں۔ اسکیما فائل کھولنے کے لیے «ترمیم» استعمال کریں۔"],@@ -3033,6 +3038,7 @@"ZQc7C8": ["ترمیم کے لیے لکھیں؛ <0>Cmd/Ctrl+Enter</0> محفوظ کرتا ہے، <1>Esc</1> منسوخ کرتا ہے۔"],+ "ZR-8iJ": ["صفائی کا نتیجہ نہیں دکھایا جا سکا"],"ZSoojc": ["کلون ناکام — URL جانچیں اور دوبارہ کوشش کریں (", ["status"], ")"],"ZU8VV_": ["ہٹانا ناکام: ", ["error"]],"ZVOhXM": ["مطابقت پذیری تازہ نہیں ہو سکی — ", ["detail"]],@@ -3197,6 +3203,7 @@"aSVmqV": ["ابھی تک کوئی AI ٹول نہیں ملا۔ ایک انسٹال کرنے کے بعد اسے ترتیبات > یہ پروجیکٹ سے جوڑیں۔"],+ "aTDVi6": ["آپ کا مواد محفوظ رکھا گیا"],"aWlJai": ["سائن اِن کا عمل شروع کیا جا رہا ہے"],"aXkLuE": ["اپلائی کا جواب بگڑا ہوا ہے"],"a_u4ck": ["ٹیگز لوڈ ہو رہے ہیں"],@@ -3281,6 +3288,7 @@["docName"],"» کا مقامی اشتراکی ڈیٹا صاف کیا جا رہا ہے۔"],+ "bmI-q1": ["OpenKnowledge کی فائلیں ہٹا دی گئیں"],"bnOTEz": ["حاصل کیا جا رہا ہے…"],"bn_MDX": ["اس پر توجہ کیوں درکار ہے"],"bpMVIA": [@@ -3390,6 +3398,7 @@"ciozf1": ["پروجیکٹ میں پہلے سے ہی مہارت"],"cjtjry": ["OpenKnowledge کی نیویگیشن تاریخ میں پیچھے جائیں۔"],"cklVjM": ["ٹائم لائن"],+ "clJ3qM": ["مکمل۔"],"cnGeoo": ["حذف کریں"],"cqQyPB": ["فولڈر کا نام"],"crqzW5": ["AI ٹولز"],@@ -4659,6 +4668,7 @@["1"]," کو مستقل طور پر ہٹا دیتا ہے۔ SKILL.md میں جو کچھ بھی اس کی طرف اشارہ کرتا ہے، دوبارہ بنائے جانے تک کام نہیں کرے گا۔"],+ "psUrB1": ["Markdown فائلوں اور آپ کی بنائی ہوئی اسکلز میں کوئی تبدیلی نہیں کی گئی۔"],"psl2Sj": ["آپ کی تبدیلی ابھی محفوظ ہو رہی ہے — تھوڑی دیر بعد ٹیسٹ دوبارہ چلائیں۔"],"ptQ3_N": ["لنک ختم کریں"],"pvnfJD": ["تاریک"],@@ -5215,6 +5225,7 @@]],"vmahUq": ["ممکن ہے موجودہ انڈر لائنیں فوراً اپ ڈیٹ نہ ہوں۔"],+ "vmwZHP": ["تقریباً مکمل ہو گیا۔ دیکھیں کیا ہوا اور کیا باقی ہے۔"],"vp5vfW": ["1 گھنٹہ"],"vppAju": ["نئے شامل ہونے والے منسلکات کہاں رکھے جاتے ہیں۔"],"vqJXNe": ["<0>open-knowledge-discovery</0> اسکل انسٹال کریں"],@@ -5264,6 +5275,9 @@"wSBXaS": [["rowLabel"], " کا انتظام کریں"],"wT4iQr": ["بصری ایڈیٹر کی تلاش تبدیلی کے کنٹرولز کھلے ہوئے کھولیں۔"],"wTcjov": ["کوئی ورک اسپیس نہیں"],+ "wTf1ag": [+ "ممکن ہے کچھ فائلیں نہ ہٹی ہوں۔ تفصیلات کے لیے صفائی کا لاگ کھولیں۔ دوبارہ کوشش کرنے کے لیے OpenKnowledge پھر سے کھول سکتے ہیں۔"+ ],"wU8WyK": ["عنصر کے فیلڈز"],"wVa83H": ["رپورٹ نہیں بن سکی"],"wWtVYd": ["1 اور 65535 کے درمیان ایک پورٹ درج کریں۔"],@@ -5381,6 +5395,7 @@"xiv-dW": ["ابھی کوئی فائل نہیں۔"],"xk133d": ["اسکل کو ", ["path"], " میں انسٹال کرتا ہے — پہلا مقام اس کی اپنی کاپی رکھتا ہے"],"xloBjn": ["نسبتی راستہ"],+ "xnWySt": ["ممکن ہے صفائی ابھی جاری ہو۔"],"xrVr_k": ["مہارت نہیں بن سکی: ", ["0"]],"xsZhu-": ["صفحہ نمبر"],"xtJgSe": ["یہ ماخذ کئی مہارتیں سمیٹے ہوئے ہے — درآمد کے لیے ایک منتخب کریں۔"],@@ -5427,6 +5442,7 @@"yQE2r9": ["لوڈ ہو رہا ہے"],"yQyglE": ["کوئی مماثل دستاویز نہیں"],"yR5LHI": ["#1A2B3C جیسی 6 ہندسوں کی ہیکس قدر درج کریں"],+ "yU_9ur": ["کرنا ہے۔"],"yUxR-Q": [["keyName"], " پھیلائیں"],"yWSvcf": ["مواد کی جڑ"],"yWWThY": ["اثاثے کا حوالہ"],diff --git a/packages/app/src/locales/ur/messages.po b/packages/app/src/locales/ur/messages.poindex e3b3c4a88..0085a813f 100644--- a/packages/app/src/locales/ur/messages.po+++ b/packages/app/src/locales/ur/messages.po@@ -1901,6 +1901,10 @@ msgstr "اجازت شدہ اقدار (خالی = کوئی بھی)"msgid "Allowed values for {field}"msgstr "{field} کے لیے اجازت شدہ اقدار"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Almost done. Here's what happened and what's left."+msgstr "تقریباً مکمل ہو گیا۔ دیکھیں کیا ہوا اور کیا باقی ہے۔"+#: src/editor/image-upload/index.tsmsgid "Already at {assetContentPath} — reusing."msgstr "پہلے ہی {assetContentPath} پر — دوبارہ استعمال کیا جا رہا ہے۔"@@ -2894,10 +2898,19 @@ msgstr "Claude Code (claude) نصب نہیں ہے یا آپ کے PATH میں نmsgid "Claude Desktop"msgstr "Claude Desktop"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Cleanup didn’t finish"+msgstr "صفائی مکمل نہیں ہوئی"+#: src/uninstall/UninstallNoticeScreen.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Cleanup log"msgstr "صفائی کا لاگ"+#: src/uninstall/UninstallApp.tsx+msgid "Cleanup may still be running."+msgstr "ممکن ہے صفائی ابھی جاری ہو۔"+#: src/components/settings/SearchSection.tsx#: src/components/SkillPluginBundleDialog.tsxmsgid "Clear"@@ -3037,6 +3050,8 @@ msgstr "کلون کیا جا رہا ہے..."#: src/components/ui/sheet.tsx#: src/editor/find-replace/FindReplaceBar.tsx#: src/lib/native-menu-catalog.ts+#: src/uninstall/UninstallApp.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Close"msgstr "بند کریں"@@ -5105,6 +5120,10 @@ msgstr "مکمل"msgid "Done"msgstr "مکمل"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "Done."+msgstr "مکمل۔"+#: src/components/ui/tag-pill-input.tsxmsgid "Double-click to edit"msgstr "ترمیم کے لیے ڈبل کلک کریں"@@ -7726,6 +7745,10 @@ msgstr "آپ کے علمی ذخیرے کو Open Knowledge Format کے مطابقmsgid "Kept both — \"{0}\" is its own skill now"msgstr "دونوں رکھ لیے گئے — «{0}» اب اپنی الگ مہارت ہے"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Kept your content"+msgstr "آپ کا مواد محفوظ رکھا گیا"+#: src/components/settings/SearchSection.tsxmsgid "Key ending in {keyHint}"msgstr "{keyHint} پر ختم ہونے والی کلید"@@ -8239,6 +8262,10 @@ msgstr "Markdown"msgid "Markdown checks do not apply to this file."msgstr "Markdown کی جانچیں اس فائل پر لاگو نہیں ہوتیں۔"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Markdown files and authored skills were left untouched."+msgstr "Markdown فائلوں اور آپ کی بنائی ہوئی اسکلز میں کوئی تبدیلی نہیں کی گئی۔"+#: src/components/EditorModeToggle.tsxmsgid "Markdown source"msgstr "Markdown سورس"@@ -8453,6 +8480,10 @@ msgstr "بلاک منتقل کریں"msgid "Move down"msgstr "نیچے لے جائیں"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Move OpenKnowledge.app to the Trash"+msgstr "OpenKnowledge.app کو کوڑے دان میں منتقل کریں"+#: src/components/SkillFileRenameDialog.tsxmsgid "Move or rename this file inside the skill — the path stays under references/ or scripts/."msgstr "اس فائل کو مہارت کے اندر منتقل کریں یا اس کا نام بدلیں — راستہ references/ یا scripts/ کے تحت ہی رہتا ہے۔"@@ -9945,6 +9976,10 @@ msgstr "OpenKnowledge نے {subject} میں ترمیم کی"msgid "OpenKnowledge edited a document"msgstr "OpenKnowledge نے ایک دستاویز میں ترمیم کی"+#: src/uninstall/UninstallResultScreen.tsx+msgid "OpenKnowledge files were removed"+msgstr "OpenKnowledge کی فائلیں ہٹا دی گئیں"+#: src/lib/acp/tool-call-display.tsmsgid "OpenKnowledge imported {source}"msgstr "OpenKnowledge نے {source} درآمد کیا"@@ -11303,6 +11338,10 @@ msgstr "«{0}» کو ہر دوسرے مقام سے ہٹا دیا گیا — اسmsgid "Removed \"{projectName}\" from recent projects. Its folder no longer exists."msgstr "«{projectName}» کو حالیہ پروجیکٹس سے ہٹا دیا گیا۔ اس کا فولڈر اب موجود نہیں۔"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Removed OpenKnowledge files"+msgstr "OpenKnowledge کی فائلیں ہٹا دی گئیں"+#. placeholder {0}: connection.label#. placeholder {1}: sharedChoice.peers#: src/components/settings/AgentConnectionDialogs.tsx@@ -11794,9 +11833,14 @@ msgstr "فائل ایکسپلورر میں دکھائیں"#: src/components/command-palette-commands.ts#: src/lib/platform-labels.ts+#: src/uninstall/UninstallResultScreen.tsxmsgid "Reveal in Finder"msgstr "Finder میں دکھائیں"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Reveal in Finder shows the app so you can drag it to the Trash."+msgstr "Finder میں دکھائیں سے ایپ دکھائی دیتی ہے تاکہ آپ اسے کوڑے دان میں کھینچ سکیں۔"+#: src/components/SkillOriginInline.tsxmsgid "Revert"msgstr "واپس پلٹیں"@@ -12493,6 +12537,10 @@ msgstr "ترتیب دیا جا رہا ہے"msgid "Settings"msgstr "ترتیبات"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Settings and integrations were cleaned up."+msgstr "ترتیبات اور انضمام ہٹا دیے گئے۔"+#: src/components/settings/SettingsDialogShell.tsxmsgid "Settings content"msgstr "ترتیبات کا مواد"@@ -13009,6 +13057,10 @@ msgstr "چھوڑی گئی کچھ فائلیں محفوظ طریقے سے شامmsgid "Some files are not listed — the working tree has too many changes."msgstr "کچھ فائلیں فہرست میں نہیں ہیں: ورکنگ ٹری میں بہت زیادہ تبدیلیاں ہیں۔"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Some files may not have been removed. Open the cleanup log for details. You can reopen OpenKnowledge to try again."+msgstr "ممکن ہے کچھ فائلیں نہ ہٹی ہوں۔ تفصیلات کے لیے صفائی کا لاگ کھولیں۔ دوبارہ کوشش کرنے کے لیے OpenKnowledge پھر سے کھول سکتے ہیں۔"+#: src/components/settings/SavedThemesTiles.tsxmsgid "Some saved themes aren’t shown because the theme folder exceeds the scan limit."msgstr "تھیم فولڈر اسکین کی حد سے بڑا ہونے کی وجہ سے کچھ محفوظ شدہ تھیمز نہیں دکھائی جا رہیں۔"@@ -14702,6 +14754,10 @@ msgstr "عنوان"msgid "To do"msgstr "کرنا ہے"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "To do."+msgstr "کرنا ہے۔"+#: src/lib/keyboard-shortcuts.tsmsgid "Toggle a bullet list."msgstr "بلٹ فہرست بدلیں۔"@@ -14960,6 +15016,10 @@ msgstr "ترمیم کے لیے لکھیں؛ <0>Cmd/Ctrl+Enter</0> محفوظ کmsgid "Type to find a doc"msgstr "دستاویز ڈھونڈنے کے لیے لکھیں"+#: src/uninstall/UninstallApp.tsx+msgid "Unable to show the cleanup result"+msgstr "صفائی کا نتیجہ نہیں دکھایا جا سکا"+#: src/components/McpConsentDialogBody.tsxmsgid "unavailable on this platform"msgstr "اس پلیٹ فارم پر دستیاب نہیں"diff --git a/packages/app/src/locales/zh-Hans/messages.json b/packages/app/src/locales/zh-Hans/messages.jsonindex 2be004568..999a96acf 100644--- a/packages/app/src/locales/zh-Hans/messages.json+++ b/packages/app/src/locales/zh-Hans/messages.json@@ -880,6 +880,7 @@"BVkqD9": ["索引维护已暂停,因为另一个 Git 属性控制 index.md。更新 .gitattributes 以便作用域 index.md 路径使用 merge=union,然后重试。"],+ "BVmgJG": ["“在 Finder 中显示”会显示应用,以便你将其拖到废纸篓。"],"BWTzAb": ["手动"],"BY-g4_": ["添加模式"],"Ba4D2x": ["模板已导入"],@@ -1087,6 +1088,7 @@"EPKVES": ["要用“", ["skillName"], "”覆盖你的编辑进行更新吗?"],"EPwuTC": ["已使用 ", ["usedLabel"], " / ", ["sizeLabel"], " 个 token"],"EQXPXf": ["滚动到末尾"],+ "ES1zFv": ["将 OpenKnowledge.app 移到废纸篓"],"ETyvvg": ["没有匹配的语言。"],"EWCJFu": ["已创建 ", ["target"]],"EWPtMO": ["代码"],@@ -1440,6 +1442,7 @@"JM_aq-": ["请使用 https:// 的 URL——http:// 只允许用于 localhost。"],"JOcPqH": ["把一个远程仓库取到这台电脑上。"],"JOhCT9": ["推送包含"],+ "JReD69": ["已移除 OpenKnowledge 文件"],"JWsZlx": ["请打开一个项目以进行编辑。"],"JYj5R2": ["浏览文件"],"JZ8cO6": ["浅色、深色,或跟随系统。"],@@ -1647,6 +1650,7 @@"M7SqjM": ["重新打开"],"M92_0q": ["关闭评论"],"M9597s": ["正在准备共享 URL…"],+ "MAVznT": ["已清理设置和集成。"],"MBKkUy": ["skills.sh 不可用;改为显示 GitHub 结果(没有安装量排名)。"],"MBfjUk": [["0", "plural", { "other": ["正在上传 ", "#", " 个附件"] }]],"MCjC9A": ["删除 ", ["deleteDescriptorLabel"]],@@ -2280,6 +2284,7 @@["configFile"],"</0> 文件,该文件完全决定了这个项目的检查行为。可以在这里开关规则并编辑它们的选项;更改会写回该文件。"],+ "V3JCWv": ["清理未完成"],"V3iDh1": ["按标准 JSON Schema 文件(draft-06、draft-07、2019-09 或 2020-12)校验文档的 frontmatter。开启某个架构即可校验与它的 glob 匹配的文档;违规会以警告形式出现,绝不会阻止写入。用「编辑」打开架构文件。"],@@ -2613,6 +2618,7 @@"ZQJ1IV": ["激活编辑器的最后一个标签页。"],"ZQLDTl": ["已创建文件夹"],"ZQc7C8": ["输入即可编辑;<0>Cmd/Ctrl+Enter</0> 保存,<1>Esc</1> 取消。"],+ "ZR-8iJ": ["无法显示清理结果"],"ZSoojc": ["克隆失败——请检查 URL 后重试(", ["status"], ")"],"ZU8VV_": ["移除失败:", ["error"]],"ZVOhXM": ["更新同步设置失败——", ["detail"]],@@ -2758,6 +2764,7 @@"aRI3Om": ["关闭窗口"],"aS77on": ["会更改什么?"],"aSVmqV": ["尚未检测到 AI 工具。安装之后,可在「设置 > 本项目」中连接。"],+ "aTDVi6": ["已保留你的内容"],"aWlJai": ["正在启动登录流程"],"aXkLuE": ["应用响应格式错误"],"a_u4ck": ["正在加载标签"],@@ -2826,6 +2833,7 @@"bkQRMh": ["段落"],"blFttG": ["搜索项目"],"bmC18N": ["正在重新连接前清除“", ["docName"], "”的本地协作数据。"],+ "bmI-q1": ["已移除 OpenKnowledge 文件"],"bnOTEz": ["正在检索…"],"bn_MDX": ["为什么需要注意"],"bpMVIA": ["无法将链接目标“", ["shown"], "”解析为项目本地目标。"],@@ -2915,6 +2923,7 @@"ciozf1": ["项目中已有的技能"],"cjtjry": ["在 OpenKnowledge 的导航历史中后退。"],"cklVjM": ["时间线"],+ "clJ3qM": ["完成。"],"cnGeoo": ["删除"],"cqQyPB": ["文件夹名"],"crqzW5": ["AI 工具"],@@ -3994,6 +4003,7 @@["1"],"。SKILL.md 中指向它的内容将失效,直到重新创建为止。"],+ "psUrB1": ["Markdown 文件和你编写的技能未被改动。"],"psl2Sj": ["你的更改还在保存中——请稍后再运行一次测试。"],"ptQ3_N": ["取消链接"],"pvnfJD": ["深色"],@@ -4454,6 +4464,7 @@["count", "plural", { "other": ["立即修复有已知自动修复方案的 ", "#", " 个问题。"] }]],"vmahUq": ["已有的下划线可能不会立即更新。"],+ "vmwZHP": ["即将完成。以下是已完成和仍需完成的事项。"],"vp5vfW": ["1 小时"],"vppAju": ["新添加的附件放在哪里。"],"vqJXNe": ["安装 <0>open-knowledge-discovery</0> 技能"],@@ -4497,6 +4508,7 @@"wSBXaS": ["管理 ", ["rowLabel"]],"wT4iQr": ["打开可视化编辑器的查找,并展开替换控件。"],"wTcjov": ["无工作区"],+ "wTf1ag": ["部分文件可能尚未移除。打开清理日志查看详情。你可以重新打开 OpenKnowledge 后重试。"],"wU8WyK": ["元素字段"],"wVa83H": ["无法生成报告"],"wWtVYd": ["请输入 1 到 65535 之间的端口。"],@@ -4604,6 +4616,7 @@"xiv-dW": ["还没有文件。"],"xk133d": ["将技能安装到 ", ["path"], " — 第一个位置保存技能自身的副本"],"xloBjn": ["相对路径"],+ "xnWySt": ["清理可能仍在进行中。"],"xrVr_k": ["无法创建技能:", ["0"]],"xsZhu-": ["页码"],"xtJgSe": ["这个来源包含多个技能——请选择要导入的那一个。"],@@ -4641,6 +4654,7 @@"yQE2r9": ["正在加载"],"yQyglE": ["没有匹配的文档"],"yR5LHI": ["请输入 6 位十六进制值,例如 #1A2B3C"],+ "yU_9ur": ["待办。"],"yUxR-Q": ["展开 ", ["keyName"]],"yWSvcf": ["内容根目录"],"yWWThY": ["资源引用"],diff --git a/packages/app/src/locales/zh-Hans/messages.po b/packages/app/src/locales/zh-Hans/messages.poindex 9dc57262c..739f1d286 100644--- a/packages/app/src/locales/zh-Hans/messages.po+++ b/packages/app/src/locales/zh-Hans/messages.po@@ -1901,6 +1901,10 @@ msgstr "允许的值(留空 = 任意)"msgid "Allowed values for {field}"msgstr "{field} 允许的值"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Almost done. Here's what happened and what's left."+msgstr "即将完成。以下是已完成和仍需完成的事项。"+#: src/editor/image-upload/index.tsmsgid "Already at {assetContentPath} — reusing."msgstr "已经在 {assetContentPath} 了——直接复用。"@@ -2894,10 +2898,19 @@ msgstr "Claude Code(claude)未安装,也不在你的 PATH 中。"msgid "Claude Desktop"msgstr "Claude Desktop"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Cleanup didn’t finish"+msgstr "清理未完成"+#: src/uninstall/UninstallNoticeScreen.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Cleanup log"msgstr "清理日志"+#: src/uninstall/UninstallApp.tsx+msgid "Cleanup may still be running."+msgstr "清理可能仍在进行中。"+#: src/components/settings/SearchSection.tsx#: src/components/SkillPluginBundleDialog.tsxmsgid "Clear"@@ -3037,6 +3050,8 @@ msgstr "正在克隆…"#: src/components/ui/sheet.tsx#: src/editor/find-replace/FindReplaceBar.tsx#: src/lib/native-menu-catalog.ts+#: src/uninstall/UninstallApp.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Close"msgstr "关闭"@@ -5105,6 +5120,10 @@ msgstr "完成"msgid "Done"msgstr "完成"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "Done."+msgstr "完成。"+#: src/components/ui/tag-pill-input.tsxmsgid "Double-click to edit"msgstr "双击进行编辑"@@ -7726,6 +7745,10 @@ msgstr "让您的知识库与 Open Knowledge Format 保持一致。"msgid "Kept both — \"{0}\" is its own skill now"msgstr "两个都保留了——“{0}”现在是一个独立的技能"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Kept your content"+msgstr "已保留你的内容"+#: src/components/settings/SearchSection.tsxmsgid "Key ending in {keyHint}"msgstr "以 {keyHint} 结尾的密钥"@@ -8239,6 +8262,10 @@ msgstr "Markdown"msgid "Markdown checks do not apply to this file."msgstr "此文件不适用 Markdown 检查。"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Markdown files and authored skills were left untouched."+msgstr "Markdown 文件和你编写的技能未被改动。"+#: src/components/EditorModeToggle.tsxmsgid "Markdown source"msgstr "Markdown 源码"@@ -8453,6 +8480,10 @@ msgstr "移动块"msgid "Move down"msgstr "下移"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Move OpenKnowledge.app to the Trash"+msgstr "将 OpenKnowledge.app 移到废纸篓"+#: src/components/SkillFileRenameDialog.tsxmsgid "Move or rename this file inside the skill — the path stays under references/ or scripts/."msgstr "在技能内部移动或重命名这个文件——路径仍保持在 references/ 或 scripts/ 下。"@@ -9945,6 +9976,10 @@ msgstr "OpenKnowledge 编辑了 {subject}"msgid "OpenKnowledge edited a document"msgstr "OpenKnowledge 编辑了一个文档"+#: src/uninstall/UninstallResultScreen.tsx+msgid "OpenKnowledge files were removed"+msgstr "已移除 OpenKnowledge 文件"+#: src/lib/acp/tool-call-display.tsmsgid "OpenKnowledge imported {source}"msgstr "OpenKnowledge 导入了 {source}"@@ -11303,6 +11338,10 @@ msgstr "已把“{0}”从其他所有位置移除——它的来源文件夹仍msgid "Removed \"{projectName}\" from recent projects. Its folder no longer exists."msgstr "已把“{projectName}”从最近的项目中移除。它的文件夹已不存在。"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Removed OpenKnowledge files"+msgstr "已移除 OpenKnowledge 文件"+#. placeholder {0}: connection.label#. placeholder {1}: sharedChoice.peers#: src/components/settings/AgentConnectionDialogs.tsx@@ -11794,9 +11833,14 @@ msgstr "在文件资源管理器中显示"#: src/components/command-palette-commands.ts#: src/lib/platform-labels.ts+#: src/uninstall/UninstallResultScreen.tsxmsgid "Reveal in Finder"msgstr "在访达中显示"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Reveal in Finder shows the app so you can drag it to the Trash."+msgstr "“在 Finder 中显示”会显示应用,以便你将其拖到废纸篓。"+#: src/components/SkillOriginInline.tsxmsgid "Revert"msgstr "还原"@@ -12493,6 +12537,10 @@ msgstr "正在设置"msgid "Settings"msgstr "设置"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Settings and integrations were cleaned up."+msgstr "已清理设置和集成。"+#: src/components/settings/SettingsDialogShell.tsxmsgid "Settings content"msgstr "设置内容"@@ -13009,6 +13057,10 @@ msgstr "部分拖放的文件无法安全插入。"msgid "Some files are not listed — the working tree has too many changes."msgstr "部分文件未列出:工作区的更改过多。"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Some files may not have been removed. Open the cleanup log for details. You can reopen OpenKnowledge to try again."+msgstr "部分文件可能尚未移除。打开清理日志查看详情。你可以重新打开 OpenKnowledge 后重试。"+#: src/components/settings/SavedThemesTiles.tsxmsgid "Some saved themes aren’t shown because the theme folder exceeds the scan limit."msgstr "因为主题文件夹超出扫描限制,部分已保存的主题未显示。"@@ -14702,6 +14754,10 @@ msgstr "标题"msgid "To do"msgstr "待办"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "To do."+msgstr "待办。"+#: src/lib/keyboard-shortcuts.tsmsgid "Toggle a bullet list."msgstr "切换无序列表。"@@ -14960,6 +15016,10 @@ msgstr "输入即可编辑;<0>Cmd/Ctrl+Enter</0> 保存,<1>Esc</1> 取消。msgid "Type to find a doc"msgstr "输入以查找文档"+#: src/uninstall/UninstallApp.tsx+msgid "Unable to show the cleanup result"+msgstr "无法显示清理结果"+#: src/components/McpConsentDialogBody.tsxmsgid "unavailable on this platform"msgstr "这个平台不可用"diff --git a/packages/app/src/locales/zh-Hant/messages.json b/packages/app/src/locales/zh-Hant/messages.jsonindex 2546909d0..fe8ef96bf 100644--- a/packages/app/src/locales/zh-Hant/messages.json+++ b/packages/app/src/locales/zh-Hant/messages.json@@ -880,6 +880,7 @@"BVkqD9": ["索引維護已暫停,因為另一個 Git 屬性控制 index.md。更新 .gitattributes 以便作用域 index.md 路徑使用 merge=union,然後重試。"],+ "BVmgJG": ["「在 Finder 中顯示」會顯示應用程式,讓你將其拖曳到垃圾桶。"],"BWTzAb": ["手動"],"BY-g4_": ["新增模式"],"Ba4D2x": ["範本已匯入"],@@ -1091,6 +1092,7 @@"EPKVES": ["要用「", ["skillName"], "」覆蓋你的編輯來更新嗎?"],"EPwuTC": ["已使用 ", ["usedLabel"], " / ", ["sizeLabel"], " 個 token"],"EQXPXf": ["捲動到結尾"],+ "ES1zFv": ["將 OpenKnowledge.app 移到垃圾桶"],"ETyvvg": ["沒有相符的語言。"],"EWCJFu": ["已建立 ", ["target"]],"EWPtMO": ["程式碼"],@@ -1448,6 +1450,7 @@"JM_aq-": ["請使用 https:// 的 URL——http:// 只允許用在 localhost。"],"JOcPqH": ["把遠端儲存庫取到這台電腦上。"],"JOhCT9": ["推送包含"],+ "JReD69": ["已移除 OpenKnowledge 檔案"],"JWsZlx": ["請開啟一個專案才能編輯。"],"JYj5R2": ["瀏覽檔案"],"JZ8cO6": ["淺色、深色,或跟隨系統。"],@@ -1665,6 +1668,7 @@"M7SqjM": ["重新開啟"],"M92_0q": ["關閉註解"],"M9597s": ["正在準備分享 URL…"],+ "MAVznT": ["已清理設定和整合。"],"MBKkUy": ["skills.sh 無法使用;改為顯示 GitHub 結果(沒有安裝次數排名)。"],"MBfjUk": [["0", "plural", { "other": ["正在上傳 ", "#", " 個附件"] }]],"MCjC9A": ["刪除 ", ["deleteDescriptorLabel"]],@@ -2298,6 +2302,7 @@["configFile"],"</0> 檔案,那個檔案完全決定了這個專案的檢查行為。可以在這裡開關規則並編輯它們的選項;變更會寫回那個檔案。"],+ "V3JCWv": ["清理未完成"],"V3iDh1": ["依標準 JSON Schema 檔案(draft-06、draft-07、2019-09 或 2020-12)驗證文件的 frontmatter。把某個結構描述打開,就會驗證和它的 glob 相符的文件;違規會以警告呈現,絕不會擋住寫入。用「編輯」開啟結構描述檔案。"],@@ -2629,6 +2634,7 @@"ZQJ1IV": ["切換到編輯器的最後一個分頁。"],"ZQLDTl": ["已建立資料夾"],"ZQc7C8": ["輸入即可編輯;<0>Cmd/Ctrl+Enter</0> 儲存,<1>Esc</1> 取消。"],+ "ZR-8iJ": ["無法顯示清理結果"],"ZSoojc": ["複製失敗——請檢查 URL 後重試(", ["status"], ")"],"ZU8VV_": ["移除失敗:", ["error"]],"ZVOhXM": ["更新同步設定失敗——", ["detail"]],@@ -2776,6 +2782,7 @@"aRI3Om": ["關閉視窗"],"aS77on": ["會變更什麼?"],"aSVmqV": ["尚未偵測到 AI 工具。安裝之後,可在「設定 > 這個專案」中連接。"],+ "aTDVi6": ["已保留你的內容"],"aWlJai": ["正在啟動登入流程"],"aXkLuE": ["套用回應格式錯誤"],"a_u4ck": ["正在載入標籤"],@@ -2844,6 +2851,7 @@"bkQRMh": ["段落"],"blFttG": ["搜尋專案"],"bmC18N": ["正在重新連線前清除「", ["docName"], "」的本機協作資料。"],+ "bmI-q1": ["已移除 OpenKnowledge 檔案"],"bnOTEz": ["擷取中…"],"bn_MDX": ["為什麼需要注意"],"bpMVIA": ["無法將連結目標「", ["shown"], "」解析為專案本機目標。"],@@ -2933,6 +2941,7 @@"ciozf1": ["專案中已有的技能"],"cjtjry": ["在 OpenKnowledge 的導覽記錄中往回走。"],"cklVjM": ["時間軸"],+ "clJ3qM": ["完成。"],"cnGeoo": ["刪除"],"cqQyPB": ["資料夾名稱"],"crqzW5": ["AI 工具"],@@ -4014,6 +4023,7 @@["1"],"。SKILL.md 中指向它的內容將失效,直到重新建立為止。"],+ "psUrB1": ["Markdown 檔案和你編寫的技能未被更動。"],"psl2Sj": ["你的變更還在儲存中——請等一下再執行一次測試。"],"ptQ3_N": ["取消連結"],"pvnfJD": ["深色"],@@ -4476,6 +4486,7 @@["count", "plural", { "other": ["立即修正有已知自動修正方式的 ", "#", " 個問題。"] }]],"vmahUq": ["既有的底線可能不會立即更新。"],+ "vmwZHP": ["即將完成。以下是已完成和尚待完成的事項。"],"vp5vfW": ["1 小時"],"vppAju": ["新加入的附件要放在哪裡。"],"vqJXNe": ["安裝 <0>open-knowledge-discovery</0> 技能"],@@ -4519,6 +4530,9 @@"wSBXaS": ["管理 ", ["rowLabel"]],"wT4iQr": ["開啟視覺化編輯器的尋找,並展開取代控制項。"],"wTcjov": ["沒有工作區"],+ "wTf1ag": [+ "部分檔案可能尚未移除。開啟清理記錄以查看詳細資訊。你可以重新開啟 OpenKnowledge 後再試一次。"+ ],"wU8WyK": ["元素欄位"],"wVa83H": ["無法建立回報"],"wWtVYd": ["請輸入介於 1 到 65535 之間的連接埠。"],@@ -4626,6 +4640,7 @@"xiv-dW": ["還沒有檔案。"],"xk133d": ["將技能安裝到 ", ["path"], " — 第一個位置保存技能自身的副本"],"xloBjn": ["相對路徑"],+ "xnWySt": ["清理可能仍在進行中。"],"xrVr_k": ["無法建立技能:", ["0"]],"xsZhu-": ["頁碼"],"xtJgSe": ["這個來源包含好幾個技能——請選要匯入的那一個。"],@@ -4663,6 +4678,7 @@"yQE2r9": ["正在載入"],"yQyglE": ["沒有相符的文件"],"yR5LHI": ["請輸入 6 位十六進位值,例如 #1A2B3C"],+ "yU_9ur": ["待辦。"],"yUxR-Q": ["展開 ", ["keyName"]],"yWSvcf": ["內容根目錄"],"yWWThY": ["資產參照"],diff --git a/packages/app/src/locales/zh-Hant/messages.po b/packages/app/src/locales/zh-Hant/messages.poindex 5457b311c..a2e39558f 100644--- a/packages/app/src/locales/zh-Hant/messages.po+++ b/packages/app/src/locales/zh-Hant/messages.po@@ -1901,6 +1901,10 @@ msgstr "允許的值(留空 = 任意)"msgid "Allowed values for {field}"msgstr "{field} 允許的值"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Almost done. Here's what happened and what's left."+msgstr "即將完成。以下是已完成和尚待完成的事項。"+#: src/editor/image-upload/index.tsmsgid "Already at {assetContentPath} — reusing."msgstr "已經在 {assetContentPath} 了——直接重複使用。"@@ -2894,10 +2898,19 @@ msgstr "Claude Code(claude)未安裝,也不在你的 PATH 中。"msgid "Claude Desktop"msgstr "Claude Desktop"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Cleanup didn’t finish"+msgstr "清理未完成"+#: src/uninstall/UninstallNoticeScreen.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Cleanup log"msgstr "清理記錄"+#: src/uninstall/UninstallApp.tsx+msgid "Cleanup may still be running."+msgstr "清理可能仍在進行中。"+#: src/components/settings/SearchSection.tsx#: src/components/SkillPluginBundleDialog.tsxmsgid "Clear"@@ -3037,6 +3050,8 @@ msgstr "正在複製…"#: src/components/ui/sheet.tsx#: src/editor/find-replace/FindReplaceBar.tsx#: src/lib/native-menu-catalog.ts+#: src/uninstall/UninstallApp.tsx+#: src/uninstall/UninstallResultScreen.tsxmsgid "Close"msgstr "關閉"@@ -5105,6 +5120,10 @@ msgstr "完成"msgid "Done"msgstr "完成"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "Done."+msgstr "完成。"+#: src/components/ui/tag-pill-input.tsxmsgid "Double-click to edit"msgstr "按兩下即可編輯"@@ -7726,6 +7745,10 @@ msgstr "讓您的知識庫與 Open Knowledge Format 保持一致。"msgid "Kept both — \"{0}\" is its own skill now"msgstr "兩個都保留了——「{0}」現在是一個獨立的技能"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Kept your content"+msgstr "已保留你的內容"+#: src/components/settings/SearchSection.tsxmsgid "Key ending in {keyHint}"msgstr "以 {keyHint} 結尾的金鑰"@@ -8239,6 +8262,10 @@ msgstr "Markdown"msgid "Markdown checks do not apply to this file."msgstr "此檔案不適用 Markdown 檢查。"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Markdown files and authored skills were left untouched."+msgstr "Markdown 檔案和你編寫的技能未被更動。"+#: src/components/EditorModeToggle.tsxmsgid "Markdown source"msgstr "Markdown 原始碼"@@ -8453,6 +8480,10 @@ msgstr "移動區塊"msgid "Move down"msgstr "下移"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Move OpenKnowledge.app to the Trash"+msgstr "將 OpenKnowledge.app 移到垃圾桶"+#: src/components/SkillFileRenameDialog.tsxmsgid "Move or rename this file inside the skill — the path stays under references/ or scripts/."msgstr "在技能內部移動或重新命名這個檔案——路徑仍會留在 references/ 或 scripts/ 底下。"@@ -9945,6 +9976,10 @@ msgstr "OpenKnowledge 編輯了 {subject}"msgid "OpenKnowledge edited a document"msgstr "OpenKnowledge 編輯了一個文件"+#: src/uninstall/UninstallResultScreen.tsx+msgid "OpenKnowledge files were removed"+msgstr "已移除 OpenKnowledge 檔案"+#: src/lib/acp/tool-call-display.tsmsgid "OpenKnowledge imported {source}"msgstr "OpenKnowledge 匯入了 {source}"@@ -11303,6 +11338,10 @@ msgstr "已把「{0}」從其他所有位置移除——它的來源資料夾仍msgid "Removed \"{projectName}\" from recent projects. Its folder no longer exists."msgstr "已把「{projectName}」從最近的專案中移除。它的資料夾已經不存在了。"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Removed OpenKnowledge files"+msgstr "已移除 OpenKnowledge 檔案"+#. placeholder {0}: connection.label#. placeholder {1}: sharedChoice.peers#: src/components/settings/AgentConnectionDialogs.tsx@@ -11794,9 +11833,14 @@ msgstr "在檔案總管中顯示"#: src/components/command-palette-commands.ts#: src/lib/platform-labels.ts+#: src/uninstall/UninstallResultScreen.tsxmsgid "Reveal in Finder"msgstr "在 Finder 中顯示"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Reveal in Finder shows the app so you can drag it to the Trash."+msgstr "「在 Finder 中顯示」會顯示應用程式,讓你將其拖曳到垃圾桶。"+#: src/components/SkillOriginInline.tsxmsgid "Revert"msgstr "回復"@@ -12493,6 +12537,10 @@ msgstr "正在設定"msgid "Settings"msgstr "設定"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Settings and integrations were cleaned up."+msgstr "已清理設定和整合。"+#: src/components/settings/SettingsDialogShell.tsxmsgid "Settings content"msgstr "設定內容"@@ -13009,6 +13057,10 @@ msgstr "部分拖放的檔案無法安全插入。"msgid "Some files are not listed — the working tree has too many changes."msgstr "部分檔案未列出:工作區的變更過多。"+#: src/uninstall/UninstallResultScreen.tsx+msgid "Some files may not have been removed. Open the cleanup log for details. You can reopen OpenKnowledge to try again."+msgstr "部分檔案可能尚未移除。開啟清理記錄以查看詳細資訊。你可以重新開啟 OpenKnowledge 後再試一次。"+#: src/components/settings/SavedThemesTiles.tsxmsgid "Some saved themes aren’t shown because the theme folder exceeds the scan limit."msgstr "因為主題資料夾超出掃描限制,部分已儲存的主題未顯示。"@@ -14702,6 +14754,10 @@ msgstr "標題"msgid "To do"msgstr "待辦"+#: src/uninstall/UninstallNoticeScreen.tsx+msgid "To do."+msgstr "待辦。"+#: src/lib/keyboard-shortcuts.tsmsgid "Toggle a bullet list."msgstr "切換項目符號清單。"@@ -14960,6 +15016,10 @@ msgstr "輸入即可編輯;<0>Cmd/Ctrl+Enter</0> 儲存,<1>Esc</1> 取消。msgid "Type to find a doc"msgstr "輸入以尋找文件"+#: src/uninstall/UninstallApp.tsx+msgid "Unable to show the cleanup result"+msgstr "無法顯示清理結果"+#: src/components/McpConsentDialogBody.tsxmsgid "unavailable on this platform"msgstr "這個平台無法使用"diff --git a/packages/app/src/uninstall/UninstallApp.dom.test.tsx b/packages/app/src/uninstall/UninstallApp.dom.test.tsxindex bff377f48..ea97dce79 100644--- a/packages/app/src/uninstall/UninstallApp.dom.test.tsx+++ b/packages/app/src/uninstall/UninstallApp.dom.test.tsx@@ -3,8 +3,8 @@ import type {UninstallDispatchResult,UninstallScreenSpec,} from '@inkeep/open-knowledge-core';-import { cleanup, render, screen } from '@testing-library/react';-import { afterEach, describe, expect, test } from 'vitest';+import { act, cleanup, fireEvent, render, screen } from '@testing-library/react';+import { afterEach, describe, expect, test, vi } from 'vitest';import { UninstallApp } from './UninstallApp';function stubBridge(ready: () => Promise<UninstallDispatchResult>): void {@@ -43,6 +43,34 @@ describe('UninstallApp routing', () => {).toBeDefined();});+ test('keeps progress mounted until cleanup supplies a result, then replaces it', async () => {+ let complete = false;+ const send = vi.fn(async (): Promise<UninstallDispatchResult> => ({ kind: 'accepted' }));+ window.okUninstall = {+ ready: async () => ({+ kind: 'screen',+ screen: complete+ ? {+ kind: 'notice',+ notice: {+ title: 'Cleanup didn’t finish',+ paragraphs: ['State retained.'],+ confirmLabel: 'Close',+ },+ }+ : { kind: 'progress', awaitResult: true },+ }),+ send,+ };+ render(<UninstallApp />);+ expect(await screen.findByRole('status')).toBeDefined();+ await vi.waitFor(() => expect(send).toHaveBeenCalledWith({ kind: 'progress-shown' }));+ expect(screen.queryByText('State retained.')).toBeNull();+ complete = true;+ expect(await screen.findByText('State retained.')).toBeDefined();+ expect(screen.queryByRole('status')).toBeNull();+ });+test('mounts a notice for a notice screen', async () => {stubBridge(sendsScreen({@@ -54,15 +82,196 @@ describe('UninstallApp routing', () => {expect(await screen.findByText('Cleanup finished.')).toBeDefined();});- test('keeps the loading placeholder when main refuses', async () => {+ test('shows a terminal notice when main refuses', async () => {stubBridge(() => Promise.resolve({ kind: 'refused', reason: 'unknown-window' }));render(<UninstallApp />);- expect(await screen.findByText('Preparing to uninstall OpenKnowledge')).toBeDefined();+ expect(await screen.findByText('Unable to show the cleanup result')).toBeDefined();});- test('keeps the loading placeholder when the ready invoke rejects', async () => {+ test('shows a terminal notice when the ready invoke rejects', async () => {stubBridge(() => Promise.reject(new Error('ipc channel closed')));render(<UninstallApp />);- expect(await screen.findByText('Preparing to uninstall OpenKnowledge')).toBeDefined();+ expect(await screen.findByText('Unable to show the cleanup result')).toBeDefined();});});++test('a failed progress bridge becomes dismissible without claiming cleanup finished', async () => {+ const close = vi.spyOn(window, 'close').mockImplementation(() => {});+ const ready = vi+ .fn<() => Promise<UninstallDispatchResult>>()+ .mockResolvedValueOnce({ kind: 'screen', screen: { kind: 'progress', awaitResult: true } })+ .mockResolvedValue({ kind: 'refused', reason: 'unknown-window' });+ stubBridge(ready);+ try {+ render(<UninstallApp />);+ expect(await screen.findByText('Unable to show the cleanup result')).toBeDefined();+ expect(screen.queryByRole('status')).toBeNull();+ fireEvent.click(screen.getByRole('button', { name: 'Close' }));+ expect(close).toHaveBeenCalledOnce();+ } finally {+ cleanup();+ close.mockRestore();+ window.okUninstall = undefined;+ }+});++test('a progress result wait has a deadline even while main keeps answering progress', async () => {+ vi.useFakeTimers();+ stubBridge(sendsScreen({ kind: 'progress', awaitResult: true }));+ try {+ await act(async () => {+ render(<UninstallApp />);+ });+ await act(async () => {+ await vi.advanceTimersByTimeAsync(10 * 60_000);+ });+ expect(screen.getByText('Unable to show the cleanup result')).toBeDefined();+ expect(screen.queryByRole('status')).toBeNull();+ } finally {+ cleanup();+ window.okUninstall = undefined;+ vi.useRealTimers();+ }+});++test('does not poll a progress window that will be closed by the original app', async () => {+ vi.useFakeTimers();+ const ready = vi.fn(sendsScreen({ kind: 'progress' }));+ stubBridge(ready);+ try {+ await act(async () => {+ render(<UninstallApp />);+ });+ await act(async () => {+ await vi.advanceTimersByTimeAsync(2000);+ });+ expect(ready).toHaveBeenCalledOnce();+ } finally {+ cleanup();+ window.okUninstall = undefined;+ vi.useRealTimers();+ }+});++test('a transient progress timeout retries and still displays the completed result', async () => {+ vi.useFakeTimers();+ const ready = vi+ .fn<() => Promise<UninstallDispatchResult>>()+ .mockResolvedValueOnce({ kind: 'screen', screen: { kind: 'progress', awaitResult: true } })+ .mockImplementationOnce(() => new Promise(() => {}))+ .mockResolvedValue({ kind: 'screen', screen: { kind: 'result', outcome: 'success' } });+ stubBridge(ready);+ try {+ await act(async () => {+ render(<UninstallApp />);+ });+ await act(async () => {+ await vi.advanceTimersByTimeAsync(6000);+ });+ expect(screen.getByRole('heading', { name: 'OpenKnowledge files were removed' })).toBeDefined();+ expect(screen.queryByText('Unable to show the cleanup result')).toBeNull();+ } finally {+ cleanup();+ window.okUninstall = undefined;+ vi.useRealTimers();+ }+});++test('an unavailable result does not instruct the user to use a missing log action', async () => {+ stubBridge(() => Promise.resolve({ kind: 'refused', reason: 'unknown-window' }));+ try {+ render(<UninstallApp />);+ expect(await screen.findByText('Cleanup may still be running.')).toBeDefined();+ expect(screen.queryByText(/Check the cleanup log/)).toBeNull();+ } finally {+ cleanup();+ window.okUninstall = undefined;+ }+});++test('successful progress responses reset the transient failure budget', async () => {+ vi.useFakeTimers();+ const progress: UninstallDispatchResult = {+ kind: 'screen',+ screen: { kind: 'progress', awaitResult: true },+ };+ const ready = vi+ .fn<() => Promise<UninstallDispatchResult>>()+ .mockResolvedValueOnce(progress)+ .mockRejectedValueOnce(new Error('temporary'))+ .mockRejectedValueOnce(new Error('temporary'))+ .mockResolvedValueOnce(progress)+ .mockRejectedValueOnce(new Error('temporary'))+ .mockRejectedValueOnce(new Error('temporary'))+ .mockResolvedValue({ kind: 'screen', screen: { kind: 'result', outcome: 'success' } });+ stubBridge(ready);+ try {+ await act(async () => {+ render(<UninstallApp />);+ });+ await act(async () => {+ await vi.advanceTimersByTimeAsync(2000);+ });+ expect(screen.getByRole('heading', { name: 'OpenKnowledge files were removed' })).toBeDefined();+ } finally {+ cleanup();+ window.okUninstall = undefined;+ vi.useRealTimers();+ }+});++test('a missing bridge is terminal immediately', async () => {+ window.okUninstall = undefined;+ try {+ await act(async () => {+ render(<UninstallApp />);+ });+ expect(screen.getByText('Unable to show the cleanup result')).toBeDefined();+ } finally {+ cleanup();+ }+});++test('three consecutive progress failures stop polling', async () => {+ vi.useFakeTimers();+ const ready = vi+ .fn<() => Promise<UninstallDispatchResult>>()+ .mockResolvedValueOnce({ kind: 'screen', screen: { kind: 'progress', awaitResult: true } })+ .mockRejectedValue(new Error('channel unavailable'));+ stubBridge(ready);+ try {+ await act(async () => {+ render(<UninstallApp />);+ });+ await act(async () => {+ await vi.advanceTimersByTimeAsync(1000);+ });+ expect(screen.getByText('Unable to show the cleanup result')).toBeDefined();+ expect(ready).toHaveBeenCalledTimes(4);+ await act(async () => {+ await vi.advanceTimersByTimeAsync(60_000);+ });+ expect(ready).toHaveBeenCalledTimes(4);+ } finally {+ cleanup();+ window.okUninstall = undefined;+ vi.useRealTimers();+ }+});++test('an unexpected protocol response is terminal without retrying', async () => {+ const ready = vi+ .fn<() => Promise<UninstallDispatchResult>>()+ .mockResolvedValue({ kind: 'accepted' });+ stubBridge(ready);+ try {+ await act(async () => {+ render(<UninstallApp />);+ });+ expect(screen.getByText('Unable to show the cleanup result')).toBeDefined();+ expect(ready).toHaveBeenCalledOnce();+ } finally {+ cleanup();+ window.okUninstall = undefined;+ }+});diff --git a/packages/app/src/uninstall/UninstallApp.tsx b/packages/app/src/uninstall/UninstallApp.tsxindex b7d93cb42..da35be02e 100644--- a/packages/app/src/uninstall/UninstallApp.tsx+++ b/packages/app/src/uninstall/UninstallApp.tsx@@ -1,25 +1,125 @@-import type { UninstallScreenSpec } from '@inkeep/open-knowledge-core';-import { Trans } from '@lingui/react/macro';+import {+ UNINSTALL_RESULT_WAIT_TIMEOUT_MS,+ type UninstallScreenSpec,+} from '@inkeep/open-knowledge-core';+import { Trans, useLingui } from '@lingui/react/macro';import { useEffect, useState } from 'react';-import { requestUninstallScreen, sendUninstallIntent } from './bridge';+import {+ requestUninstallScreen,+ sendUninstallIntent,+ type UninstallScreenResponse,+} from './bridge';import { UninstallNoticeScreen } from './UninstallNoticeScreen';import { UninstallPickerScreen } from './UninstallPickerScreen';import { UninstallProgressScreen } from './UninstallProgressScreen';+import { UninstallResultScreen } from './UninstallResultScreen';import { UninstallSurveyScreen } from './UninstallSurveyScreen';+const MAX_TRANSIENT_SCREEN_FAILURES = 3;+const SCREEN_POLL_INTERVAL_MS = 250;++function canRetry(response: UninstallScreenResponse): boolean {+ if (response.kind !== 'unavailable') return false;+ switch (response.reason) {+ case 'request-failed':+ case 'timeout':+ return true;+ case 'missing-bridge':+ case 'unexpected-response':+ return false;+ default: {+ const exhaustive: never = response;+ return exhaustive;+ }+ }+}+export function UninstallApp() {+ const { t } = useLingui();+ const [unavailable, setUnavailable] = useState(false);const [screen, setScreen] = useState<UninstallScreenSpec | null>(null);useEffect(() => {let live = true;- void requestUninstallScreen().then((next) => {- if (live) setScreen(next);- });+ let failures = 0;+ let timer: ReturnType<typeof setTimeout> | undefined;+ const load = async () => {+ const next = await requestUninstallScreen();+ if (!live) return;+ if (next.kind === 'screen') setScreen(next.screen);+ else {+ failures = failures + 1;+ if (canRetry(next) && failures < MAX_TRANSIENT_SCREEN_FAILURES)+ timer = setTimeout(() => void load(), SCREEN_POLL_INTERVAL_MS);+ else setUnavailable(true);+ }+ };+ void load();return () => {live = false;+ clearTimeout(timer);};}, []);+ const screenKind = screen?.kind;+ const awaitResult = screen?.kind === 'progress' && screen.awaitResult === true;+ useEffect(() => {+ if (unavailable || screenKind !== 'progress') return;+ let live = true;+ let timer: ReturnType<typeof setTimeout> | undefined;+ let frame = requestAnimationFrame(() => {+ frame = requestAnimationFrame(() => sendUninstallIntent({ kind: 'progress-shown' }));+ });+ let failures = 0;+ const refresh = async () => {+ const next = await requestUninstallScreen();+ if (!live) return;+ if (next.kind !== 'screen') {+ failures = failures + 1;+ if (!canRetry(next) || failures >= MAX_TRANSIENT_SCREEN_FAILURES) {+ setUnavailable(true);+ return;+ }+ } else {+ failures = 0;+ if (next.screen.kind !== 'progress') {+ setScreen(next.screen);+ return;+ }+ }+ timer = setTimeout(() => void refresh(), SCREEN_POLL_INTERVAL_MS);+ };+ if (awaitResult) timer = setTimeout(() => void refresh(), SCREEN_POLL_INTERVAL_MS);+ const deadline = awaitResult+ ? setTimeout(() => {+ live = false;+ clearTimeout(timer);+ setUnavailable(true);+ }, UNINSTALL_RESULT_WAIT_TIMEOUT_MS)+ : undefined;+ return () => {+ live = false;+ clearTimeout(timer);+ clearTimeout(deadline);+ cancelAnimationFrame(frame);+ };+ }, [screenKind, awaitResult, unavailable]);++ if (unavailable) {+ return (+ <UninstallNoticeScreen+ notice={{+ title: t`Unable to show the cleanup result`,+ paragraphs: [t`Cleanup may still be running.`],+ confirmLabel: t`Close`,+ }}+ onConfirm={() => window.close()}+ onCancel={() => window.close()}+ onRevealLog={() => {}}+ />+ );+ }+if (screen !== null) {switch (screen.kind) {case 'picker':@@ -41,10 +141,20 @@ export function UninstallApp() {);case 'progress':return <UninstallProgressScreen />;+ case 'result':+ return (+ <UninstallResultScreen+ outcome={screen.outcome}+ onRevealLog={() => sendUninstallIntent({ kind: 'notice-reveal-log' })}+ onConfirm={() => sendUninstallIntent({ kind: 'notice-confirm' })}+ onCancel={() => sendUninstallIntent({ kind: 'notice-cancel' })}+ />+ );case 'notice':return (<UninstallNoticeScreennotice={screen.notice}+ onRevealLog={() => sendUninstallIntent({ kind: 'notice-reveal-log' })}onConfirm={() => sendUninstallIntent({ kind: 'notice-confirm' })}onCancel={() => sendUninstallIntent({ kind: 'notice-cancel' })}/>diff --git a/packages/app/src/uninstall/UninstallNoticeScreen.dom.test.tsx b/packages/app/src/uninstall/UninstallNoticeScreen.dom.test.tsxindex 30d2b3a63..6454a7237 100644--- a/packages/app/src/uninstall/UninstallNoticeScreen.dom.test.tsx+++ b/packages/app/src/uninstall/UninstallNoticeScreen.dom.test.tsx@@ -26,8 +26,16 @@ const FAILURE_NOTICE: UninstallNoticeSpec = {function renderNotice(notice: UninstallNoticeSpec) {const onConfirm = vi.fn();const onCancel = vi.fn();- render(<UninstallNoticeScreen notice={notice} onConfirm={onConfirm} onCancel={onCancel} />);- return { onConfirm, onCancel, user: userEvent.setup() };+ const onRevealLog = vi.fn();+ render(+ <UninstallNoticeScreen+ notice={notice}+ onConfirm={onConfirm}+ onCancel={onCancel}+ onRevealLog={onRevealLog}+ />,+ );+ return { onConfirm, onCancel, onRevealLog, user: userEvent.setup() };}describe('uninstall notice screen', () => {@@ -89,3 +97,78 @@ describe('uninstall notice screen', () => {expect(log.getAttribute('tabindex')).toBe('0');});});++const SUCCESS_NOTICE = {+ title: 'OpenKnowledge files were removed',+ subtitle: "Almost done. Here's what happened and what's left.",+ paragraphs: [],+ checklist: [+ {+ label: 'Kept your content',+ detail: 'Markdown files and authored skills were left untouched.',+ done: true,+ },+ {+ label: 'Removed OpenKnowledge files',+ detail: 'Settings and integrations were cleaned up.',+ done: true,+ },+ {+ label: 'Move OpenKnowledge.app to the Trash',+ detail: 'Reveal in Finder shows the app so you can drag it to the Trash.',+ done: false,+ },+ ],+ logRevealLabel: 'Cleanup log',+ confirmLabel: 'Reveal in Finder',+};++test('shows completed cleanup and the remaining app removal step with separate actions', async () => {+ const { user, onConfirm, onRevealLog } = renderNotice(SUCCESS_NOTICE);+ expect(screen.getByText(SUCCESS_NOTICE.subtitle)).toBeDefined();+ const items = screen.getAllByRole('listitem');+ expect(items).toHaveLength(3);+ expect(items[0]?.textContent).toContain('Done.');+ expect(items[1]?.textContent).toContain('Done.');+ expect(items[2]?.textContent).toContain('To do.');+ expect(document.activeElement).toBe(screen.getByRole('button', { name: 'Reveal in Finder' }));+ await user.click(screen.getByRole('button', { name: 'Cleanup log' }));+ expect(onRevealLog).toHaveBeenCalledTimes(1);+ expect(onConfirm).not.toHaveBeenCalled();+});++test('dismisses a completion notice on Escape without revealing the app', async () => {+ const { user, onConfirm, onCancel } = renderNotice(SUCCESS_NOTICE);+ await user.keyboard('{Escape}');+ expect(onCancel).toHaveBeenCalledTimes(1);+ expect(onConfirm).not.toHaveBeenCalled();+});++test('keeps an inline failure log reachable by keyboard', async () => {+ const { user } = renderNotice(FAILURE_NOTICE);+ await user.tab({ shift: true });+ expect(document.activeElement).toBe(screen.getByRole('region', { name: 'Cleanup log' }));+});++test('announces the completion subtitle as part of the modal description', () => {+ renderNotice(SUCCESS_NOTICE);+ const dialog = screen.getByRole('alertdialog');+ const description = dialog+ .getAttribute('aria-describedby')+ ?.split(' ')+ .map((id) => document.getElementById(id)?.textContent)+ .join(' ');+ expect(description).toContain(SUCCESS_NOTICE.subtitle);+ expect(dialog.getAttribute('aria-modal')).toBe('true');+});++test('wraps focus from the first and last control in the failure notice', async () => {+ const { user } = renderNotice(FAILURE_NOTICE);+ const log = screen.getByRole('region', { name: 'Cleanup log' });+ const confirm = screen.getByRole('button', { name: FAILURE_NOTICE.confirmLabel });+ confirm.focus();+ await user.tab();+ expect(document.activeElement).toBe(log);+ await user.tab({ shift: true });+ expect(document.activeElement).toBe(confirm);+});diff --git a/packages/app/src/uninstall/UninstallNoticeScreen.tsx b/packages/app/src/uninstall/UninstallNoticeScreen.tsxindex 9f16b43b8..470e88df1 100644--- a/packages/app/src/uninstall/UninstallNoticeScreen.tsx+++ b/packages/app/src/uninstall/UninstallNoticeScreen.tsx@@ -1,43 +1,116 @@-import type { UninstallNoticeScreen as UninstallNoticeSpec } from '@inkeep/open-knowledge-core';-import { useLingui } from '@lingui/react/macro';-import { useEffect, useId } from 'react';+import type {+ UninstallNoticeChecklistItem,+ UninstallNoticeScreen as UninstallNoticeSpec,+} from '@inkeep/open-knowledge-core';+import { Trans, useLingui } from '@lingui/react/macro';+import { Check } from 'lucide-react';+import { useEffect, useId, useRef } from 'react';import { Button } from '@/components/ui/button';+import { cn } from '@/lib/utils';interface UninstallNoticeScreenProps {notice: UninstallNoticeSpec;onConfirm: () => void;onCancel: () => void;+ onRevealLog: () => void;}-export function UninstallNoticeScreen({ notice, onConfirm, onCancel }: UninstallNoticeScreenProps) {+function NoticeChecklist({ items }: { items: readonly UninstallNoticeChecklistItem[] }) {+ return (+ <ol className="mb-1.5">+ {items.map((item, index) => (+ <li key={item.label} className="relative pb-5 ps-[30px] last:pb-1">+ {index < items.length - 1 && (+ <span+ aria-hidden="true"+ className="absolute top-[22px] bottom-0.5 start-[9px] w-0.5 bg-border"+ />+ )}+ <span+ aria-hidden="true"+ className={cn(+ 'absolute top-px start-0 inline-flex size-5 items-center justify-center rounded-full',+ item.done+ ? 'bg-primary/15 text-primary'+ : 'border-[1.5px] border-muted-foreground/50',+ )}+ >+ {item.done && <Check className="size-3" />}+ </span>+ <span className="sr-only">+ {item.done ? <Trans>Done.</Trans> : <Trans>To do.</Trans>}+ </span>+ <span className="block">+ <span className="font-medium">{item.label}</span>+ {item.detail !== undefined && (+ <span className="mt-0.5 block text-muted-foreground leading-snug">{item.detail}</span>+ )}+ </span>+ </li>+ ))}+ </ol>+ );+}++export function UninstallNoticeScreen({+ notice,+ onConfirm,+ onCancel,+ onRevealLog,+}: UninstallNoticeScreenProps) {const { t } = useLingui();const titleId = useId();const bodyId = useId();+ const subtitleId = useId();+ const root = useRef<HTMLDivElement>(null);const hasCancel = notice.cancelLabel !== undefined;useEffect(() => {const onKeyDown = (event: KeyboardEvent) => {+ if (event.isComposing) return;+ if (event.key === 'Tab') {+ const buttons = root.current?.querySelectorAll<HTMLElement>(+ 'button:not([disabled]), [tabindex="0"]',+ );+ const first = buttons?.[0];+ const last = buttons?.[buttons.length - 1];+ if (event.shiftKey && document.activeElement === first) {+ event.preventDefault();+ last?.focus();+ } else if (!event.shiftKey && document.activeElement === last) {+ event.preventDefault();+ first?.focus();+ }+ return;+ }if (event.key !== 'Escape') return;- if (hasCancel) onCancel();+ if (hasCancel || notice.logRevealLabel !== undefined) onCancel();else onConfirm();};document.addEventListener('keydown', onKeyDown);return () => {document.removeEventListener('keydown', onKeyDown);};- }, [hasCancel, onCancel, onConfirm]);+ }, [hasCancel, notice.logRevealLabel, onCancel, onConfirm]);return (<div+ ref={root}role="alertdialog"aria-labelledby={titleId}- aria-describedby={bodyId}+ aria-modal="true"+ aria-describedby={notice.subtitle === undefined ? bodyId : `${subtitleId} ${bodyId}`}className="flex h-dvh flex-col bg-background text-foreground">- <header className="shrink-0 px-6 pt-5 pb-3.5">+ <header className="shrink-0 space-y-4 px-6 pt-5 pb-3.5"><h1 id={titleId} className="font-medium text-base leading-none">{notice.title}</h1>+ {notice.subtitle !== undefined && (+ <p id={subtitleId} className="text-muted-foreground text-sm leading-snug">+ {notice.subtitle}+ </p>+ )}</header><div id={bodyId} className="flex min-h-0 flex-1 flex-col px-6 pt-1 pb-4 text-sm">@@ -46,6 +119,7 @@ export function UninstallNoticeScreen({ notice, onConfirm, onCancel }: Uninstall{text}</p>))}+ {notice.checklist !== undefined && <NoticeChecklist items={notice.checklist} />}{notice.log !== undefined && (<sectionaria-label={t`Cleanup log`}@@ -63,6 +137,19 @@ export function UninstallNoticeScreen({ notice, onConfirm, onCancel }: Uninstall{notice.footnote}</p>)}+ {notice.logRevealLabel !== undefined && (+ <p className="mt-0.5">+ <Button+ type="button"+ variant="link-muted"+ size="xs"+ className="h-auto px-0 underline underline-offset-2"+ onClick={onRevealLog}+ >+ {notice.logRevealLabel}+ </Button>+ </p>+ )}</div><footer className="flex items-center justify-end gap-2.5 border-border border-t bg-muted/50 px-6 pt-3.5 pb-4">diff --git a/packages/app/src/uninstall/UninstallResultScreen.dom.test.tsx b/packages/app/src/uninstall/UninstallResultScreen.dom.test.tsxnew file mode 100644index 000000000..bd3ade8af--- /dev/null+++ b/packages/app/src/uninstall/UninstallResultScreen.dom.test.tsx@@ -0,0 +1,43 @@+import { cleanup, render, screen } from '@testing-library/react';+import { afterEach, expect, test, vi } from 'vitest';+import { dynamicActivate } from '@/lib/activate-locale';+import { i18n } from '@/lib/i18n';+import { activateUninstallLocale } from './locale';+import { UninstallResultScreen } from './UninstallResultScreen';++afterEach(async () => {+ cleanup();+ await dynamicActivate('en');+ window.history.replaceState(null, '', '/');+ localStorage.clear();+ document.documentElement.lang = 'en';+ document.documentElement.dir = 'ltr';+});++test('renders the verified checklist with the app removal step still pending', () => {+ render(+ <UninstallResultScreen+ outcome="success"+ onConfirm={vi.fn()}+ onCancel={vi.fn()}+ onRevealLog={vi.fn()}+ />,+ );+ expect(screen.getByRole('heading', { name: 'OpenKnowledge files were removed' })).toBeDefined();+ const items = screen.getAllByRole('listitem');+ expect(items.map((item) => item.textContent?.includes('Done.'))).toEqual([true, true, false]);+ expect(items[2]?.textContent).toContain('To do.');+});++test('activates the handed-off language and keeps failure separate from success', async () => {+ window.history.replaceState(null, '', '/?locale=es');+ await activateUninstallLocale();+ const props = { onConfirm: vi.fn(), onCancel: vi.fn(), onRevealLog: vi.fn() };+ const view = render(<UninstallResultScreen outcome="success" {...props} />);+ expect(i18n.locale).toBe('es');+ expect(document.documentElement.lang).toBe('es');+ view.rerender(<UninstallResultScreen outcome="failure" {...props} />);+ expect(screen.getByRole('heading', { name: 'Cleanup didn’t finish' })).toBeDefined();+ expect(screen.queryByRole('list')).toBeNull();+ expect(screen.queryByText('Reveal in Finder')).toBeNull();+});diff --git a/packages/app/src/uninstall/UninstallResultScreen.tsx b/packages/app/src/uninstall/UninstallResultScreen.tsxnew file mode 100644index 000000000..f8daad2e5--- /dev/null+++ b/packages/app/src/uninstall/UninstallResultScreen.tsx@@ -0,0 +1,59 @@+import type { UninstallNoticeScreen as UninstallNoticeSpec } from '@inkeep/open-knowledge-core';+import { useLingui } from '@lingui/react/macro';+import { UninstallNoticeScreen } from './UninstallNoticeScreen';++export function UninstallResultScreen({+ outcome,+ onConfirm,+ onCancel,+ onRevealLog,+}: {+ outcome: 'success' | 'failure';+ onConfirm: () => void;+ onCancel: () => void;+ onRevealLog: () => void;+}) {+ const { t } = useLingui();+ const notice: UninstallNoticeSpec =+ outcome === 'failure'+ ? {+ title: t`Cleanup didn’t finish`,+ paragraphs: [+ t`Some files may not have been removed. Open the cleanup log for details. You can reopen OpenKnowledge to try again.`,+ ],+ confirmLabel: t`Close`,+ logRevealLabel: t`Cleanup log`,+ }+ : {+ title: t`OpenKnowledge files were removed`,+ subtitle: t`Almost done. Here's what happened and what's left.`,+ paragraphs: [],+ checklist: [+ {+ label: t`Kept your content`,+ detail: t`Markdown files and authored skills were left untouched.`,+ done: true,+ },+ {+ label: t`Removed OpenKnowledge files`,+ detail: t`Settings and integrations were cleaned up.`,+ done: true,+ },+ {+ label: t`Move OpenKnowledge.app to the Trash`,+ detail: t`Reveal in Finder shows the app so you can drag it to the Trash.`,+ done: false,+ },+ ],+ logRevealLabel: t`Cleanup log`,+ confirmLabel: t`Reveal in Finder`,+ };+ return (+ <UninstallNoticeScreen+ notice={notice}+ onConfirm={onConfirm}+ onCancel={onCancel}+ onRevealLog={onRevealLog}+ />+ );+}diff --git a/packages/app/src/uninstall/bridge.test.ts b/packages/app/src/uninstall/bridge.test.tsindex 52c9c2582..39425a605 100644--- a/packages/app/src/uninstall/bridge.test.ts+++ b/packages/app/src/uninstall/bridge.test.ts@@ -1,6 +1,6 @@// @vitest-environment jsdomimport type { OkUninstallBridge, UninstallDispatchResult } from '@inkeep/open-knowledge-core';-import { afterEach, describe, expect, test } from 'vitest';+import { afterEach, describe, expect, test, vi } from 'vitest';import { requestUninstallScreen, sendUninstallIntent } from './bridge';function bridgeWith(ready: () => Promise<UninstallDispatchResult>): OkUninstallBridge {@@ -15,28 +15,37 @@ describe('requestUninstallScreen', () => {window.okUninstall = undefined;});- test('returns null when the window has no bridge', async () => {+ test('reports an absent bridge', async () => {window.okUninstall = undefined;- expect(await requestUninstallScreen()).toBeNull();+ expect(await requestUninstallScreen()).toEqual({+ kind: 'unavailable',+ reason: 'missing-bridge',+ });});test('returns the screen main answers the ready pull with', async () => {window.okUninstall = bridgeWith(() =>Promise.resolve({ kind: 'screen', screen: { kind: 'progress' } }),);- expect(await requestUninstallScreen()).toEqual({ kind: 'progress' });+ expect(await requestUninstallScreen()).toEqual({+ kind: 'screen',+ screen: { kind: 'progress' },+ });});- test('returns null when main refuses', async () => {+ test('retains the refusal reason', async () => {window.okUninstall = bridgeWith(() =>Promise.resolve({ kind: 'refused', reason: 'unknown-window' }),);- expect(await requestUninstallScreen()).toBeNull();+ expect(await requestUninstallScreen()).toEqual({ kind: 'refused', reason: 'unknown-window' });});- test('resolves to null instead of rejecting when the ready invoke rejects', async () => {+ test('reports a rejected invoke', async () => {window.okUninstall = bridgeWith(() => Promise.reject(new Error('ipc channel closed')));- await expect(requestUninstallScreen()).resolves.toBeNull();+ await expect(requestUninstallScreen()).resolves.toEqual({+ kind: 'unavailable',+ reason: 'request-failed',+ });});});@@ -64,3 +73,17 @@ describe('sendUninstallIntent', () => {await Promise.resolve();});});++test('bounds a ready request that never settles', async () => {+ vi.useFakeTimers();+ try {+ window.okUninstall = bridgeWith(() => new Promise(() => {}));+ const result = requestUninstallScreen();+ await vi.advanceTimersByTimeAsync(5000);+ expect(await result).toEqual({ kind: 'unavailable', reason: 'timeout' });+ expect(vi.getTimerCount()).toBe(0);+ } finally {+ window.okUninstall = undefined;+ vi.useRealTimers();+ }+});diff --git a/packages/app/src/uninstall/bridge.ts b/packages/app/src/uninstall/bridge.tsindex ffb616873..0a694b295 100644--- a/packages/app/src/uninstall/bridge.ts+++ b/packages/app/src/uninstall/bridge.ts@@ -1,7 +1,7 @@import type {OkUninstallBridge,+ UninstallDispatchResult,UninstallIntent,- UninstallScreenSpec,} from '@inkeep/open-knowledge-core';declare global {@@ -10,14 +10,32 @@ declare global {}}-export async function requestUninstallScreen(): Promise<UninstallScreenSpec | null> {+export type UninstallScreenResponse =+ | Extract<UninstallDispatchResult, { kind: 'screen' | 'refused' }>+ | {+ kind: 'unavailable';+ reason: 'missing-bridge' | 'request-failed' | 'timeout' | 'unexpected-response';+ };++export async function requestUninstallScreen(): Promise<UninstallScreenResponse> {const bridge = typeof window === 'undefined' ? undefined : window.okUninstall;- if (bridge === undefined) return null;+ if (bridge === undefined) return { kind: 'unavailable', reason: 'missing-bridge' };+ let timer: ReturnType<typeof setTimeout> | undefined;try {- const result = await bridge.ready();- return result.kind === 'screen' ? result.screen : null;- } catch {- return null;+ const result = await Promise.race([+ bridge.ready(),+ new Promise<UninstallScreenResponse>((resolve) => {+ timer = setTimeout(() => resolve({ kind: 'unavailable', reason: 'timeout' }), 5000);+ }),+ ]);+ if (result.kind === 'accepted') return { kind: 'unavailable', reason: 'unexpected-response' };+ if (result.kind !== 'screen') console.warn('Uninstall screen unavailable', result.reason);+ return result;+ } catch (error) {+ console.warn('Uninstall screen request failed', error);+ return { kind: 'unavailable', reason: 'request-failed' };+ } finally {+ clearTimeout(timer);}}diff --git a/packages/app/src/uninstall/locale.test.ts b/packages/app/src/uninstall/locale.test.tsnew file mode 100644index 000000000..92397bedc--- /dev/null+++ b/packages/app/src/uninstall/locale.test.ts@@ -0,0 +1,40 @@+import { afterEach, expect, test, vi } from 'vitest';+import { activateUninstallLocale } from './locale';++const mocks = vi.hoisted(() => ({+ activate: vi.fn(),+ apply: vi.fn(),+}));+vi.mock('@/lib/activate-locale', () => ({ dynamicActivate: mocks.activate }));+vi.mock('@/lib/use-apply-config-language', async () => ({+ ...(await vi.importActual<typeof import('@/lib/use-apply-config-language')>(+ '@/lib/use-apply-config-language',+ )),+ applyLanguageToDom: mocks.apply,+}));+afterEach(() => {+ vi.unstubAllGlobals();+ vi.restoreAllMocks();+ vi.resetAllMocks();+});++test('catalog load failure resolves so the English fallback can mount', async () => {+ vi.stubGlobal('window', { location: { search: '?locale=es' } });+ const failure = new Error('catalog unavailable');+ mocks.activate.mockRejectedValue(failure);+ const warn = vi.spyOn(console, 'warn').mockImplementation(() => {});+ await expect(activateUninstallLocale()).resolves.toBeUndefined();+ expect(mocks.activate).toHaveBeenCalledWith('es');+ expect(mocks.apply).not.toHaveBeenCalled();+ expect(warn).toHaveBeenCalledWith(+ 'Could not load the uninstall language; using English.',+ failure,+ );+});++test('activates the handed-off language before applying its direction', async () => {+ vi.stubGlobal('window', { location: { search: '?locale=es' } });+ await activateUninstallLocale();+ expect(mocks.activate).toHaveBeenCalledWith('es');+ expect(mocks.apply).toHaveBeenCalledWith({ preference: 'es', locale: 'es' });+});diff --git a/packages/app/src/uninstall/locale.ts b/packages/app/src/uninstall/locale.tsnew file mode 100644index 000000000..005b89c06--- /dev/null+++ b/packages/app/src/uninstall/locale.ts@@ -0,0 +1,31 @@+import {+ AUTO_DETECTABLE_LOCALES,+ readBrowserLanguages,+ resolveLocale,+ SUPPORTED_LOCALES,+} from '@inkeep/open-knowledge-core';+import { dynamicActivate } from '@/lib/activate-locale';+import {+ applyLanguageToDom,+ narrowLanguagePreference,+ readCachedLanguagePreference,+} from '@/lib/use-apply-config-language';++export async function activateUninstallLocale(): Promise<void> {+ try {+ const preference =+ narrowLanguagePreference(new URLSearchParams(window.location.search).get('locale')) ??+ readCachedLanguagePreference();+ const { locale } = resolveLocale({+ override: undefined,+ storedPreference: preference,+ preferenceList: readBrowserLanguages(),+ supportedLocales: SUPPORTED_LOCALES,+ autoDetectableLocales: AUTO_DETECTABLE_LOCALES,+ });+ await dynamicActivate(locale);+ applyLanguageToDom({ preference: preference ?? 'system', locale });+ } catch (error) {+ console.warn('Could not load the uninstall language; using English.', error);+ }+}diff --git a/packages/app/src/uninstall/main.tsx b/packages/app/src/uninstall/main.tsxindex 2d89dd256..06176a6b6 100644--- a/packages/app/src/uninstall/main.tsx+++ b/packages/app/src/uninstall/main.tsx@@ -2,6 +2,7 @@ import { I18nProvider } from '@lingui/react';import { StrictMode } from 'react';import { createRoot } from 'react-dom/client';import { i18n } from '@/lib/i18n';+import { activateUninstallLocale } from './locale';import { UninstallApp } from './UninstallApp';import '@fontsource-variable/inter';import '@fontsource-variable/jetbrains-mono';@@ -10,10 +11,12 @@ import '../globals.css';const root = document.getElementById('root');if (!root) throw new Error('Root element not found');-createRoot(root).render(- <StrictMode>- <I18nProvider i18n={i18n}>- <UninstallApp />- </I18nProvider>- </StrictMode>,+void activateUninstallLocale().then(() =>+ createRoot(root).render(+ <StrictMode>+ <I18nProvider i18n={i18n}>+ <UninstallApp />+ </I18nProvider>+ </StrictMode>,+ ),);diff --git a/packages/app/tests/integration/bug3-source-mode-writeback.test.ts b/packages/app/tests/integration/bug3-source-mode-writeback.test.tsindex 8a60e5826..a28cc2b18 100644--- a/packages/app/tests/integration/bug3-source-mode-writeback.test.ts+++ b/packages/app/tests/integration/bug3-source-mode-writeback.test.ts@@ -1,3 +1,4 @@+import { readFileSync } from 'node:fs';import { join } from 'node:path';import { setTimeout as wait } from 'node:timers/promises';diff --git a/packages/app/tests/integration/indented-jsx-byte-sacred.test.ts b/packages/app/tests/integration/indented-jsx-byte-sacred.test.tsindex 6fcdc23f2..4fc2c11f9 100644--- a/packages/app/tests/integration/indented-jsx-byte-sacred.test.ts+++ b/packages/app/tests/integration/indented-jsx-byte-sacred.test.ts@@ -1,3 +1,4 @@+import { setTimeout as wait } from 'node:timers/promises';import { normalizeBridge } from '@inkeep/open-knowledge-core';import { updateYFragment } from '@tiptap/y-tiptap';diff --git a/packages/app/tests/integration/interior-edit-freshness.test.ts b/packages/app/tests/integration/interior-edit-freshness.test.tsindex 40b5cdfd6..9f2f6feb6 100644--- a/packages/app/tests/integration/interior-edit-freshness.test.ts+++ b/packages/app/tests/integration/interior-edit-freshness.test.ts@@ -1,3 +1,4 @@+import { setTimeout as wait } from 'node:timers/promises';import { updateYFragment, yXmlFragmentToProseMirrorRootNode } from '@tiptap/y-tiptap';import { afterAll, beforeAll, describe, expect, test } from 'vitest';diff --git a/packages/app/tests/integration/keystroke-cadence-danger-space.test.ts b/packages/app/tests/integration/keystroke-cadence-danger-space.test.tsindex 93666af70..2a085742b 100644--- a/packages/app/tests/integration/keystroke-cadence-danger-space.test.ts+++ b/packages/app/tests/integration/keystroke-cadence-danger-space.test.ts@@ -1,3 +1,4 @@+import { setTimeout as wait } from 'node:timers/promises';import { updateYFragment, yXmlFragmentToProseMirrorRootNode } from '@tiptap/y-tiptap';import { afterAll, beforeAll, describe, expect, test } from 'vitest';diff --git a/packages/app/tests/integration/producer-guard-wiring.test.ts b/packages/app/tests/integration/producer-guard-wiring.test.tsindex 867598d34..878d5196b 100644--- a/packages/app/tests/integration/producer-guard-wiring.test.ts+++ b/packages/app/tests/integration/producer-guard-wiring.test.ts@@ -1,3 +1,4 @@+import { setTimeout as wait } from 'node:timers/promises';import { updateYFragment, yXmlFragmentToProseMirrorRootNode } from '@tiptap/y-tiptap';import { afterAll, beforeAll, describe, expect, test } from 'vitest';diff --git a/packages/app/tests/integration/qa-039-reconciliation-counters-http.test.ts b/packages/app/tests/integration/qa-039-reconciliation-counters-http.test.tsindex 0970ac12f..4ada3cf26 100644--- a/packages/app/tests/integration/qa-039-reconciliation-counters-http.test.ts+++ b/packages/app/tests/integration/qa-039-reconciliation-counters-http.test.ts@@ -1,3 +1,4 @@+import { randomUUID } from 'node:crypto';import { afterEach, describe, expect, test } from 'vitest';import { agentWriteMd, createTestServer, type TestServer } from './test-harness';diff --git a/packages/app/tests/integration/qa-045-restore-after-gc.test.ts b/packages/app/tests/integration/qa-045-restore-after-gc.test.tsindex b632185e1..cbe2b705f 100644--- a/packages/app/tests/integration/qa-045-restore-after-gc.test.ts+++ b/packages/app/tests/integration/qa-045-restore-after-gc.test.ts@@ -1,3 +1,4 @@+import { execFileSync } from 'node:child_process';import { randomUUID } from 'node:crypto';import { join } from 'node:path';diff --git a/packages/app/tests/integration/qa-050-rollback-undo-shipped-path.test.ts b/packages/app/tests/integration/qa-050-rollback-undo-shipped-path.test.tsindex c530ce4ba..89bc9b4d9 100644--- a/packages/app/tests/integration/qa-050-rollback-undo-shipped-path.test.ts+++ b/packages/app/tests/integration/qa-050-rollback-undo-shipped-path.test.ts@@ -1,3 +1,4 @@+import { randomUUID } from 'node:crypto';import { afterAll, afterEach, beforeAll, describe, expect, test } from 'vitest';import type * as Y from 'yjs';diff --git a/packages/app/tests/integration/undo-after-rollback.test.ts b/packages/app/tests/integration/undo-after-rollback.test.tsindex d3767adc9..a78aeb0e4 100644--- a/packages/app/tests/integration/undo-after-rollback.test.ts+++ b/packages/app/tests/integration/undo-after-rollback.test.ts@@ -1,3 +1,4 @@+import { ROLLBACK_ORIGIN } from '@inkeep/open-knowledge-server';import { afterAll, beforeAll, describe, expect, test } from 'vitest';import * as Y from 'yjs';diff --git a/packages/app/tests/integration/undo-recycle-reset.test.ts b/packages/app/tests/integration/undo-recycle-reset.test.tsindex b076f955c..e7cc69c3f 100644--- a/packages/app/tests/integration/undo-recycle-reset.test.ts+++ b/packages/app/tests/integration/undo-recycle-reset.test.ts@@ -1,3 +1,4 @@+import { writeFileSync } from 'node:fs';import { join } from 'node:path';import { setTimeout as wait } from 'node:timers/promises';diff --git a/packages/app/tests/integration/undo-rederive-survival.test.ts b/packages/app/tests/integration/undo-rederive-survival.test.tsindex 7935e35f8..9ddcd0730 100644--- a/packages/app/tests/integration/undo-rederive-survival.test.ts+++ b/packages/app/tests/integration/undo-rederive-survival.test.ts@@ -1,3 +1,4 @@+import { prependFrontmatter } from '@inkeep/open-knowledge-core';import { Plugin, PluginKey } from '@tiptap/pm/state';import { updateYFragment, yXmlFragmentToProseMirrorRootNode } from '@tiptap/y-tiptap';diff --git a/packages/cli/src/commands/clean.test.ts b/packages/cli/src/commands/clean.test.tsindex c428c5d15..2ca1a9584 100644--- a/packages/cli/src/commands/clean.test.ts+++ b/packages/cli/src/commands/clean.test.ts@@ -80,6 +80,41 @@ describe('buildCleanPlan', () => {});describe('runClean', () => {+ test('reports foreign ownership as a refusal instead of claiming no stale locks', () => {+ const logs: string[] = [];+ const errors: string[] = [];+ const unlinked: string[] = [];+ const outcome = runClean({+ lockDir: '/tmp/x',+ inspect: foreign,+ unlink: (path) => unlinked.push(path),+ log: (message) => logs.push(message),+ error: (message) => errors.push(message),+ });+ expect(outcome.failed).toHaveLength(1);+ expect(unlinked).toEqual([]);+ expect(logs).toEqual([]);+ expect(errors.join(' ')).toContain('another machine');+ });++ test('reports unreadable locks without deleting them or claiming no stale locks', () => {+ const logs: string[] = [];+ const errors: string[] = [];+ const unlinked: string[] = [];+ const outcome = runClean({+ lockDir: '/tmp/x',+ inspect: () => ({ status: 'read-error', lockPath: '/tmp/server.lock', error: 'EACCES' }),+ unlink: (path) => unlinked.push(path),+ log: (message) => logs.push(message),+ error: (message) => errors.push(message),+ });+ expect(unlinked).toEqual([]);+ expect(logs).toEqual([]);+ expect(outcome.failed).toHaveLength(1);+ expect(errors.join(' ')).toContain('Restore file and parent-directory access');+ expect(errors.join(' ')).toContain('EACCES');+ });+test('no stale locks → log, no unlinks', () => {const logs: string[] = [];const unlinked: string[] = [];@@ -129,3 +164,16 @@ describe('runClean', () => {expect(errors.at(0)).toContain('server (/tmp/server.lock)');});});++test('never prunes a malformed foreign-owned lock', () => {+ const unlinked: string[] = [];+ const outcome = runClean({+ lockDir: '/tmp/x',+ inspect: () => ({ status: 'corrupt', lockPath: '/tmp/foreign.lock', foreignHost: true }),+ unlink: (path) => unlinked.push(path),+ log: () => {},+ error: () => {},+ });+ expect(unlinked).toEqual([]);+ expect(outcome.failed[0]?.error).toContain('owning machine');+});diff --git a/packages/cli/src/commands/clean.ts b/packages/cli/src/commands/clean.tsindex 50f8bc95c..b726173bb 100644--- a/packages/cli/src/commands/clean.ts+++ b/packages/cli/src/commands/clean.ts@@ -1,7 +1,7 @@import { unlinkSync } from 'node:fs';import { type Config, resolveLockDir } from '@inkeep/open-knowledge-server';import { Command } from 'commander';-import { inspectLock, type LockState } from './lock-state.ts';+import { describeLockOwnershipRefusal, inspectLock, type LockState } from './lock-state.ts';interface PruneTarget {name: 'server';@@ -11,14 +11,46 @@ interface PruneTarget {interface CleanPlan {prune: PruneTarget[];+ refusal?: { lockPath: string; error: string };}export function buildCleanPlan(server: LockState): CleanPlan {- const prune: PruneTarget[] = [];- if (server.status === 'dead-pid' || server.status === 'corrupt') {- prune.push({ name: 'server', lockPath: server.lockPath, reason: server.status });+ switch (server.status) {+ case 'read-error':+ return {+ prune: [],+ refusal: {+ lockPath: server.lockPath,+ error: `Cannot read the server lock: ${server.error}. Restore file and parent-directory access, then retry.`,+ },+ };+ case 'corrupt':+ if (server.foreignHost) {+ return {+ prune: [],+ refusal: {+ lockPath: server.lockPath,+ error: describeLockOwnershipRefusal(server),+ },+ };+ }+ return { prune: [{ name: 'server', lockPath: server.lockPath, reason: server.status }] };+ case 'dead-pid':+ return { prune: [{ name: 'server', lockPath: server.lockPath, reason: server.status }] };+ case 'unverified-owner':+ case 'foreign-host':+ return {+ prune: [],+ refusal: { lockPath: server.lockPath, error: describeLockOwnershipRefusal(server) },+ };+ case 'alive':+ case 'missing':+ return { prune: [] };+ default: {+ const exhaustive: never = server;+ return exhaustive;+ }}- return { prune };}interface RunCleanDeps {@@ -31,7 +63,7 @@ interface RunCleanDeps {interface CleanOutcome {pruned: PruneTarget[];- failed: Array<{ target: PruneTarget; error: string }>;+ failed: Array<{ target: Pick<PruneTarget, 'name' | 'lockPath'>; error: string }>;}export function runClean(deps: RunCleanDeps): CleanOutcome {@@ -42,13 +74,22 @@ export function runClean(deps: RunCleanDeps): CleanOutcome {const plan = buildCleanPlan(inspect());+ if (plan.refusal) {+ error(`${plan.refusal.lockPath}: ${plan.refusal.error}`);+ return {+ pruned: [],+ failed: [+ { target: { name: 'server', lockPath: plan.refusal.lockPath }, error: plan.refusal.error },+ ],+ };+ }if (plan.prune.length === 0) {log('No stale locks.');return { pruned: [], failed: [] };}const pruned: PruneTarget[] = [];- const failed: Array<{ target: PruneTarget; error: string }> = [];+ const failed: Array<{ target: Pick<PruneTarget, 'name' | 'lockPath'>; error: string }> = [];for (const target of plan.prune) {try {unlink(target.lockPath);diff --git a/packages/cli/src/commands/diagnose-health-checks/server-lock.test.ts b/packages/cli/src/commands/diagnose-health-checks/server-lock.test.tsindex a02db4094..7521648e2 100644--- a/packages/cli/src/commands/diagnose-health-checks/server-lock.test.ts+++ b/packages/cli/src/commands/diagnose-health-checks/server-lock.test.ts@@ -86,7 +86,7 @@ describe('server-lock check', () => {const result = await def.run({ cwd });expect(result.status).toBe('warn');expect(result.summary).toContain('other-host');- expect(result.remediation).toContain('ok clean');+ expect(result.remediation).toContain('owning machine');});test('warns on dead-pid', async () => {@@ -118,3 +118,13 @@ describe('server-lock check', () => {expect(result.remediation).toContain('Delete');});});++test('reports a read failure with access guidance rather than suggesting deletion', async () => {+ const cwd = makeProjectWithLockDir();+ const result = await makeServerLockCheck({+ inspect: () => ({ status: 'read-error', lockPath: '/x/server.lock', error: 'EACCES' }),+ }).run({ cwd });+ expect(result.status).toBe('fail');+ expect(result.remediation).toContain('Restore file and parent-directory access');+ expect(result.detail).toContain('EACCES');+});diff --git a/packages/cli/src/commands/diagnose-health-checks/server-lock.ts b/packages/cli/src/commands/diagnose-health-checks/server-lock.tsindex e36a0dcd4..eb504720c 100644--- a/packages/cli/src/commands/diagnose-health-checks/server-lock.ts+++ b/packages/cli/src/commands/diagnose-health-checks/server-lock.ts@@ -1,7 +1,6 @@import { existsSync } from 'node:fs';-import { resolve } from 'node:path';import { resolveLockDir } from '@inkeep/open-knowledge-server';-import { inspectLock, type LockState } from '../lock-state.ts';+import { describeLockOwnershipRefusal, inspectLock, type LockState } from '../lock-state.ts';import type { CheckContext, CheckDefinition, CheckResult } from './types.ts';interface ServerLockCheckDeps {@@ -37,12 +36,21 @@ export function makeServerLockCheck(deps: ServerLockCheckDeps = {}): CheckDefiniremediation: 'Stop the other OpenKnowledge process or run `ok stop`.',detail: `lockPath: ${state.lockPath}; port: ${state.lock.port}; started: ${state.lock.startedAt}`,};+ case 'unverified-owner':+ return {+ name: 'server-lock',+ status: 'warn',+ summary: `unverified owner; recorded pid ${state.pid} is alive locally`,+ remediation: describeLockOwnershipRefusal(state),+ detail: `lockPath: ${state.lockPath}; pid: ${state.pid}`,+ };case 'foreign-host':return {name: 'server-lock',status: 'warn',summary: `lock claimed by ${state.lock.hostname} (foreign host)`,- remediation: `Run \`ok clean\` to prune the stale lock at ${resolve(lockDir, 'server.lock')}.`,+ remediation:+ 'Stop the server on its owning machine and confirm the directory is no longer in use before removing the lock.',detail: `lockPath: ${state.lockPath}; pid: ${state.lock.pid}`,};case 'dead-pid':@@ -53,6 +61,14 @@ export function makeServerLockCheck(deps: ServerLockCheckDeps = {}): CheckDefiniremediation: 'Run `ok clean` to prune.',detail: `lockPath: ${state.lockPath}`,};+ case 'read-error':+ return {+ name: 'server-lock',+ status: 'fail',+ summary: 'server.lock could not be read',+ remediation: 'Restore file and parent-directory access, then retry.',+ detail: `${state.lockPath}: ${state.error}`,+ };case 'corrupt':return {name: 'server-lock',diff --git a/packages/cli/src/commands/diagnose.ts b/packages/cli/src/commands/diagnose.tsindex 56a3cc421..27501b588 100644--- a/packages/cli/src/commands/diagnose.ts+++ b/packages/cli/src/commands/diagnose.ts@@ -311,7 +311,13 @@ export async function runDiagnose(let lockInfo: unknown = null;for (const lockDir of lockDirs) {const s = inspect(lockDir);- if (s.status !== 'missing' && s.status !== 'corrupt' && s.lock.pid === pid) {+ if (+ s.status !== 'missing' &&+ s.status !== 'corrupt' &&+ s.status !== 'read-error' &&+ s.status !== 'unverified-owner' &&+ s.lock.pid === pid+ ) {contentDir = s.lock.worktreeRoot;lockInfo = { lockDir, state: s.status, lockPath: s.lockPath, lock: s.lock };break;diff --git a/packages/cli/src/commands/lock-state.test.ts b/packages/cli/src/commands/lock-state.test.tsindex 4006ff59f..7f880ff8f 100644--- a/packages/cli/src/commands/lock-state.test.ts+++ b/packages/cli/src/commands/lock-state.test.ts@@ -1,16 +1,60 @@-import { mkdirSync, mkdtempSync, writeFileSync } from 'node:fs';+import { chmodSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs';import { hostname, tmpdir } from 'node:os';import { join } from 'node:path';-import { describe, expect, test } from 'vitest';+import { afterEach, describe, expect, test } from 'vitest';import { inspectLock } from './lock-state.ts';+const fixtures: string[] = [];+afterEach(() => {+ for (const dir of fixtures.splice(0)) rmSync(dir, { recursive: true, force: true });+});+function freshLockDir(): string {const dir = mkdtempSync(join(tmpdir(), 'ok-lock-state-'));+ fixtures.push(dir);mkdirSync(dir, { recursive: true });return dir;}describe('inspectLock', () => {+ test.each([undefined, 0, '123'])('retains foreign ownership when PID %j is unusable', (pid) => {+ const dir = freshLockDir();+ writeFileSync(join(dir, 'server.lock'), JSON.stringify({ pid, machineId: 'foreign' }));+ expect(+ inspectLock(dir, 'server', {+ machineId: 'local',+ isAlive: () => {+ throw new Error('no probe');+ },+ }),+ ).toMatchObject({ status: 'corrupt', foreignHost: true });+ });++ test('a PID without ownership metadata cannot be classified as a local live server', () => {+ const dir = freshLockDir();+ writeFileSync(join(dir, 'server.lock'), JSON.stringify({ pid: 4242 }));+ expect(inspectLock(dir, 'server', { isAlive: () => true })).toEqual({+ status: 'unverified-owner',+ lockPath: join(dir, 'server.lock'),+ pid: 4242,+ });+ });++ test('a live PID with a matching hostname retains its local ownership', () => {+ const dir = freshLockDir();+ writeFileSync(join(dir, 'server.lock'), JSON.stringify({ pid: 4242, hostname: hostname() }));+ expect(inspectLock(dir, 'server', { isAlive: () => true })).toMatchObject({+ status: 'alive',+ lock: { pid: 4242, hostname: hostname() },+ });+ });++ test('recovers a dead PID-only lock without inventing foreign ownership', () => {+ const dir = freshLockDir();+ writeFileSync(join(dir, 'server.lock'), JSON.stringify({ pid: 4242 }));+ expect(inspectLock(dir, 'server', { isAlive: () => false }).status).toBe('dead-pid');+ });+test('missing lock file', () => {const dir = freshLockDir();const result = inspectLock(dir, 'server');@@ -53,7 +97,7 @@ describe('inspectLock', () => {}});- test('foreign host with dead PID classifies dead-pid (hostname drift cleanup)', () => {+ test('foreign host remains foreign even when its PID is absent locally', () => {const dir = freshLockDir();writeFileSync(join(dir, 'server.lock'),@@ -70,8 +114,8 @@ describe('inspectLock', () => {host: 'current-hostname',isAlive: () => false,});- expect(result.status).toBe('dead-pid');- if (result.status === 'dead-pid') {+ expect(result.status).toBe('foreign-host');+ if (result.status === 'foreign-host') {expect(result.lock.pid).toBe(999999);expect(result.lock.hostname).toBe('previous-hostname');}@@ -181,3 +225,21 @@ describe('inspectLock', () => {expect(second.status).toBe('dead-pid');});});++test.skipIf(process.platform === 'win32' || process.getuid?.() === 0)(+ 'distinguishes unreadable lock contents from malformed JSON',+ () => {+ const dir = freshLockDir();+ const path = join(dir, 'server.lock');+ writeFileSync(path, 'not json');+ chmodSync(path, 0o000);+ try {+ expect(inspectLock(dir, 'server')).toMatchObject({+ status: 'read-error',+ error: expect.stringContaining('EACCES'),+ });+ } finally {+ chmodSync(path, 0o600);+ }+ },+);diff --git a/packages/cli/src/commands/lock-state.ts b/packages/cli/src/commands/lock-state.tsindex 4f9884b3f..3dac3c692 100644--- a/packages/cli/src/commands/lock-state.ts+++ b/packages/cli/src/commands/lock-state.ts@@ -1,4 +1,4 @@-import { existsSync, readFileSync } from 'node:fs';+import { readFileSync } from 'node:fs';import { hostname } from 'node:os';import {getMachineId,@@ -11,8 +11,14 @@ import {export type LockState =| { status: 'missing'; lockPath: string }- | { status: 'corrupt'; lockPath: string }- | { status: 'foreign-host'; lockPath: string; lock: ProcessLockMetadata }+ | { status: 'corrupt'; lockPath: string; foreignHost?: boolean }+ | { status: 'read-error'; lockPath: string; error: string }+ | {+ status: 'foreign-host';+ lockPath: string;+ lock: ProcessLockMetadata;+ }+ | { status: 'unverified-owner'; lockPath: string; pid: number }| { status: 'dead-pid'; lockPath: string; lock: ProcessLockMetadata }| { status: 'alive'; lockPath: string; lock: ProcessLockMetadata };@@ -28,31 +34,63 @@ export function inspectLock(opts: InspectLockOptions = {},): LockState {const lockPath = lockFilePath(lockDir, lockName);- if (!existsSync(lockPath)) return { status: 'missing', lockPath };-+ let raw: string;+ try {+ raw = readFileSync(lockPath, 'utf-8');+ } catch (error) {+ if (error && typeof error === 'object' && 'code' in error && error.code === 'ENOENT') {+ return { status: 'missing', lockPath };+ }+ return {+ status: 'read-error',+ lockPath,+ error: error instanceof Error ? error.message : String(error),+ };+ }let parsed: unknown;try {- parsed = JSON.parse(readFileSync(lockPath, 'utf-8'));+ parsed = JSON.parse(raw);} catch {return { status: 'corrupt', lockPath };}+ const metadata = parsed && typeof parsed === 'object' ? parsed : {};+ const foreignHost =+ 'machineId' in metadata && typeof metadata.machineId === 'string'+ ? metadata.machineId !== (opts.machineId ?? getMachineId())+ : 'hostname' in metadata &&+ typeof metadata.hostname === 'string' &&+ metadata.hostname !== (opts.host ?? hostname());if (!parsed || typeof parsed !== 'object' || !isValidLockPid((parsed as { pid?: unknown }).pid)) {- return { status: 'corrupt', lockPath };+ return { status: 'corrupt', lockPath, ...(foreignHost ? { foreignHost: true } : {}) };}- const lock = parsed as ProcessLockMetadata;-- const aliveProbe = opts.isAlive ?? isProcessAlive;- if (!aliveProbe(lock.pid)) {- return { status: 'dead-pid', lockPath, lock };+ const pid = (parsed as { pid: number }).pid;+ const hasOwner =+ ('machineId' in metadata && typeof metadata.machineId === 'string') ||+ ('hostname' in metadata && typeof metadata.hostname === 'string');+ if (foreignHost) {+ return { status: 'foreign-host', lockPath, lock: parsed as ProcessLockMetadata };}- if (typeof lock.machineId === 'string') {- return lock.machineId === (opts.machineId ?? getMachineId())- ? { status: 'alive', lockPath, lock }- : { status: 'foreign-host', lockPath, lock };+ if (!(opts.isAlive ?? isProcessAlive)(pid)) {+ return { status: 'dead-pid', lockPath, lock: parsed as ProcessLockMetadata };}- const localHost = opts.host ?? hostname();- if (lock.hostname !== localHost) {- return { status: 'foreign-host', lockPath, lock };+ if (!hasOwner) return { status: 'unverified-owner', lockPath, pid };+ return { status: 'alive', lockPath, lock: parsed as ProcessLockMetadata };+}++export function describeLockOwnershipRefusal(+ state: Extract<LockState, { status: 'foreign-host' | 'corrupt' | 'unverified-owner' }>,+): string {+ if (state.status === 'unverified-owner') {+ return (+ `Cannot verify shutdown: the server lock at ${state.lockPath} does not record its owning machine, ` ++ `and its recorded process ${state.pid} is still running on this machine. ` ++ `Check whether process ${state.pid} is an OpenKnowledge server. If it is, stop it and retry. ` ++ 'Do not remove the lock file while that process is running.'+ );}- return { status: 'alive', lockPath, lock };+ return (+ `Cannot verify shutdown: the server lock at ${state.lockPath} belongs to another machine. ` ++ 'Stop OpenKnowledge on the owning machine. Confirm that no OpenKnowledge server is using this directory on the owning machine or any other machine sharing it. ' ++ `Only then remove the stale lock file at ${state.lockPath} and retry cleanup.`+ );}diff --git a/packages/cli/src/commands/ps.ts b/packages/cli/src/commands/ps.tsindex 20ec5a9d8..7ace34a88 100644--- a/packages/cli/src/commands/ps.ts+++ b/packages/cli/src/commands/ps.ts@@ -1,4 +1,10 @@-import { formatRelativeAge, RELATIVE_TIME_UNKNOWN } from '@inkeep/open-knowledge-core';+import { basename, dirname } from 'node:path';+import {+ formatRelativeAge,+ LOCAL_DIR,+ OK_DIR,+ RELATIVE_TIME_UNKNOWN,+} from '@inkeep/open-knowledge-core';import { lockAdvertisesUi } from '@inkeep/open-knowledge-server';import { Command } from 'commander';import pc from 'picocolors';@@ -12,12 +18,12 @@ import {import { inspectLock, type LockState } from './lock-state.ts';interface PsEntry {- directory: string;+ directory: string | null;server: {- port: number;- status: LockState['status'];+ port: number | null;+ status: Exclude<LockState['status'], 'missing' | 'corrupt' | 'read-error'>;pid: number;- startedAt: string;+ startedAt: string | null;usage: ProcessUsage | null;};ui: {@@ -27,7 +33,7 @@ interface PsEntry {startedAt: string;usage: ProcessUsage | null;} | null;- hostname: string;+ hostname: string | null;lockPath: string;binary: string | null;command: string | null;@@ -42,21 +48,51 @@ export function isDesktopCommand(command: string | null): boolean {);}-export function startedCell(isoString: string, now = Date.now()): string {+export function startedCell(isoString: string | null, now = Date.now()): string {+ if (isoString === null) return '—';const age = formatRelativeAge(isoString, now);return age === RELATIVE_TIME_UNKNOWN ? '—' : age;}+function projectDirectoryForLockDir(lockDir: string): string | null {+ const parent = dirname(lockDir);+ if (basename(lockDir) === LOCAL_DIR && basename(parent) === OK_DIR) return dirname(parent);+ if (basename(lockDir) === OK_DIR) return parent;+ return null;+}+function buildEntry(- _lockDir: string,+ lockDir: string,serverState: LockState,command: string | null,serverUsage: ProcessUsage | null,): PsEntry | null {- if (serverState.status === 'missing' || serverState.status === 'corrupt') {+ if (+ serverState.status === 'missing' ||+ serverState.status === 'corrupt' ||+ serverState.status === 'read-error'+ ) {return null;}+ if (serverState.status === 'unverified-owner') {+ return {+ directory: projectDirectoryForLockDir(lockDir),+ server: {+ port: null,+ status: serverState.status,+ pid: serverState.pid,+ startedAt: null,+ usage: null,+ },+ ui: null,+ hostname: null,+ lockPath: serverState.lockPath,+ binary: null,+ command: null,+ isDesktop: false,+ };+ }const serverLock = serverState.lock;const ui: PsEntry['ui'] =@@ -88,18 +124,32 @@ function buildEntry(};}-type DisplayStatus = 'running' | 'desktop' | 'foreign' | 'stale';+type DisplayStatus = 'running' | 'desktop' | 'foreign' | 'stale' | 'unverified';function displayStatus(entry: PsEntry): DisplayStatus {const serverStatus = entry.server.status;- if (serverStatus === 'alive' || serverStatus === 'foreign-host') {- if (entry.isDesktop) return 'desktop';- return serverStatus === 'alive' ? 'running' : 'foreign';+ switch (serverStatus) {+ case 'unverified-owner':+ return 'unverified';+ case 'alive':+ return entry.isDesktop ? 'desktop' : 'running';+ case 'foreign-host':+ return entry.isDesktop ? 'desktop' : 'foreign';+ case 'dead-pid':+ return 'stale';+ default: {+ const exhaustive: never = serverStatus;+ return exhaustive;+ }}- return 'stale';}-const DEFAULT_VISIBLE: ReadonlySet<DisplayStatus> = new Set(['running', 'desktop', 'foreign']);+const DEFAULT_VISIBLE: ReadonlySet<DisplayStatus> = new Set([+ 'running',+ 'desktop',+ 'foreign',+ 'unverified',+]);function colorStatus(label: DisplayStatus): string {switch (label) {@@ -109,6 +159,7 @@ function colorStatus(label: DisplayStatus): string {return pc.blue(label);case 'foreign':return pc.cyan(label);+ case 'unverified':case 'stale':return pc.yellow(label);}@@ -124,7 +175,12 @@ function formatCombinedUsage(entry: PsEntry): string {}function formatPorts(entry: PsEntry): string {- const serverPort = entry.server.port === 0 ? '(starting)' : String(entry.server.port);+ const serverPort =+ entry.server.port === null+ ? '—'+ : entry.server.port === 0+ ? '(starting)'+ : String(entry.server.port);const uiPort = entry.ui == null ? '—' : String(entry.ui.port);return `${serverPort} / ${uiPort}`;}@@ -145,7 +201,7 @@ export function renderTable(entries: PsEntry[]): string {];const rows = entries.map((e) => {return [- e.directory,+ e.directory ?? '—',formatPorts(e),formatCombinedUsage(e),displayStatus(e),@@ -211,11 +267,17 @@ export async function runPs(deps: RunPsDeps = {}): Promise<void> {for (const lockDir of lockDirs) {const serverState = inspect(lockDir);const command =- serverState.status === 'missing' || serverState.status === 'corrupt'+ serverState.status === 'missing' ||+ serverState.status === 'corrupt' ||+ serverState.status === 'read-error' ||+ serverState.status === 'unverified-owner'? null: resolveCommand(serverState.lock.pid);const serverUsage =- serverState.status === 'missing' || serverState.status === 'corrupt'+ serverState.status === 'missing' ||+ serverState.status === 'corrupt' ||+ serverState.status === 'read-error' ||+ serverState.status === 'unverified-owner'? null: resolveUsage(serverState.lock.pid);const entry = buildEntry(lockDir, serverState, command, serverUsage);@@ -241,7 +303,7 @@ export function psCommand(): Command {return new Command('ps').description('List all running open-knowledge servers').argument('[modifier]', '"all" to include stale (dead-pid) entries')- .option('--all', 'Include stale (dead-pid) entries (foreign-host shows by default)')+ .option('--all', 'Include stale entries (foreign and unverified entries already show)').option('--json', 'Emit structured JSON (always includes all statuses)').action(async (modifier: string | undefined, opts: { all?: boolean; json?: boolean }) => {const all = opts.all === true || modifier === 'all';diff --git a/packages/cli/src/commands/removal-plan.ts b/packages/cli/src/commands/removal-plan.tsindex 67160bc00..e62a0dbb5 100644--- a/packages/cli/src/commands/removal-plan.ts+++ b/packages/cli/src/commands/removal-plan.ts@@ -3,7 +3,7 @@ import { basename, join, relative, resolve, sep } from 'node:path';import { PROJECT_SKILL_PROJECTION_PATHS } from '@inkeep/open-knowledge-core';import { atomicWriteFileSync } from '@inkeep/open-knowledge-core/server';import { resolveShadowDir } from '@inkeep/open-knowledge-core/shadow-repo-layout';-import { resolveLockDir } from '@inkeep/open-knowledge-server';+import { resolveLockDir, scanLockProcesses } from '@inkeep/open-knowledge-server';import { clearAllEmbeddingsKeys } from '../auth/embeddings-key-store.ts';import { clearTokenFromAllBackends } from '../auth/token-store.ts';import {@@ -37,7 +37,13 @@ import { stopServerForRemoval } from './stop-for-removal.ts';export type RemovalGroup = string;export type RemovalOp = (- | { kind: 'stop-server'; group: RemovalGroup; label: string; lockDir: string }+ | {+ kind: 'stop-server';+ group: RemovalGroup;+ label: string;+ lockDir: string;+ preserveProjectState?: true;+ }| { kind: 'keychain-token'; group: RemovalGroup; label: string; host: string }| { kind: 'embeddings-key'; group: RemovalGroup; label: string }| { kind: 'shell-block'; group: RemovalGroup; label: string; rcFile: string }@@ -71,7 +77,7 @@ export interface RemovalPlan {ops: RemovalOp[];}-type RemovalStatus = 'removed' | 'not-present' | 'skipped' | 'failed';+type RemovalStatus = 'removed' | 'not-present' | 'skipped' | 'failed' | 'blocked';interface RemovalOpResult {op: RemovalOp;@@ -100,12 +106,22 @@ export function deinitOps(): RemovalOp[] {const ops: RemovalOp[] = [];- ops.push({- kind: 'stop-server',- group,- label: 'Stop the project server (if running)',- lockDir: resolveLockDir(projectRoot),- });+ const lockDirs = [resolveLockDir(projectRoot)];+ const legacyLockDir = join(projectRoot, '.ok');+ if (resolveRemovalFilePath(join(legacyLockDir, 'server.lock')).kind !== 'not-present') {+ lockDirs.push(legacyLockDir);+ }+ for (const lockDir of lockDirs) {+ ops.push({+ kind: 'stop-server',+ group,+ label:+ lockDir === legacyLockDir+ ? 'Check the legacy project server lock'+ : 'Stop the project server (if running)',+ lockDir,+ });+ }const mcpRelPaths = new Set<string>();for (const id of ALL_EDITOR_IDS) {@@ -177,7 +193,7 @@ export function deinitOps(? op: {...op,- requiresStoppedServers: [resolveLockDir(projectRoot)],+ requiresStoppedServers: lockDirs,...(op.kind === 'remove-path' ? { requiresSuccessfulCleanup: true } : {}),},);@@ -208,6 +224,7 @@ export function buildUninstallPlan(input: UninstallPlanInput): RemovalPlan {group: 'Running servers',label: `Stop server at ${tildify(join(lockDir, '..', '..'), home)}`,lockDir,+ preserveProjectState: true,});}@@ -358,6 +375,7 @@ export interface RunRemovalDeps {stopServer?: (lockDir: string) => Promise<{stopped: number;failed: Array<{ pid: number; error: string }>;+ skipped?: string;}>;}@@ -367,7 +385,19 @@ export async function runRemoval(): Promise<RemovalOutcome> {const clearToken = deps.clearToken ?? clearTokenFromAllBackends;const clearEmbeddingsKey = deps.clearEmbeddingsKey ?? clearAllEmbeddingsKeys;- const stopServer = deps.stopServer ?? stopServerForRemoval;+ const deinitLockDirs = new Set(+ plan.ops.flatMap((op) =>+ op.kind === 'stop-server' && !op.preserveProjectState ? [resolve(op.lockDir)] : [],+ ),+ );+ let processScan: ReturnType<typeof scanLockProcesses> | undefined;+ const stopServer =+ deps.stopServer ??+ ((lockDir: string) =>+ stopServerForRemoval(lockDir, {+ preserveProjectState: plan.scope === 'uninstall' && !deinitLockDirs.has(resolve(lockDir)),+ scanProcesses: () => (processScan ??= scanLockProcesses()),+ }));const resolvedDeps = { clearToken, clearEmbeddingsKey, stopServer, env: deps.env ?? {} };const execute = async (op: RemovalOp): Promise<RemovalOpResult> => {@@ -399,21 +429,21 @@ export async function runRemoval(if (blocked.length > 0) {results.push({op,- status: 'failed',- detail: `left untouched because server shutdown was not verified: ${blocked.join(', ')}. Stop the server and retry cleanup.`,+ status: 'blocked',+ detail: `left untouched because server shutdown was not verified (${blocked.length} server blocker${blocked.length === 1 ? '' : 's'}; see the stop-server failures).`,});continue;}if (op.kind === 'remove-path' && op.requiresSuccessfulCleanup) {const previousFailure = results.some((result) => {- if (result.status !== 'failed') return false;+ if (result.status !== 'failed' && result.status !== 'blocked') return false;if (!op.requiresStoppedServers) return true;return result.op.requiresStoppedServers?.some((lockDir) => required.includes(lockDir));});if (previousFailure) {results.push({op,- status: 'failed',+ status: 'blocked',detail:'left untouched so cleanup can be retried after the earlier failures are resolved',});@@ -426,7 +456,7 @@ export async function runRemoval(return {results,removed: results.filter((r) => r.status === 'removed'),- failed: results.filter((r) => r.status === 'failed'),+ failed: results.filter((r) => r.status === 'failed' || r.status === 'blocked'),};}@@ -454,7 +484,7 @@ type ResolvedDeps = Required<RunRemovalDeps>;async function executeOp(op: RemovalOp, deps: ResolvedDeps): Promise<RemovalOpResult> {switch (op.kind) {case 'stop-server': {- const { stopped, failed } = await deps.stopServer(op.lockDir);+ const { stopped, failed, skipped } = await deps.stopServer(op.lockDir);if (failed.length > 0) {const detail = failed.map((f) => `pid ${f.pid}: ${f.error}`).join('; ');return {@@ -463,6 +493,7 @@ async function executeOp(op: RemovalOp, deps: ResolvedDeps): Promise<RemovalOpRedetail: `could not stop the server (${detail}); dependent files were left untouched; stop the server and retry cleanup`,};}+ if (skipped) return { op, status: 'skipped', detail: skipped };return { op, status: stopped > 0 ? 'removed' : 'not-present' };}case 'keychain-token': {diff --git a/packages/cli/src/commands/removal-render.test.ts b/packages/cli/src/commands/removal-render.test.tsindex 882eb8deb..25556209b 100644--- a/packages/cli/src/commands/removal-render.test.ts+++ b/packages/cli/src/commands/removal-render.test.ts@@ -112,3 +112,39 @@ describe('formatRemovalOutcome', () => {}});});++test('reports root stop failures once and counts dependent items separately', async () => {+ const locks = ['/one/.ok/local', '/two/.ok/local'];+ const outcome = await runRemoval(+ {+ scope: 'uninstall',+ ops: [+ ...locks.map((lockDir) => ({+ kind: 'stop-server' as const,+ group: 'Servers',+ label: `Stop ${lockDir}`,+ lockDir,+ })),+ ...Array.from({ length: 35 }, (_, i) => ({+ kind: 'remove-path' as const,+ group: 'Global',+ label: `Global ${i}`,+ path: `/unused/${i}`,+ })),+ ],+ },+ {+ stopServer: async (lockDir) => {+ throw new Error(`Cannot stop ${lockDir}; resolve this blocker`);+ },+ },+ );+ const rendered = stripVTControlCharacters(formatRemovalOutcome(outcome));+ expect(rendered).toContain('2 could not be removed');+ expect(rendered).toContain('35 dependent items left untouched');+ expect(rendered.match(/resolve this blocker/g)).toHaveLength(2);+ expect(outcome.results.filter((r) => r.status === 'blocked')).toHaveLength(35);+ const json = removalOutcomeToJson('uninstall', outcome);+ expect(json.mode === 'applied' && json.failed).toHaveLength(37);+ expect(json.mode === 'applied' && json.blocked).toHaveLength(35);+});diff --git a/packages/cli/src/commands/removal-render.ts b/packages/cli/src/commands/removal-render.tsindex 0e2889efc..7f86bec4d 100644--- a/packages/cli/src/commands/removal-render.ts+++ b/packages/cli/src/commands/removal-render.ts@@ -30,18 +30,26 @@ function indentDetail(detail: string): string {export function formatRemovalOutcome(outcome: RemovalOutcome): string {const removed = outcome.removed.length;- const failed = outcome.failed.length;+ const failures = outcome.failed.filter((r) => r.status !== 'blocked');+ const blocked = outcome.results.filter((r) => r.status === 'blocked');+ const failed = failures.length;const notPresent = outcome.results.filter((r) => r.status === 'not-present').length;const skipped = outcome.results.filter((r) => r.status === 'skipped');const lines: string[] = [];lines.push(- failed > 0+ outcome.failed.length > 0? warning(`Removed ${removed} item${removed === 1 ? '' : 's'}, ${failed} could not be removed.`,): success(`✓ Removed ${removed} item${removed === 1 ? '' : 's'}.`),);+ if (blocked.length > 0)+ lines.push(+ warning(+ ` ${blocked.length} dependent items left untouched; resolve the failures below and retry.`,+ ),+ );if (notPresent > 0) lines.push(dim(` ${notPresent} already absent.`));for (const r of outcome.removed) {@@ -51,13 +59,13 @@ export function formatRemovalOutcome(outcome: RemovalOutcome): string {for (const s of skipped) {lines.push(- ` ${warning('·')} Left in place: ${s.op.label}${s.detail ? ` — ${dim(indentDetail(s.detail))}` : ''}`,+ ` ${warning('·')} ${s.op.kind === 'stop-server' ? 'Skipped' : 'Left in place'}: ${s.op.label}${s.detail ? ` — ${dim(indentDetail(s.detail))}` : ''}`,);}if (failed > 0) {lines.push('');lines.push(errorColor('Could not remove:'));- for (const f of outcome.failed) {+ for (const f of failures) {lines.push(` ${errorColor('✗')} ${f.op.label}${f.detail ? ` — ${indentDetail(f.detail)}` : ''}`,);@@ -85,6 +93,7 @@ export type RemovalJson =removed: RemovalItem[];skipped: RemovalItem[];failed: RemovalItem[];+ blocked: RemovalItem[];attachedClients: string[];};@@ -113,6 +122,9 @@ export function removalOutcomeToJson(skipped: outcome.results.filter((r) => r.status === 'skipped').map((r) => ({ kind: r.op.kind, label: r.op.label, detail: r.detail })),+ blocked: outcome.results+ .filter((r) => r.status === 'blocked')+ .map((r) => ({ kind: r.op.kind, label: r.op.label, detail: r.detail })),failed: outcome.failed.map((r) => ({ kind: r.op.kind, label: r.op.label, detail: r.detail })),attachedClients,};diff --git a/packages/cli/src/commands/status.test.ts b/packages/cli/src/commands/status.test.tsindex 6a1d0e99b..5a35c0ca1 100644--- a/packages/cli/src/commands/status.test.ts+++ b/packages/cli/src/commands/status.test.ts@@ -175,3 +175,14 @@ describe('runStatus', () => {expect(process.exitCode).toBe(before);});});++test('read failures retain unknown liveness and suggest restoring access', () => {+ const report = buildStatusReport({+ status: 'read-error',+ lockPath: '/x/server.lock',+ error: 'EACCES',+ });+ expect(report.server).toMatchObject({ state: 'read-error', alive: 'unknown' });+ expect(report.server.pid).toBeUndefined();+ expect(renderStatusText(report)).toContain('restore file and parent-directory access');+});diff --git a/packages/cli/src/commands/status.ts b/packages/cli/src/commands/status.tsindex 30e7829e6..b5e56f291 100644--- a/packages/cli/src/commands/status.ts+++ b/packages/cli/src/commands/status.ts@@ -42,6 +42,10 @@ function summarize(name: 'server' | 'ui', state: LockState): StatusEntry {return { name, state: 'missing', alive: false };case 'corrupt':return { name, state: 'corrupt', alive: false };+ case 'read-error':+ return { name, state: 'read-error', alive: 'unknown' };+ case 'unverified-owner':+ return { name, state: 'unverified-owner', pid: state.pid, alive: 'unknown' };case 'foreign-host':return {name,@@ -87,6 +91,12 @@ function renderEntry(entry: StatusEntry): string {if (entry.state === 'corrupt') {return `${label} lock file corrupt — run \`ok clean\``;}+ if (entry.state === 'read-error') {+ return `${label} lock file unreadable — restore file and parent-directory access, then retry`;+ }+ if (entry.state === 'unverified-owner') {+ return `${label} unverified owner (lock records no machine) pid=${entry.pid} is alive locally; server identity unknown`;+ }if (entry.state === 'foreign-host') {return `${label} foreign host (${entry.host}) pid=${entry.pid} port=${entry.port}`;}diff --git a/packages/cli/src/commands/stop-for-removal.test.ts b/packages/cli/src/commands/stop-for-removal.test.tsindex d07842d1f..35cf3efbb 100644--- a/packages/cli/src/commands/stop-for-removal.test.ts+++ b/packages/cli/src/commands/stop-for-removal.test.ts@@ -1,9 +1,18 @@import { type ChildProcess, execFileSync, type SpawnSyncReturns, spawn } from 'node:child_process';import { once } from 'node:events';-import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';+import {+ chmodSync,+ existsSync,+ mkdirSync,+ mkdtempSync,+ readFileSync,+ realpathSync,+ rmSync,+ writeFileSync,+} from 'node:fs';import { hostname, tmpdir } from 'node:os';import { join } from 'node:path';-import { isProcessAlive, lockFilePath } from '@inkeep/open-knowledge-server';+import { isProcessAlive, lockFilePath, scanLockProcesses } from '@inkeep/open-knowledge-server';import pino from 'pino';import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';import * as cliLogger from '../cli-logger.ts';@@ -62,18 +71,186 @@ describe('stopServerForRemoval', () => {return pid;}+ test('recovers a dead PID-only lock for deinit', async () => {+ writeFileSync(lockFilePath(dir, 'server'), JSON.stringify({ pid: 4242 }));+ expect(await stopServerForRemoval(dir, { isAlive: () => false })).toMatchObject({+ stopped: 0,+ failed: [],+ skipped: expect.stringContaining('has exited'),+ });+ });++ test('refuses a live PID-only lock without inventing an owning machine', async () => {+ writeFileSync(lockFilePath(dir, 'server'), JSON.stringify({ pid: 4242 }));+ await expect(stopServerForRemoval(dir, { isAlive: () => true })).rejects.toThrow(+ 'does not record its owning machine',+ );+ });+test('reports no server when no lock exists', async () => {expect(await stopServerForRemoval(dir)).toEqual({ stopped: 0, failed: [] });});- test('rejects an unreadable lock instead of claiming shutdown was verified', async () => {+ test('skips malformed filesystem residue without claiming a server was stopped', async () => {writeFileSync(lockFilePath(dir, 'server'), '{bad metadata');- await expect(stopServerForRemoval(dir)).rejects.toThrow(- `Once you have confirmed they have exited, remove the stale lock file at ${lockFilePath(dir, 'server')} and retry cleanup`,+ const scanProcesses = vi.fn(async () => ({ candidates: [], unavailable: [] }));+ expect(await stopServerForRemoval(dir, { scanProcesses })).toMatchObject({+ stopped: 0,+ failed: [],+ skipped: expect.stringContaining('malformed'),+ });+ expect(scanProcesses).toHaveBeenCalledOnce();+ expect(readFileSync(lockFilePath(dir, 'server'), 'utf8')).toBe('{bad metadata');+ });++ test.each([0, 1, -1, 1.5, 2147483648, '123', null])(+ 'skips invalid PID %j without a liveness probe or signal',+ async (pid) => {+ writeFileSync(lockFilePath(dir, 'server'), JSON.stringify({ pid, hostname: hostname() }));+ const isAlive = vi.fn(() => {+ throw new Error('invalid PID must not be probed');+ });+ const result = await stopServerForRemoval(dir, {+ isAlive,+ scanProcesses: async () => ({ candidates: [], unavailable: [] }),+ });+ expect(result).toMatchObject({+ stopped: 0,+ failed: [],+ skipped: expect.stringContaining('malformed'),+ });+ expect(isAlive).not.toHaveBeenCalled();+ },+ );++ test('preserves malformed locks when process inspection is unavailable', async () => {+ writeFileSync(lockFilePath(dir, 'server'), 'not json');+ await expect(+ stopServerForRemoval(dir, {+ scanProcesses: async () => ({ candidates: [], unavailable: ['ps unavailable'] }),+ }),+ ).rejects.toThrow('ps unavailable');+ });++ test.skipIf(process.platform === 'win32' || process.getuid?.() === 0)(+ 'preserves a lock after a genuine access failure',+ async () => {+ const path = lockFilePath(dir, 'server');+ writeFileSync(path, 'not json');+ chmodSync(path, 0o000);+ try {+ await expect(stopServerForRemoval(dir)).rejects.toThrow(+ 'Restore file and parent-directory access',+ );+ expectRefusalLogged('read-error', 'EACCES');+ } finally {+ chmodSync(path, 0o600);+ }+ },+ );++ test('preserves a non-file lock path', async () => {+ mkdirSync(lockFilePath(dir, 'server'));+ await expect(stopServerForRemoval(dir)).rejects.toThrow('Cannot read the server lock');+ });++ test.each([undefined, 0, 1, '123'])(+ 'retains foreign ownership with unusable PID %j for deinit and global-only removal',+ async (pid) => {+ const raw = JSON.stringify({ pid, machineId: 'not-this-machine' });+ writeFileSync(lockFilePath(dir, 'server'), raw);+ const isAlive = vi.fn(() => {+ throw new Error('invalid PID must not be probed');+ });+ const scanProcesses = vi.fn(async () => ({ candidates: [], unavailable: [] }));+ await expect(stopServerForRemoval(dir, { isAlive, scanProcesses })).rejects.toThrow(+ 'another machine',+ );+ expect(scanProcesses).not.toHaveBeenCalled();+ expect(+ await stopServerForRemoval(dir, {+ isAlive,+ scanProcesses,+ preserveProjectState: true,+ }),+ ).toMatchObject({+ stopped: 0,+ failed: [],+ skipped: expect.stringContaining('foreign-owned'),+ });+ expect(isAlive).not.toHaveBeenCalled();+ expect(readFileSync(lockFilePath(dir, 'server'), 'utf8')).toBe(raw);+ },+ );++ test('preserves valid foreign ownership even when the PID is absent on this machine', async () => {+ writeFileSync(+ lockFilePath(dir, 'server'),+ JSON.stringify({ pid: 99999999, hostname: 'remote-host' }),+ );+ await expect(stopServerForRemoval(dir, { isAlive: () => false })).rejects.toThrow(+ 'owning machine',+ );+ });++ test('retains a foreign project while allowing local-only cleanup after process inspection', async () => {+ const raw = JSON.stringify({ pid: 99999999, hostname: 'remote-host' });+ writeFileSync(lockFilePath(dir, 'server'), raw);+ const scanProcesses = vi.fn(async () => ({ candidates: [], unavailable: [] }));+ expect(+ await stopServerForRemoval(dir, { preserveProjectState: true, scanProcesses }),+ ).toMatchObject({+ stopped: 0,+ failed: [],+ skipped: expect.stringContaining('foreign-owned'),+ });+ expect(scanProcesses).toHaveBeenCalledOnce();+ expect(readFileSync(lockFilePath(dir, 'server'), 'utf8')).toBe(raw);+ });++ test('cannot skip a foreign project when local process inspection is unavailable', async () => {+ writeFileSync(+ lockFilePath(dir, 'server'),+ JSON.stringify({ pid: 99999999, hostname: 'remote-host' }),);- expectRefusalLogged('corrupt', 'unreadable server lock');+ await expect(+ stopServerForRemoval(dir, {+ preserveProjectState: true,+ scanProcesses: async () => ({ candidates: [], unavailable: ['ps unavailable'] }),+ }),+ ).rejects.toThrow('ps unavailable');});+ test.skipIf(process.platform === 'win32')(+ 'blocks a malformed lock associated with a live marked process',+ async () => {+ const child = spawn(+ process.execPath,+ [+ '-e',+ "process.send('ready'); setInterval(() => {}, 1000)",+ '--',+ `--ok-lock-dir-b64=${Buffer.from(dir).toString('base64url')}`,+ ],+ { stdio: ['ignore', 'ignore', 'ignore', 'ipc'] },+ );+ children.push(child);+ await once(child, 'message');+ writeFileSync(lockFilePath(dir, 'server'), 'not json');+ const scan = await scanLockProcesses();+ expect(scan.candidates).toContainEqual({+ lockDir: realpathSync(dir),+ pid: child.pid,+ source: 'lock-dir-argument',+ });+ await expect(stopServerForRemoval(dir, { scanProcesses: async () => scan })).rejects.toThrow(+ 'live process candidates',+ );+ if (child.pid === undefined) throw new Error('Missing child PID');+ expect(isProcessAlive(child.pid)).toBe(true);+ },+ );+test('does not signal an unrelated process whose PID appears in an older lock', async () => {const pid = await startServer(`process.send('ready');@@ -268,7 +445,16 @@ describe('stopServerForRemoval', () => {child.kill('SIGTERM');await exited;expect(isProcessAlive(pid)).toBe(false);- expect(await stopServerForRemoval(dir)).toEqual({ stopped: 0, failed: [] });+ const scanProcesses = vi.fn(async () => ({+ candidates: [],+ unavailable: ['POSIX tools unavailable'],+ }));+ expect(await stopServerForRemoval(dir, { scanProcesses })).toMatchObject({+ stopped: 0,+ failed: [],+ skipped: expect.stringContaining('stale'),+ });+ expect(scanProcesses).not.toHaveBeenCalled();},);});diff --git a/packages/cli/src/commands/stop-for-removal.ts b/packages/cli/src/commands/stop-for-removal.tsindex d151a7ead..37bc4d9c7 100644--- a/packages/cli/src/commands/stop-for-removal.ts+++ b/packages/cli/src/commands/stop-for-removal.ts@@ -1,11 +1,19 @@+import { realpath } from 'node:fs/promises';+import { resolve } from 'node:path';import { setTimeout } from 'node:timers/promises';-import { isProcessAlive } from '@inkeep/open-knowledge-server';+import {+ isProcessAlive,+ type LockProcessScan,+ scanLockProcesses,+} from '@inkeep/open-knowledge-server';import { getCliLogger } from '../cli-logger.ts';-import { inspectLock } from './lock-state.ts';+import { describeLockOwnershipRefusal, inspectLock } from './lock-state.ts';import { readRemovalProcessStart } from './removal-process-start.ts';import { runStop } from './stop.ts';interface StopForRemovalOptions {+ preserveProjectState?: boolean;+ scanProcesses?: () => Promise<LockProcessScan>;timeoutMs?: number;pollIntervalMs?: number;readProcessStart?: (pid: number) => number | null;@@ -15,7 +23,7 @@ interface StopForRemovalOptions {export async function stopServerForRemoval(lockDir: string,options: StopForRemovalOptions = {},-): Promise<{ stopped: number; failed: Array<{ pid: number; error: string }> }> {+): Promise<{ stopped: number; failed: Array<{ pid: number; error: string }>; skipped?: string }> {const isAlive = options.isAlive ?? isProcessAlive;const state = inspectLock(lockDir, 'server', { isAlive });const lockRecovery =@@ -25,17 +33,63 @@ export async function stopServerForRemoval(getCliLogger()?.warn({ lockDir, lockPath: state.lockPath, status: state.status }, message);return new Error(message);};- if (state.status === 'corrupt') {+ if (state.status === 'read-error') {throw refusal(- `Cannot verify shutdown from the unreadable server lock at ${state.lockPath}. ${lockRecovery}`,+ `Cannot read the server lock at ${state.lockPath}: ${state.error}. Restore file and parent-directory access, then retry cleanup.`,);}- if (state.status === 'foreign-host') {- throw refusal(- `Cannot verify shutdown: the server lock at ${state.lockPath} belongs to another machine. ` +- 'Stop OpenKnowledge on the owning machine. Confirm that no OpenKnowledge server is using this directory on the owning machine or any other machine sharing it. ' +- `Only then remove the stale lock file at ${state.lockPath} and retry cleanup.`,+ const ownershipRefusal =+ state.status === 'unverified-owner' ||+ state.status === 'foreign-host' ||+ (state.status === 'corrupt' && state.foreignHost === true)+ ? state+ : null;+ const foreignHost = ownershipRefusal !== null && ownershipRefusal.status !== 'unverified-owner';+ if (ownershipRefusal !== null && !options.preserveProjectState) {+ throw refusal(describeLockOwnershipRefusal(ownershipRefusal));+ }+ if (state.status === 'dead-pid') {+ return {+ stopped: 0,+ failed: [],+ skipped: `Skipped stale lock at ${state.lockPath}; its recorded local process ${state.lock.pid} has exited. No server was stopped.`,+ };+ }+ if (+ state.status === 'corrupt' ||+ state.status === 'foreign-host' ||+ state.status === 'unverified-owner'+ ) {+ const unverifiedOwner = state.status === 'unverified-owner';+ const description = unverifiedOwner+ ? 'unverified'+ : foreignHost+ ? 'foreign-owned'+ : 'malformed';+ const scan = await (options.scanProcesses ?? scanLockProcesses)();+ const canonical = await realpath(lockDir).catch(() => resolve(lockDir));+ const candidates = scan.candidates.filter(+ (candidate) => candidate.lockDir === canonical && isAlive(candidate.pid),);+ if (candidates.length > 0) {+ throw refusal(+ `Cannot verify shutdown from the ${description} lock at ${state.lockPath}: live process candidates ${candidates.map((candidate) => `${candidate.pid} (${candidate.source})`).join(', ')}. No process was signalled. ${lockRecovery}`,+ );+ }+ if (scan.unavailable.length > 0) {+ throw refusal(+ `Cannot rule out a live server for ${state.lockPath}: ${scan.unavailable.join('; ')}. Restore process-inspection access and retry cleanup. ${lockRecovery}`,+ );+ }+ return {+ stopped: 0,+ failed: [],+ skipped: unverifiedOwner+ ? `Retained project lock with an unverified owner at ${state.lockPath}; its recorded process ${state.pid} is running locally, but process and listener inspection could not attribute any server to this directory. No process was signalled. Only local application cleanup may proceed; project state is unchanged. No server was stopped.`+ : foreignHost+ ? `Retained foreign-owned project lock at ${state.lockPath}; process and listener inspection found no local server candidate for this directory. Only local application cleanup may proceed; project state is unchanged. No server was stopped.`+ : `Skipped malformed lock at ${state.lockPath}; process and listener inspection found no live server candidate for this directory. No server was stopped.`,+ };}if (state.status === 'alive') {const lockStartedAt =diff --git a/packages/cli/src/commands/uninstall-lock-recovery.test.ts b/packages/cli/src/commands/uninstall-lock-recovery.test.tsnew file mode 100644index 000000000..832a49a72--- /dev/null+++ b/packages/cli/src/commands/uninstall-lock-recovery.test.ts@@ -0,0 +1,261 @@+import { type ChildProcess, spawn } from 'node:child_process';+import { once } from 'node:events';+import {+ existsSync,+ mkdirSync,+ mkdtempSync,+ readFileSync,+ realpathSync,+ rmSync,+ writeFileSync,+} from 'node:fs';+import { hostname, tmpdir } from 'node:os';+import { dirname, join } from 'node:path';+import { isProcessAlive } from '@inkeep/open-knowledge-server';+import { afterEach, beforeEach, describe, expect, test } from 'vitest';+import { buildDeinitPlan, buildUninstallPlan, runRemoval } from './removal-plan.ts';+import { runUninstall } from './uninstall.ts';++describe.skipIf(process.platform === 'win32')('uninstall lock recovery in an isolated home', () => {+ let root: string;+ const children: ChildProcess[] = [];+ beforeEach(() => {+ root = realpathSync(mkdtempSync(join(tmpdir(), 'ok-uninstall-recovery-')));+ });+ afterEach(async () => {+ for (const child of children.splice(0)) {+ if (child.exitCode !== null || child.signalCode !== null) continue;+ const exited = once(child, 'exit');+ child.kill('SIGKILL');+ await exited;+ }+ rmSync(root, { recursive: true, force: true });+ expect(existsSync(root)).toBe(false);+ });+ function write(path: string, bytes: string) {+ mkdirSync(dirname(path), { recursive: true });+ writeFileSync(path, bytes);+ }+ async function childServer(project: string) {+ const child = spawn(+ process.execPath,+ [+ '-e',+ "process.title = 'open-knowledge-server fixture'; process.send('ready'); setInterval(() => {}, 1000)",+ ],+ { cwd: project, stdio: ['ignore', 'ignore', 'ignore', 'ipc'] },+ );+ children.push(child);+ await once(child, 'message');+ if (child.pid === undefined) throw new Error('Fixture failed to start');+ return child;+ }+ test.each([false, true])(+ 'cleans global state with mixed lock residue (deinit selected=%s)',+ async (deinit) => {+ const home = join(root, 'home');+ const settings = join(home, 'Library', 'Application Support', 'OpenKnowledge', 'state.json');+ const skill = join(home, '.ok', 'skills', 'mine', 'SKILL.md');+ write(settings, '{"recentProjects":[]}');+ write(join(home, '.ok', 'auth.yml'), 'fixture auth');+ write(skill, '# My skill');+ write(+ join(home, '.zshrc'),+ 'export EDITOR=vim\n# >>> open-knowledge cli >>>\nmanaged\n# <<< open-knowledge cli <<<\n',+ );+ const kinds = ['valid', 'absent', 'stale', 'pid-only', 'malformed', 'zero', 'one'];+ const projects = kinds.map((kind) => join(root, kind));+ const locks: string[] = [];+ let livePid: number | undefined;+ for (const [index, project] of projects.entries()) {+ const kind = kinds[index];+ write(join(project, 'notes.md'), '# Keep my notes');+ write(join(project, '.ok', 'config.yml'), '{}');+ const lockDir = join(project, '.ok', 'local');+ mkdirSync(lockDir);+ locks.push(lockDir);+ if (kind === 'absent') continue;+ let raw = 'not json';+ if (kind === 'valid' || kind === 'stale' || kind === 'pid-only') {+ const child = await childServer(project);+ if (kind === 'stale' || kind === 'pid-only') {+ const exited = once(child, 'exit');+ child.kill('SIGTERM');+ await exited;+ } else livePid = child.pid;+ raw = JSON.stringify({+ pid: child.pid,+ ...(kind === 'pid-only' ? {} : { hostname: hostname() }),+ port: 0,+ startedAt: new Date().toISOString(),+ });+ } else if (kind === 'zero' || kind === 'one') {+ raw = JSON.stringify({+ pid: kind === 'zero' ? 0 : 1,+ hostname: hostname(),+ });+ }+ write(join(lockDir, 'server.lock'), raw);+ }+ const result = await runUninstall({+ home,+ cwd: root,+ platform: 'darwin',+ env: {},+ yes: true,+ json: true,+ deps: {+ discoverLockDirs: async () => locks,+ resolveRecentProjects: async () => (deinit ? projects : []),+ detectInstallMethods: () => [],+ runRemovalDeps: {+ clearToken: async () => ({ touched: [] }),+ clearEmbeddingsKey: async () => ({ touched: [] }),+ },+ },+ });+ expect(result.exitCode, result.message).toBe(0);+ const json = JSON.parse(result.message);+ expect(json.failed).toEqual([]);+ expect(+ json.skipped.filter((item: { kind: string }) => item.kind === 'stop-server'),+ ).toHaveLength(deinit ? 10 : 5);+ expect(+ json.removed.filter((item: { kind: string }) => item.kind === 'stop-server'),+ ).toHaveLength(deinit ? 2 : 1);+ expect(existsSync(settings)).toBe(false);+ expect(existsSync(join(home, '.ok', 'auth.yml'))).toBe(false);+ expect(readFileSync(skill, 'utf8')).toBe('# My skill');+ expect(readFileSync(join(home, '.zshrc'), 'utf8')).toBe('export EDITOR=vim\n');+ if (livePid === undefined) throw new Error('Missing live fixture PID');+ expect(isProcessAlive(livePid)).toBe(false);+ for (const project of projects) {+ expect(readFileSync(join(project, 'notes.md'), 'utf8')).toBe('# Keep my notes');+ expect(existsSync(join(project, '.ok', 'config.yml'))).toBe(!deinit);+ }+ if (!deinit)+ expect(readFileSync(join(root, 'malformed', '.ok', 'local', 'server.lock'), 'utf8')).toBe(+ 'not json',+ );+ },+ );++ test('shared deinit removes selected project state after harmless invalid residue', async () => {+ const project = join(root, 'project');+ write(join(project, '.ok', 'local', 'server.lock'), 'not json');+ write(join(project, 'notes.md'), '# Keep');+ const outcome = await runRemoval(buildDeinitPlan(project, join(root, 'home')));+ expect(outcome.failed).toEqual([]);+ expect(outcome.results[0]).toMatchObject({+ status: 'skipped',+ detail: expect.stringContaining('No server was stopped'),+ });+ expect(existsSync(join(project, '.ok'))).toBe(false);+ expect(readFileSync(join(project, 'notes.md'), 'utf8')).toBe('# Keep');+ });++ test.each(+ (+ [+ 'global',+ 'selected',+ 'selected-reversed',+ 'deinit',+ 'global-legacy',+ 'selected-legacy',+ 'deinit-legacy',+ ] as const+ ).flatMap((scope) => [0, 99999999].map((pid) => ({ scope, pid }))),+ )('retains foreign project state while applying $scope with PID $pid', async ({ scope, pid }) => {+ const home = join(root, 'home');+ const settings = join(home, '.ok', 'config.yml');+ const project = join(root, 'foreign-project');+ const lockDir = scope.endsWith('legacy') ? join(project, '.ok') : join(project, '.ok', 'local');+ const lockPath = join(lockDir, 'server.lock');+ const raw = JSON.stringify({ pid, hostname: 'remote-host', port: 5173 });+ write(lockPath, raw);+ write(join(project, 'notes.md'), '# Keep');+ write(settings, '{}');+ const plan = scope.startsWith('deinit')+ ? buildDeinitPlan(project, home)+ : buildUninstallPlan({+ home,+ platform: 'darwin',+ env: {},+ host: 'github.com',+ lockDirs: [lockDir],+ marker: null,+ recentDeinitProjectRoots: scope.startsWith('global') ? [] : [project],+ purgeContent: false,+ });+ if (scope === 'selected-reversed') plan.ops.reverse();+ const outcome = await runRemoval(plan, {+ clearToken: async () => ({ touched: [] }),+ clearEmbeddingsKey: async () => ({ touched: [] }),+ });+ if (scope.startsWith('global')) {+ expect(outcome.failed).toEqual([]);+ expect(outcome.results[0]).toMatchObject({+ status: 'skipped',+ detail: expect.stringContaining('foreign-owned'),+ });+ expect(existsSync(settings)).toBe(false);+ } else {+ expect(outcome.failed.some((r) => r.detail?.includes('owning machine'))).toBe(true);+ expect(existsSync(settings)).toBe(true);+ }+ expect(readFileSync(lockPath, 'utf8')).toBe(raw);+ expect(readFileSync(join(project, 'notes.md'), 'utf8')).toBe('# Keep');+ });++ test.each([+ { associated: false, unrecorded: false },+ { associated: true, unrecorded: false },+ { associated: false, unrecorded: true },+ { associated: true, unrecorded: true },+ ])(+ 'retains a live foreign or unverified lock (associated=$associated, unrecorded=$unrecorded)',+ async ({ associated, unrecorded }) => {+ const home = join(root, 'home');+ const settings = join(home, '.ok', 'config.yml');+ const project = join(root, 'foreign-project');+ const otherProject = join(root, 'other-project');+ write(join(project, 'notes.md'), '# Keep');+ mkdirSync(otherProject);+ write(settings, '{}');+ const child = await childServer(associated ? project : otherProject);+ const lockDir = join(project, '.ok', 'local');+ const raw = JSON.stringify({+ pid: child.pid,+ ...(unrecorded ? {} : { hostname: 'remote-host' }),+ });+ write(join(lockDir, 'server.lock'), raw);+ const plan = buildUninstallPlan({+ home,+ platform: 'darwin',+ env: {},+ host: 'github.com',+ lockDirs: [lockDir],+ marker: null,+ recentDeinitProjectRoots: [],+ purgeContent: false,+ });+ const outcome = await runRemoval(plan, {+ clearToken: async () => ({ touched: [] }),+ clearEmbeddingsKey: async () => ({ touched: [] }),+ });+ if (associated) {+ expect(outcome.failed.some((r) => r.detail?.includes('live process candidates'))).toBe(+ true,+ );+ expect(existsSync(settings)).toBe(true);+ } else {+ expect(outcome.failed).toEqual([]);+ expect(existsSync(settings)).toBe(false);+ }+ if (child.pid === undefined) throw new Error('Missing child PID');+ expect(isProcessAlive(child.pid)).toBe(true);+ expect(readFileSync(join(lockDir, 'server.lock'), 'utf8')).toBe(raw);+ },+ );+});diff --git a/packages/cli/src/commands/unverified-lock-owner.test.ts b/packages/cli/src/commands/unverified-lock-owner.test.tsnew file mode 100644index 000000000..f16183acf--- /dev/null+++ b/packages/cli/src/commands/unverified-lock-owner.test.ts@@ -0,0 +1,153 @@+import { mkdirSync, mkdtempSync, readFileSync, realpathSync, rmSync, writeFileSync } from 'node:fs';+import { tmpdir } from 'node:os';+import { join } from 'node:path';+import { afterEach, beforeEach, expect, test, vi } from 'vitest';+import { runClean } from './clean.ts';+import { makeServerLockCheck } from './diagnose-health-checks/server-lock.ts';+import { inspectLock } from './lock-state.ts';+import { runPs } from './ps.ts';+import { buildStatusReport, renderStatusText } from './status.ts';+import { runStop } from './stop.ts';+import { stopServerForRemoval } from './stop-for-removal.ts';++let project: string;+let lockDir: string;+let lockPath: string;+const raw = JSON.stringify({ pid: 4242 });+beforeEach(() => {+ project = mkdtempSync(join(tmpdir(), 'ok-unverified-owner-owned-'));+ lockDir = join(project, '.ok', 'local');+ mkdirSync(lockDir, { recursive: true });+ lockPath = join(lockDir, 'server.lock');+ writeFileSync(lockPath, raw);+});+afterEach(() => rmSync(project, { recursive: true, force: true }));+const inspect = () => inspectLock(lockDir, 'server', { isAlive: () => true });++test('models a live PID-only lock without asserting absent metadata', () => {+ expect(inspect()).toEqual({ status: 'unverified-owner', lockPath, pid: 4242 });+});++test('clean refuses without suggesting deletion of a lock with a live PID', () => {+ const error = vi.fn();+ const unlink = vi.fn();+ const outcome = runClean({ lockDir, inspect, error, unlink, log: vi.fn() });+ expect(outcome.failed).toHaveLength(1);+ expect(unlink).not.toHaveBeenCalled();+ expect(error).toHaveBeenCalledWith(expect.stringContaining('process 4242'));+ expect(error).toHaveBeenCalledWith(expect.stringContaining('Do not remove the lock file'));+ expect(error.mock.calls.flat().join(' ')).not.toMatch(/stale lock|Only then remove/);+ expect(readFileSync(lockPath, 'utf8')).toBe(raw);+});++test('status identifies unverified ownership without inventing a host or server liveness', () => {+ const report = buildStatusReport(inspect());+ expect(report.server).toEqual({+ name: 'server',+ state: 'unverified-owner',+ pid: 4242,+ alive: 'unknown',+ });+ const text = renderStatusText(report);+ expect(text).toContain('unverified owner');+ expect(text).toContain('pid=4242');+ expect(text).not.toContain('undefined');+});++test('diagnose points to the live local PID and protects its lock', async () => {+ const result = await makeServerLockCheck({ inspect }).run({ cwd: project });+ expect(result.status).toBe('warn');+ expect(result.summary).toContain('unverified owner');+ expect(result.remediation).toContain('process 4242');+ expect(result.remediation).toContain('Do not remove the lock file');+ expect(JSON.stringify(result)).not.toContain('undefined');+});++test.each([+ { json: false, layout: 'current' },+ { json: true, layout: 'current' },+ { json: false, layout: 'legacy' },+ { json: true, layout: 'legacy' },+ { json: false, layout: 'custom' },+ { json: true, layout: 'custom' },+])(+ 'ps reports the project directory for $layout locks with json=$json',+ async ({ json, layout }) => {+ if (layout !== 'current') {+ lockDir = join(project, layout === 'legacy' ? '.ok' : 'custom-state');+ mkdirSync(lockDir, { recursive: true });+ lockPath = join(lockDir, 'server.lock');+ writeFileSync(lockPath, raw);+ }+ const log = vi.fn();+ await runPs({+ discover: async () => [lockDir],+ inspect,+ resolveCommand: () => null,+ resolveUsage: () => null,+ log,+ json,+ });+ const output = log.mock.calls[0]?.[0];+ expect(output).toContain('unverified');+ expect(output).toContain('4242');+ expect(output).not.toContain('undefined');+ if (json)+ expect(JSON.parse(output)[0]).toMatchObject({+ directory: layout === 'custom' ? null : project,+ hostname: null,+ server: { port: null, startedAt: null },+ });+ else {+ expect(output).toContain('— / —');+ expect(output).not.toContain('null');+ expect(output).not.toContain(lockDir);+ if (layout !== 'custom') expect(output).toContain(project);+ }+ },+);++test('stop never signals an unverified owner even with force', async () => {+ const kill = vi.fn();+ const outcome = await runStop({+ lockDir,+ inspect,+ kill,+ force: true,+ isAlive: () => true,+ log: vi.fn(),+ error: vi.fn(),+ });+ expect(kill).not.toHaveBeenCalled();+ expect(outcome.stopped).toEqual([]);+});++test('global-only cleanup retains an unattributed live PID lock and reports its evidence', async () => {+ const outcome = await stopServerForRemoval(lockDir, {+ preserveProjectState: true,+ isAlive: () => true,+ scanProcesses: async () => ({ candidates: [], unavailable: [] }),+ });+ expect(outcome).toMatchObject({+ stopped: 0,+ failed: [],+ skipped: expect.stringContaining('unverified owner'),+ });+ expect(outcome.skipped).toContain('process 4242');+ expect(outcome.skipped).toContain('could not attribute');+ expect(readFileSync(lockPath, 'utf8')).toBe(raw);+});++test('global-only cleanup still refuses an associated live server candidate', async () => {+ await expect(+ stopServerForRemoval(lockDir, {+ preserveProjectState: true,+ isAlive: () => true,+ scanProcesses: async () => ({+ candidates: [{ lockDir: realpathSync(lockDir), pid: 4242, source: 'process-cwd' }],+ unavailable: [],+ }),+ }),+ ).rejects.toThrow('unverified');+ expect(readFileSync(lockPath, 'utf8')).toBe(raw);+});diff --git a/packages/core/src/bridge/compose.ts b/packages/core/src/bridge/compose.tsindex f4cc8a286..2a597ec3d 100644--- a/packages/core/src/bridge/compose.ts+++ b/packages/core/src/bridge/compose.ts@@ -1,3 +1,4 @@+import { prependFrontmatter, stripFrontmatter } from '../extensions/frontmatter.ts';export type ComposeAdjustment = 'none' | 'body' | 'frontmatter' | 'unresolved';diff --git a/packages/core/src/bridge/doc-boundary-space.ts b/packages/core/src/bridge/doc-boundary-space.tsindex 8fb428b90..01ef76a9f 100644--- a/packages/core/src/bridge/doc-boundary-space.ts+++ b/packages/core/src/bridge/doc-boundary-space.ts@@ -1,3 +1,4 @@+import { FRONTMATTER_RE, stripFrontmatter } from '../extensions/frontmatter.ts';import { carriedEdgeEmpties, type DocEdgeEmpties } from '../markdown/doc-edge-blank-runs.ts';diff --git a/packages/core/src/index.ts b/packages/core/src/index.tsindex af71f8289..f34354507 100644--- a/packages/core/src/index.ts+++ b/packages/core/src/index.ts@@ -1954,10 +1954,12 @@ export type {UninstallDispatchRequest,UninstallDispatchResult,UninstallIntent,+ UninstallNoticeChecklistItem,UninstallNoticeScreen,UninstallProjectRow,UninstallScreenSpec,} from './uninstall-bridge.ts';+export { UNINSTALL_RESULT_WAIT_TIMEOUT_MS } from './uninstall-bridge.ts';export {HIDDEN_CONFIG_BASENAMES,isHiddenDocName,diff --git a/packages/core/src/markdown/comment-promoter.ts b/packages/core/src/markdown/comment-promoter.tsindex bfbd5a2e8..20a68d2a1 100644--- a/packages/core/src/markdown/comment-promoter.ts+++ b/packages/core/src/markdown/comment-promoter.ts@@ -1,3 +1,4 @@+import type { Nodes, Paragraph, PhrasingContent, Root, RootContent, Text } from 'mdast';import { SKIP, visit } from 'unist-util-visit';import type { VFile } from 'vfile';diff --git a/packages/core/src/markdown/merged-walker.ts b/packages/core/src/markdown/merged-walker.tsindex bfd7e3109..fa3cfcd86 100644--- a/packages/core/src/markdown/merged-walker.ts+++ b/packages/core/src/markdown/merged-walker.ts@@ -1,3 +1,4 @@+import type { Nodes, Parent, Root } from 'mdast';import { SKIP, visit } from 'unist-util-visit';import type { VFile } from 'vfile';diff --git a/packages/core/src/markdown/safe-url.ts b/packages/core/src/markdown/safe-url.tsindex 4d3250d3a..8be632ba4 100644--- a/packages/core/src/markdown/safe-url.ts+++ b/packages/core/src/markdown/safe-url.ts@@ -1,3 +1,4 @@+export const SAFE_URL_SCHEMES = ['https', 'http', 'mailto', 'tel', 'ftp', 'sms'] as const;const SCHEME_ALT = SAFE_URL_SCHEMES.map((s) => `${s}:`).join('|');diff --git a/packages/core/src/uninstall-bridge.ts b/packages/core/src/uninstall-bridge.tsindex 5e14a2148..3f751c5dd 100644--- a/packages/core/src/uninstall-bridge.ts+++ b/packages/core/src/uninstall-bridge.ts@@ -1,3 +1,5 @@+export const UNINSTALL_RESULT_WAIT_TIMEOUT_MS = 10 * 60_000;+export interface UninstallProjectRow {readonly path: string;readonly open: boolean;@@ -5,7 +7,16 @@ export interface UninstallProjectRow {readonly running: boolean;}+export interface UninstallNoticeChecklistItem {+ readonly label: string;+ readonly detail?: string;+ readonly done: boolean;+}+export interface UninstallNoticeScreen {+ readonly subtitle?: string;+ readonly checklist?: readonly UninstallNoticeChecklistItem[];+ readonly logRevealLabel?: string;readonly title: string;readonly paragraphs: readonly string[];readonly footnote?: string;@@ -18,10 +29,12 @@ export interface UninstallNoticeScreen {export type UninstallScreenSpec =| { readonly kind: 'picker'; readonly projects: readonly UninstallProjectRow[] }| { readonly kind: 'survey' }- | { readonly kind: 'progress' }+ | { readonly kind: 'progress'; readonly awaitResult?: boolean }+ | { readonly kind: 'result'; readonly outcome: 'success' | 'failure' }| { readonly kind: 'notice'; readonly notice: UninstallNoticeScreen };export type UninstallIntent =+ | { readonly kind: 'progress-shown' }| { readonly kind: 'picker-confirm'; readonly selectedIndexes: readonly number[] }| { readonly kind: 'picker-cancel' }| {@@ -32,7 +45,8 @@ export type UninstallIntent =}| { readonly kind: 'survey-skip' }| { readonly kind: 'notice-confirm' }- | { readonly kind: 'notice-cancel' };+ | { readonly kind: 'notice-cancel' }+ | { readonly kind: 'notice-reveal-log' };export type UninstallDispatchRequest = { readonly kind: 'ready' } | UninstallIntent;diff --git a/packages/desktop/electron.vite.config.ts b/packages/desktop/electron.vite.config.tsindex ef1ee97fa..e1ceb33f9 100644--- a/packages/desktop/electron.vite.config.ts+++ b/packages/desktop/electron.vite.config.ts@@ -74,7 +74,12 @@ export default defineConfig({// into the same folder. Alternative: multi-root rollup config — not// worth the complexity for a single extra entry.input: {- index: resolve(__dirname, 'src/main/index.ts'),+ index: resolve(__dirname, 'src/main/entry.ts'),+ 'app-main': resolve(__dirname, 'src/main/index.ts'),+ 'uninstall-result-window': resolve(+ __dirname,+ 'src/main/desktop-uninstall-result-window.ts',+ ),'utility/server-entry': resolve(__dirname, 'src/utility/server-entry.ts'),'utility/pty-host': resolve(__dirname, 'src/utility/pty-host.ts'),},diff --git a/packages/desktop/src/main/desktop-uninstall-handoff.ts b/packages/desktop/src/main/desktop-uninstall-handoff.tsindex 81be23747..aefe9697f 100644--- a/packages/desktop/src/main/desktop-uninstall-handoff.ts+++ b/packages/desktop/src/main/desktop-uninstall-handoff.ts@@ -8,6 +8,8 @@ import {shellQuote,} from './desktop-uninstall.ts';+import { UNINSTALL_PROGRESS_READY_TIMEOUT_MS } from './desktop-uninstall-result.ts';+interface DesktopUninstallHandoffInput extends DesktopUninstallCleanupInput {appBundlePath: string;parentPid: number;@@ -15,7 +17,9 @@ interface DesktopUninstallHandoffInput extends DesktopUninstallCleanupInput {}interface DesktopUninstallHandoffCommands {+ result?: readonly string[];ps?: string;+ psTimeoutSeconds?: number;sleep?: string;osascript?: string;open?: string;@@ -57,6 +61,7 @@ interface HandoffChild {}interface LaunchDesktopUninstallHandoffDeps {+ resultCommand?: readonly string[];spawn?: (command: string, args: readonly string[], options: object) => HandoffChild;readParentStartedAt?: () => string;}@@ -74,24 +79,84 @@ function buildDesktopUninstallResultFunctions(input: Pick<DesktopUninstallResultInput, 'logPath' | 'appBundlePath'>,commands: DesktopUninstallHandoffCommands,): string {+ const resultCommand = commands.result?.map(shellQuote).join(' ');+ const chooseAction = resultCommand+ ? `if [ -n "$result_pid" ]; then+ if printf '%s\\000' "$1" "$2" "$3" > "$profile/result.tmp" && /bin/mv "$profile/result.tmp" "$profile/result"; then+ wait "$result_pid"+ result_status=$?+ result_pid=''+ else+ result_status=1+ fi+ elif create_result_profile; then+ ${resultCommand} "--user-data-dir=$profile" --ok-uninstall-result "$1" "$2" "$3" >> "$LOG" 2>&1 &+ result_pid=$!+ wait "$result_pid"+ result_status=$?+ result_pid=''+ else+ result_status=1+ fi+ cleanup_result_ui+ trap - EXIT HUP INT TERM+ case "$result_status" in+ 0) return ;;+ 10) action='Cleanup log' ;;+ 11) action='Reveal in Finder' ;;+ *)+ printf 'Could not show the completion window (exit %s); using the system dialog.\\n' "$result_status" >> "$LOG"+ action=$("$OSASCRIPT" -e "$NOTICE_SCRIPT" "$1" "$2" "$3" 2>> "$LOG") || return+ ;;+ esac`+ : `action=$("$OSASCRIPT" -e "$NOTICE_SCRIPT" "$1" "$2" "$3" 2>> "$LOG") || return`;+ const progressFunctions = resultCommand+ ? `profile=''+result_pid=''++cleanup_result_ui() {+ if [ -n "$result_pid" ]; then+ kill -KILL "$result_pid" 2>/dev/null+ wait "$result_pid" 2>/dev/null+ result_pid=''+ fi+ if [ -n "$profile" ]; then /bin/rm -rf "$profile"; fi+}++create_result_profile() {+ profile=$(/usr/bin/mktemp -d "\${TMPDIR:-/tmp}/ok-uninstall-result.XXXXXX") || return 1+ trap cleanup_result_ui EXIT+ trap 'exit 1' HUP INT TERM+}++start_progress() {+ create_result_profile || return 1+ ${resultCommand} "--user-data-dir=$profile" --ok-uninstall-progress >> "$LOG" 2>&1 &+ result_pid=$!+ ready_attempts=0+ until [ -f "$profile/ready" ]; do+ if ! kill -0 "$result_pid" 2>/dev/null || [ "$ready_attempts" -ge ${Math.ceil(UNINSTALL_PROGRESS_READY_TIMEOUT_MS / 100)} ]; then+ printf 'The uninstall progress window did not become ready; no cleanup was started.\\n' >> "$LOG"+ return 1+ fi+ ready_attempts=$((ready_attempts + 1))+ "$SLEEP" 0.1 || return 1+ done+}+`+ : '';return `LOG=${shellQuote(input.logPath)}APP_BUNDLE=${shellQuote(input.appBundlePath)}OSASCRIPT=${shellQuote(commands.osascript ?? '/usr/bin/osascript')}OPEN=${shellQuote(commands.open ?? '/usr/bin/open')}NOTICE_SCRIPT=${shellQuote(NOTICE_SCRIPT)}-+${progressFunctions}show_result() {- while :; do- action=$("$OSASCRIPT" -e "$NOTICE_SCRIPT" "$1" "$2" "$3" 2>> "$LOG") || return- if [ "$action" = 'Cleanup log' ]; then- "$OPEN" -R "$LOG" 2>> "$LOG"- else- if [ "$action" = 'Reveal in Finder' ]; then- "$OPEN" -R "$APP_BUNDLE" 2>> "$LOG"- fi- return- fi- done+ ${chooseAction}+ case "$action" in+ 'Cleanup log') "$OPEN" -R "$LOG" 2>> "$LOG" ;;+ 'Reveal in Finder') "$OPEN" -R "$APP_BUNDLE" 2>> "$LOG" ;;+ esac}show_failure() {@@ -123,13 +188,18 @@ ${input.cleanup.ok ? 'show_success' : `show_failure ${shellQuote(input.cleanup.eexport async function showDesktopUninstallResult(input: DesktopUninstallResultInput,+ commands: DesktopUninstallHandoffCommands = {},): Promise<void> {await new Promise<void>((resolveResult, reject) => {- const child = spawnChild('/bin/sh', ['-c', buildDesktopUninstallResultScript(input)], {- cwd: '/',- stdio: 'ignore',- windowsHide: true,- });+ const child = spawnChild(+ '/bin/sh',+ ['-c', buildDesktopUninstallResultScript(input, commands)],+ {+ cwd: '/',+ stdio: 'ignore',+ windowsHide: true,+ },+ );child.once('error', reject);child.once('close', (code) => {if (code === 0) resolveResult();@@ -146,6 +216,10 @@ export function buildDesktopUninstallHandoffScript(throw new Error('Invalid uninstall parent process');}if (input.parentStartedAt.trim() === '') throw new Error('Missing uninstall parent identity');+ const psTimeoutSeconds = commands.psTimeoutSeconds ?? 5;+ if (!Number.isFinite(psTimeoutSeconds) || psTimeoutSeconds <= 0) {+ throw new Error('Invalid process-query timeout');+ }return `#!/bin/sh${buildDesktopUninstallResultFunctions(input, commands)}PARENT_PID=${input.parentPid}@@ -160,17 +234,71 @@ fail() {/bin/mkdir -p ${shellQuote(dirname(input.logPath))} || exit 1: >> "$LOG" || exit 1+${commands.result?.length ? 'start_progress || exit 1' : ''}printf '${HANDOFF_READY}\\n'exec 1>/dev/null+read_parent_start() (+ ps_probe=$(/usr/bin/mktemp -d "\${TMPDIR:-/tmp}/ok-uninstall-ps.XXXXXX") || exit 2+ ps_output="$ps_probe/output"+ ps_ready="$ps_probe/ready"+ ps_pid=''+ watchdog=''+ cleanup_probe() {+ if [ -n "$watchdog" ]; then kill "$watchdog" 2>/dev/null; wait "$watchdog" 2>/dev/null; fi+ if [ -n "$ps_pid" ]; then kill -KILL "$ps_pid" 2>/dev/null; wait "$ps_pid" 2>/dev/null; fi+ /bin/rm -rf "$ps_probe"+ }+ trap cleanup_probe EXIT+ trap 'exit 2' HUP INT TERM+ : > "$ps_output" || exit 2+ "$PS" -p "$PARENT_PID" -o lstart= > "$ps_output" 2>> "$LOG" &+ ps_pid=$!+ (+ stop_watchdog() {+ sleeper=$!+ if [ -n "$sleeper" ] && [ "$sleeper" != "$ps_pid" ]; then+ kill "$sleeper" 2>/dev/null+ wait "$sleeper" 2>/dev/null+ fi+ exit+ }+ trap stop_watchdog TERM+ : > "$ps_ready" || exit 2+ /bin/sleep ${shellQuote(String(psTimeoutSeconds))} &+ wait "$!"+ kill -KILL "$ps_pid" 2>/dev/null+ ) >/dev/null 2>&1 &+ watchdog=$!+ ready_attempts=0+ while [ ! -f "$ps_ready" ]; do+ if [ "$ready_attempts" -ge 500 ]; then+ kill -KILL "$watchdog" 2>/dev/null+ wait "$watchdog" 2>/dev/null+ watchdog=''+ exit 2+ fi+ ready_attempts=$((ready_attempts + 1))+ /bin/sleep 0.01 || exit 2+ done+ wait "$ps_pid" 2>/dev/null+ ps_status=$?+ ps_pid=''+ /bin/cat "$ps_output" 2>> "$LOG" || exit 2+ exit "$ps_status"+)+attempts=0while :; do- current_start=$("$PS" -p "$PARENT_PID" -o lstart= 2>> "$LOG")+ current_start=$(read_parent_start)status=$?if [ "$status" -eq 1 ] && [ -z "$current_start" ]; thenbreakfi- if [ "$status" -ne 0 ] || [ -z "$current_start" ]; then- fail 'Could not verify that OpenKnowledge stopped; no cleanup was started.'+ if [ "$status" -ne 0 ]; then+ fail "Could not verify that OpenKnowledge stopped (process query exit $status); no cleanup was started."+ fi+ if [ -z "$current_start" ]; then+ fail "Could not verify that OpenKnowledge stopped (process query returned no start time); no cleanup was started."ficurrent_start=$(printf '%s' "$current_start" | /usr/bin/sed 's/^[[:space:]]*//;s/[[:space:]]*$//')if [ "$current_start" != "$PARENT_STARTED_AT" ]; then@@ -206,11 +334,14 @@ export async function launchDesktopUninstallHandoff(windowsHide: true,}).trim();const spawn = deps.spawn ?? spawnChild;- const script = buildDesktopUninstallHandoffScript({- ...input,- parentPid: process.pid,- parentStartedAt,- });+ const script = buildDesktopUninstallHandoffScript(+ {+ ...input,+ parentPid: process.pid,+ parentStartedAt,+ },+ { result: deps.resultCommand },+ );return await new Promise((resolveResult) => {const child = spawn('/bin/sh', ['-c', script], {cwd: '/',@@ -225,10 +356,13 @@ export async function launchDesktopUninstallHandoff(}let settled = false;let output = '';- const timeout = setTimeout(() => {- child.kill();- finish({ ok: false, error: 'The cleanup helper did not become ready.' });- }, 5000);+ const timeout = setTimeout(+ () => {+ child.kill();+ finish({ ok: false, error: 'The cleanup helper did not become ready.' });+ },+ deps.resultCommand?.length ? UNINSTALL_PROGRESS_READY_TIMEOUT_MS + 10_000 : 5000,+ );const finish = (result: RunDesktopUninstallCleanupResult) => {if (settled) return;settled = true;diff --git a/packages/desktop/src/main/desktop-uninstall-result-window.ts b/packages/desktop/src/main/desktop-uninstall-result-window.tsnew file mode 100644index 000000000..a3309677d--- /dev/null+++ b/packages/desktop/src/main/desktop-uninstall-result-window.ts@@ -0,0 +1,210 @@+import { existsSync, readFileSync, writeFileSync } from 'node:fs';+import { dirname, join } from 'node:path';+import { fileURLToPath } from 'node:url';+import { UNINSTALL_RESULT_WAIT_TIMEOUT_MS } from '@inkeep/open-knowledge-core';+import { app, BrowserWindow, ipcMain, nativeTheme } from 'electron';+import pino from 'pino';+import { createHandler } from '../shared/ipc-handler.ts';+import { UNINSTALL_PRELOAD_ARG } from '../shared/uninstall-preload-arg.ts';+import {+ type DesktopUninstallWindowOptions,+ desktopUninstallResultScreen,+ parseDesktopUninstallResultMessage,+ UNINSTALL_PROGRESS_READY_TIMEOUT_MS,+} from './desktop-uninstall-result.ts';+import {+ loadUninstallEntry,+ resolveUninstallEntryTarget,+ resolveUninstallWindowTheme,+} from './uninstall-window.ts';++const UNINSTALL_RENDERER_SILENCE_MS = 60_000;+const UNINSTALL_RESULT_NOTICE_DWELL_MS = 60_000;++export async function runDesktopUninstallResultWindow(+ options: DesktopUninstallWindowOptions,+): Promise<void> {+ const log = pino({ name: 'uninstall-result' }, pino.destination(2));+ try {+ await app.whenReady();+ const mainDir = dirname(fileURLToPath(import.meta.url));+ let result = options.kind === 'result' ? options : null;+ let progressShown = false;+ let progressReady = false;+ const win = new BrowserWindow({+ width: result === null ? 420 : 480,+ height: result === null ? 220 : 420,+ minWidth: 400,+ minHeight: result === null ? 220 : 360,+ resizable: result !== null,+ frame: false,+ show: false,+ minimizable: false,+ maximizable: false,+ fullscreenable: false,+ title: result?.title ?? 'Uninstalling OpenKnowledge',+ backgroundColor: nativeTheme.shouldUseDarkColors ? '#181818' : '#ffffff',+ webPreferences: {+ preload: join(mainDir, '../preload/index.js'),+ additionalArguments: [UNINSTALL_PRELOAD_ARG],+ partition: 'ok-uninstall-result',+ sandbox: true,+ contextIsolation: true,+ nodeIntegration: false,+ backgroundThrottling: false,+ },+ });+ let finished = false;+ let lastReadyAt = Date.now();+ let progressReadyAt = Date.now();+ let silenceTimeout: ReturnType<typeof setTimeout> | undefined;+ let resultTimeout: ReturnType<typeof setTimeout> | undefined;+ const finish = (code: number) => {+ if (finished) return;+ finished = true;+ clearTimeout(timeout);+ clearTimeout(resultTimeout);+ clearTimeout(silenceTimeout);+ app.exit(code);+ };+ const timeout = setTimeout(() => {+ log.error('The completion window did not become ready.');+ finish(1);+ }, UNINSTALL_PROGRESS_READY_TIMEOUT_MS);+ win.setMenu(null);+ win.webContents.setWindowOpenHandler(() => ({ action: 'deny' }));+ win.webContents.on('will-navigate', (event) => event.preventDefault());+ win.webContents.on('render-process-gone', (_event, details) => {+ log.error({ reason: details.reason }, 'The completion renderer exited unexpectedly.');+ finish(1);+ });+ const failResultWait = (reason: 'renderer-silent' | 'deadline') => {+ log.error(+ {+ reason,+ waitedMs: Date.now() - progressReadyAt,+ msSinceLastReadyRequest: Date.now() - lastReadyAt,+ resultFilePresent: existsSync(join(options.profile, 'result')),+ },+ 'The completion window stopped waiting for the uninstall result.',+ );+ finish(1);+ };+ const watchRenderer = () => {+ clearTimeout(silenceTimeout);+ if (!progressReady || result !== null || finished) return;+ silenceTimeout = setTimeout(+ () => failResultWait('renderer-silent'),+ UNINSTALL_RENDERER_SILENCE_MS,+ );+ };+ const reportProgressReady = () => {+ if (!progressShown || progressReady || !win.isVisible()) return;+ try {+ writeFileSync(join(options.profile, 'ready'), 'ready');+ progressReady = true;+ progressReadyAt = Date.now();+ lastReadyAt = progressReadyAt;+ watchRenderer();+ clearTimeout(timeout);+ resultTimeout = setTimeout(() => {+ if (result !== null) return;+ failResultWait('deadline');+ }, UNINSTALL_RESULT_WAIT_TIMEOUT_MS + UNINSTALL_RESULT_NOTICE_DWELL_MS);+ } catch (error) {+ log.error({ err: error }, 'Could not report uninstall progress readiness.');+ finish(1);+ }+ };+ win.once('closed', () => finish(result === null ? 1 : 0));+ win.once('ready-to-show', () => {+ win.show();+ win.focus();+ app.focus({ steal: true });+ reportProgressReady();+ });+ createHandler(ipcMain)('ok:uninstall:dispatch', (event, request) => {+ if (event.sender.id !== win.webContents.id)+ return { kind: 'refused', reason: 'unknown-window' };+ switch (request?.kind) {+ case 'ready': {+ lastReadyAt = Date.now();+ watchRenderer();+ if (result === null) {+ try {+ const content = readFileSync(join(options.profile, 'result'), 'utf8');+ const parsed = parseDesktopUninstallResultMessage(content);+ if (parsed === null) throw new Error('Invalid uninstall result.');+ result = { ...parsed, profile: options.profile, kind: 'result' };+ win.setMinimumSize(400, 360);+ win.setSize(480, 420);+ win.setResizable(true);+ win.setTitle(result.title);+ } catch (error) {+ if (+ !(error instanceof Error && 'code' in error && error.code === 'ENOENT') ||+ !existsSync(options.profile)+ ) {+ log.error({ err: error }, 'Could not read the uninstall result.');+ finish(1);+ }+ }+ }+ if (result === null)+ return { kind: 'screen', screen: { kind: 'progress', awaitResult: true } };+ clearTimeout(timeout);+ clearTimeout(resultTimeout);+ clearTimeout(silenceTimeout);+ return {+ kind: 'screen',+ screen: desktopUninstallResultScreen(result),+ };+ }+ case 'progress-shown':+ progressShown = true;+ reportProgressReady();+ return { kind: 'accepted' };+ case 'notice-confirm': {+ if (result === null) return { kind: 'refused', reason: 'invalid-intent' };+ const code = result.actionLabel === 'Reveal in Finder' ? 11 : 0;+ setImmediate(() => finish(code));+ return { kind: 'accepted' };+ }+ case 'notice-cancel':+ if (result === null) return { kind: 'refused', reason: 'invalid-intent' };+ setImmediate(() => finish(0));+ return { kind: 'accepted' };+ case 'notice-reveal-log':+ if (result === null) return { kind: 'refused', reason: 'invalid-intent' };+ setImmediate(() => finish(10));+ return { kind: 'accepted' };+ case 'picker-confirm':+ case 'picker-cancel':+ case 'survey-send':+ case 'survey-skip':+ return { kind: 'refused', reason: 'invalid-intent' };+ default: {+ const exhaustive: never = request;+ log.warn({ request: exhaustive }, 'Unrecognized uninstall intent.');+ return { kind: 'refused', reason: 'invalid-intent' };+ }+ }+ });+ await loadUninstallEntry(+ win,+ resolveUninstallEntryTarget(+ {+ devServerUrl: null,+ isPackaged: app.isPackaged,+ resourcesPath: process.resourcesPath,+ mainDir,+ },+ resolveUninstallWindowTheme(nativeTheme.shouldUseDarkColors),+ options.locale,+ ),+ );+ } catch (error) {+ log.error({ err: error }, 'Could not load the uninstall completion window.');+ app.exit(1);+ }+}diff --git a/packages/desktop/src/main/desktop-uninstall-result.ts b/packages/desktop/src/main/desktop-uninstall-result.tsnew file mode 100644index 000000000..9bd913aa7--- /dev/null+++ b/packages/desktop/src/main/desktop-uninstall-result.ts@@ -0,0 +1,73 @@+import { isAbsolute } from 'node:path';+import {+ SUPPORTED_LOCALES,+ type SupportedLocale,+ type UninstallScreenSpec,+} from '@inkeep/open-knowledge-core';++export const UNINSTALL_PROGRESS_READY_TIMEOUT_MS = 30_000;++export const UNINSTALL_RESULT_ARG = '--ok-uninstall-result';+export const UNINSTALL_PROGRESS_ARG = '--ok-uninstall-progress';++export interface DesktopUninstallResultOptions {+ profile: string;+ locale?: SupportedLocale;+ title: string;+ text: string;+ actionLabel: 'Reveal in Finder' | 'Close';+}++export type DesktopUninstallWindowOptions =+ | (DesktopUninstallResultOptions & { kind: 'result' })+ | { profile: string; kind: 'progress'; locale?: SupportedLocale };++export function parseDesktopUninstallResultArgs(+ argv: readonly string[],+): DesktopUninstallWindowOptions | null {+ const profile = argv.find((arg) => arg.startsWith('--user-data-dir='))?.slice(16);+ if (!profile || !isAbsolute(profile)) return null;+ const rawLocale = argv.find((arg) => arg.startsWith('--ok-uninstall-locale='))?.slice(22);+ const locale = SUPPORTED_LOCALES.find((value) => value === rawLocale);+ if (rawLocale !== undefined && locale === undefined) return null;+ const language = locale === undefined ? {} : { locale };+ if (argv.includes(UNINSTALL_PROGRESS_ARG)) {+ return argv.includes(UNINSTALL_RESULT_ARG) ? null : { profile, kind: 'progress', ...language };+ }+ const index = argv.indexOf(UNINSTALL_RESULT_ARG);+ if (index < 0) return null;+ const result = parseDesktopUninstallResultMessage(`${argv.slice(index + 1).join('\0')}\0`);+ return result === null ? null : { ...result, profile, kind: 'result', ...language };+}++export function parseDesktopUninstallResultMessage(+ message: string,+): Omit<DesktopUninstallResultOptions, 'profile'> | null {+ const fields = message.split('\0');+ const [title, text, actionLabel, end] = fields;+ if (+ fields.length !== 4 ||+ end !== '' ||+ !title ||+ !text ||+ (actionLabel !== 'Reveal in Finder' && actionLabel !== 'Close')+ )+ return null;+ return { title, text, actionLabel };+}++export function desktopUninstallResultCommand(+ executable: string,+ isPackaged: boolean,+ appPath: string,+ locale?: SupportedLocale,+): string[] {+ const command = isPackaged ? [executable] : [executable, appPath];+ return locale === undefined ? command : [...command, `--ok-uninstall-locale=${locale}`];+}++export function desktopUninstallResultScreen(+ options: Pick<DesktopUninstallResultOptions, 'actionLabel'>,+): UninstallScreenSpec {+ return { kind: 'result', outcome: options.actionLabel === 'Close' ? 'failure' : 'success' };+}diff --git a/packages/desktop/src/main/entry.ts b/packages/desktop/src/main/entry.tsnew file mode 100644index 000000000..00db22713--- /dev/null+++ b/packages/desktop/src/main/entry.ts@@ -0,0 +1,26 @@+import { app } from 'electron';+import {+ parseDesktopUninstallResultArgs,+ UNINSTALL_PROGRESS_ARG,+ UNINSTALL_RESULT_ARG,+} from './desktop-uninstall-result.ts';++if (process.argv.includes(UNINSTALL_RESULT_ARG) || process.argv.includes(UNINSTALL_PROGRESS_ARG)) {+ const options = parseDesktopUninstallResultArgs(process.argv);+ if (options === null) {+ process.stderr.write(+ 'Invalid uninstall handoff arguments: expected an absolute profile, a supported locale, and one progress or result mode.\n',+ );+ app.exit(1);+ } else {+ for (const path of ['appData', 'userData', 'sessionData', 'logs', 'crashDumps'] as const) {+ app.setPath(path, options.profile);+ }+ const { runDesktopUninstallResultWindow } = await import(+ './desktop-uninstall-result-window.ts'+ );+ void runDesktopUninstallResultWindow(options);+ }+} else {+ await import('./index.ts');+}diff --git a/packages/desktop/src/main/index.ts b/packages/desktop/src/main/index.tsindex 9666a8711..0d1277df4 100644--- a/packages/desktop/src/main/index.ts+++ b/packages/desktop/src/main/index.ts@@ -262,6 +262,7 @@ import {runDesktopUninstallHandoffStep,showDesktopUninstallResult,} from './desktop-uninstall-handoff.ts';+import { desktopUninstallResultCommand } from './desktop-uninstall-result.ts';import { promptForExistingFolder, promptForExistingMarkdownFile } from './dialog-helpers.ts';import {type DriverUtilityLike,@@ -2849,12 +2850,28 @@ async function startDesktopSelfUninstallFlow(): Promise<void> {collectFeedback: collectDesktopUninstallFeedback,launchHandoff: () =>withDesktopUninstallProgress(() =>- launchDesktopUninstallHandoff({- cliPath: wrapperPathInBundle(process.execPath),- projectPaths,- logPath,- appBundlePath,- }),+ launchDesktopUninstallHandoff(+ {+ cliPath: wrapperPathInBundle(process.execPath),+ projectPaths,+ logPath,+ appBundlePath,+ },+ {+ resultCommand: desktopUninstallResultCommand(+ process.execPath,+ app.isPackaged,+ app.getAppPath(),+ resolveDesktopLocaleForPushed(+ pushedLanguagePreference ?? readStoredLanguagePreference(osHomedir()),+ {+ preferredSystemLanguages: () => app.getPreferredSystemLanguages(),+ env: process.env,+ },+ ),+ ),+ },+ ),),showFailure: async ({ error }) => {getLogger('lifecycle').warn(@@ -3078,14 +3095,19 @@ async function runDesktopUninstallUiPreview(mode: DesktopUninstallFlowPreviewMod},suppressAutoInstallOnQuit: () => {},quit: () =>- showDesktopUninstallResult({- appBundlePath: resolveAppBundleFromExecPath(process.execPath) ?? process.execPath,- logPath,- cleanup:- mode === 'failure'- ? { ok: false, error: 'Simulated cleanup failure (preview) — nothing was removed.' }- : { ok: true },- }),+ showDesktopUninstallResult(+ {+ appBundlePath: resolveAppBundleFromExecPath(process.execPath) ?? process.execPath,+ logPath,+ cleanup:+ mode === 'failure'+ ? { ok: false, error: 'Simulated cleanup failure (preview) — nothing was removed.' }+ : { ok: true },+ },+ {+ result: desktopUninstallResultCommand(process.execPath, app.isPackaged, app.getAppPath()),+ },+ ),});log.warn({ mode }, 'desktop uninstall UI preview finished — OpenKnowledge is still installed');diff --git a/packages/desktop/src/main/uninstall-ipc.ts b/packages/desktop/src/main/uninstall-ipc.tsindex aa3056273..cbc192a98 100644--- a/packages/desktop/src/main/uninstall-ipc.ts+++ b/packages/desktop/src/main/uninstall-ipc.ts@@ -29,12 +29,14 @@ function normalizeSelectedIndexes(raw: unknown): number[] {}const RECOGNIZED_UNINSTALL_INTENT_KINDS = {+ 'progress-shown': true,'picker-confirm': true,'picker-cancel': true,'survey-send': true,'survey-skip': true,'notice-confirm': true,'notice-cancel': true,+ 'notice-reveal-log': true,} satisfies Record<UninstallIntent['kind'], true>;function isRecognizedUninstallIntentKind(value: unknown): value is UninstallIntent['kind'] {@@ -45,6 +47,8 @@ export function normalizeUninstallIntent(raw: unknown): UninstallIntent | null {if (!isRecord(raw)) return null;if (!isRecognizedUninstallIntentKind(raw.kind)) return null;switch (raw.kind) {+ case 'progress-shown':+ return { kind: 'progress-shown' };case 'picker-confirm':return {kind: 'picker-confirm',@@ -58,6 +62,8 @@ export function normalizeUninstallIntent(raw: unknown): UninstallIntent | null {return { kind: 'survey-skip' };case 'notice-confirm':return { kind: 'notice-confirm' };+ case 'notice-reveal-log':+ return { kind: 'notice-reveal-log' };case 'notice-cancel':return { kind: 'notice-cancel' };default: {diff --git a/packages/desktop/src/main/uninstall-window.ts b/packages/desktop/src/main/uninstall-window.tsindex 401fd47ff..aa9461d78 100644--- a/packages/desktop/src/main/uninstall-window.ts+++ b/packages/desktop/src/main/uninstall-window.ts@@ -1,4 +1,5 @@import { join } from 'node:path';+import type { SupportedLocale } from '@inkeep/open-knowledge-core';export type UninstallWindowTheme = 'light' | 'dark';@@ -28,12 +29,13 @@ export function noticeCloseIsConfirm(spec: { readonly cancelLabel?: string }): bexport function resolveUninstallEntryTarget(deps: UninstallEntryDeps,theme: UninstallWindowTheme,+ locale?: SupportedLocale,): UninstallEntryTarget {if (deps.devServerUrl !== null && deps.devServerUrl !== '') {const origin = deps.devServerUrl.replace(/\/+$/, '');return {kind: 'url',- url: `${origin}/${UNINSTALL_HTML}?${UNINSTALL_THEME_QUERY_KEY}=${theme}`,+ url: `${origin}/${UNINSTALL_HTML}?${UNINSTALL_THEME_QUERY_KEY}=${theme}${locale === undefined ? '' : `&locale=${locale}`}`,};}return {@@ -41,7 +43,7 @@ export function resolveUninstallEntryTarget(path: deps.isPackaged? join(deps.resourcesPath, 'app', UNINSTALL_HTML): join(deps.mainDir, '..', 'renderer', UNINSTALL_HTML),- query: { [UNINSTALL_THEME_QUERY_KEY]: theme },+ query: { [UNINSTALL_THEME_QUERY_KEY]: theme, ...(locale === undefined ? {} : { locale }) },};}diff --git a/packages/desktop/tests/main/desktop-uninstall-handoff.test.ts b/packages/desktop/tests/main/desktop-uninstall-handoff.test.tsindex 13f05662b..fe76328e6 100644--- a/packages/desktop/tests/main/desktop-uninstall-handoff.test.ts+++ b/packages/desktop/tests/main/desktop-uninstall-handoff.test.ts@@ -1,6 +1,14 @@-import { execFileSync, spawn } from 'node:child_process';+import { execFileSync, spawn, spawnSync } from 'node:child_process';import { EventEmitter, once } from 'node:events';-import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';+import {+ existsSync,+ mkdirSync,+ mkdtempSync,+ readdirSync,+ readFileSync,+ rmSync,+ writeFileSync,+} from 'node:fs';import { tmpdir } from 'node:os';import { join } from 'node:path';import { PassThrough } from 'node:stream';@@ -193,6 +201,25 @@ describe('desktop uninstall handoff readiness', () => {expect(child.unref).not.toHaveBeenCalled();});+ test('allows the progress renderer to start before applying the bounded readiness timeout', async () => {+ vi.useFakeTimers();+ try {+ const child = new Child();+ const launched = launchDesktopUninstallHandoff(input, {+ spawn: () => child,+ readParentStartedAt: () => 'original process',+ resultCommand: ['/owned/Electron'],+ });+ await vi.advanceTimersByTimeAsync(5000);+ expect(child.kill).not.toHaveBeenCalled();+ await vi.advanceTimersByTimeAsync(35_000);+ await expect(launched).resolves.toMatchObject({ ok: false });+ expect(child.kill).toHaveBeenCalledOnce();+ } finally {+ vi.useRealTimers();+ }+ });+test('stops a helper that never becomes ready', async () => {vi.useFakeTimers();try {@@ -400,3 +427,383 @@ describe.skipIf(process.platform === 'win32')('desktop cleanup result', () => {},);});++describe.skipIf(process.platform === 'win32')('result dialog dismissal', () => {+ test.each([+ [true, 'Cleanup log', false],+ [false, 'Cleanup log', false],+ [true, 'Reveal in Finder', false],+ [false, 'Close', false],+ [true, 'Cleanup log', true],+ [false, 'Cleanup log', true],+ ] as const)('dismisses once (ok=%s, action=%s, revealFails=%s)', (ok, action, revealFails) => {+ const f = fixture();+ const logPath = join(f.dir, 'cleanup.log');+ const appBundlePath = join(f.dir, 'OpenKnowledge.app');+ mkdirSync(appBundlePath);+ const count = join(f.dir, 'count');+ const commands = {+ ps: f.executable('ps', 'exit 1'),+ osascript: f.executable(+ 'notice-once',+ `+if [ -f '${count}' ]; then+ printf 'dialog-again\\n' >> '${f.events}'+ printf 'Close\\n'+else+ touch '${count}'+ printf 'dialog\\n' >> '${f.events}'+ printf '%s\\n' '${action}'+fi`,+ ),+ open: f.executable(+ 'reveal-result',+ `printf 'reveal:%s\\n' "$2" >> '${f.events}'+${revealFails ? "printf 'Finder unavailable\\n' >&2\nexit 7" : 'exit 0'}`,+ ),+ };+ const script = buildDesktopUninstallHandoffScript(+ {+ cliPath: f.executable(+ 'cleanup-once',+ `printf 'cleanup\\n' >> '${f.events}'\nexit ${ok ? 0 : 31}`,+ ),+ projectPaths: [],+ logPath,+ appBundlePath,+ parentPid: 123,+ parentStartedAt: 'original',+ },+ commands,+ );+ const result = spawnSync('/bin/sh', ['-c', script], { timeout: 5000 });+ expect(result.error).toBeUndefined();+ expect(result.status).toBe(ok ? 0 : 1);+ const events = readFileSync(f.events, 'utf8').trim().split('\n');+ expect(events.filter((event) => event.startsWith('dialog'))).toEqual(['dialog']);+ expect(events.filter((event) => event === 'cleanup')).toEqual(['cleanup']);+ expect(events.filter((event) => event.startsWith('reveal:'))).toEqual(+ action === 'Close' ? [] : [`reveal:${action === 'Cleanup log' ? logPath : appBundlePath}`],+ );+ const log = readFileSync(logPath, 'utf8');+ expect(log).toContain(`Cleanup result: ${ok ? 'succeeded' : 'failed'}`);+ expect(log).not.toContain(`Cleanup result: ${ok ? 'failed' : 'succeeded'}`);+ if (revealFails) expect(log).toContain('Finder unavailable');+ });+});++describe.skipIf(process.platform === 'win32')('rendered uninstall result handoff', () => {+ test.each([+ [true, 0, undefined],+ [true, 10, 'log'],+ [true, 11, 'app'],+ [false, 0, undefined],+ [false, 10, 'log'],+ ] as const)(+ 'waits for the result window to exit before revealing (ok=%s, result=%s)',+ (ok, result, reveal) => {+ const f = fixture();+ const logPath = join(f.dir, 'cleanup.log');+ const appBundlePath = join(f.dir, 'OpenKnowledge.app');+ const commands = {+ ...f.commands,+ ps: f.executable('ps', 'exit 1'),+ result: [+ f.executable(+ 'result-ui',+ `profile="${'$'}{1#--user-data-dir=}"+printf '%s' "$profile" > '${f.dir}/profile-path'+if [ "$2" = '--ok-uninstall-progress' ]; then+ printf 'progress-ui\\n' >> '${f.events}'+ touch "$profile/ready"+ while [ ! -f "$profile/result" ]; do /bin/sleep 0.01; done+ cp "$profile/result" '${f.dir}/result'+fi+printf 'result-ui\\nresult-exited\\n' >> '${f.events}'+exit ${result}`,+ ),+ ],+ open: f.executable('finder', `printf 'reveal:%s\\n' "$2" >> '${f.events}'`),+ };+ const script = buildDesktopUninstallHandoffScript(+ {+ cliPath: f.executable('cli', `printf 'cleanup\\n' >> '${f.events}'\nexit ${ok ? 0 : 1}`),+ projectPaths: [],+ logPath,+ appBundlePath,+ parentPid: 123,+ parentStartedAt: 'old',+ },+ commands,+ );+ const outcome = spawnSync('/bin/sh', ['-c', script], { encoding: 'utf8' });+ expect(outcome.status).toBe(ok ? 0 : 1);+ const events = readFileSync(f.events, 'utf8').trim().split('\n');+ expect(events).toEqual([+ 'progress-ui',+ 'cleanup',+ 'result-ui',+ 'result-exited',+ ...(reveal ? [`reveal:${reveal === 'log' ? logPath : appBundlePath}`] : []),+ ]);+ expect(readFileSync(join(f.dir, 'result'), 'utf8').split('\0')[0]).toBe(+ ok ? 'OpenKnowledge files were removed' : 'Cleanup didn’t finish',+ );+ const profile = readFileSync(join(f.dir, 'profile-path'), 'utf8');+ expect(profile).not.toBe('');+ expect(existsSync(profile)).toBe(false);+ expect(readFileSync(logPath, 'utf8')).toContain(+ `Cleanup result: ${ok ? 'succeeded' : 'failed'}`,+ );+ },+ );+});++describe.skipIf(process.platform === 'win32')('continuous uninstall progress', () => {+ test('keeps the original app open and does no cleanup if the progress window cannot start', () => {+ const f = fixture();+ const outcome = spawnSync(+ '/bin/sh',+ [+ '-c',+ buildDesktopUninstallHandoffScript(+ {+ cliPath: f.executable('cli', `printf 'cleanup\\n' >> '${f.events}'`),+ projectPaths: [],+ logPath: join(f.dir, 'cleanup.log'),+ appBundlePath: '/Applications/OpenKnowledge.app',+ parentPid: 123,+ parentStartedAt: 'old',+ },+ {+ ...f.commands,+ ps: f.executable('ps', 'exit 1'),+ result: [+ f.executable(+ 'broken-ui',+ `printf '%s' "${'$'}{1#--user-data-dir=}" > '${f.dir}/profile-path'\nexit 7`,+ ),+ ],+ },+ ),+ ],+ { encoding: 'utf8', timeout: 5000 },+ );+ expect(outcome.status).toBe(1);+ expect(outcome.stdout).not.toContain('OK_UNINSTALL_READY');+ expect(existsSync(f.events)).toBe(false);+ expect(existsSync(readFileSync(join(f.dir, 'profile-path'), 'utf8'))).toBe(false);+ });+});++describe.skipIf(process.platform === 'win32')('progress window failure boundaries', () => {+ test('falls back once when the progress process dies and preserves a cleanup failure', () => {+ const f = fixture();+ const outcome = spawnSync(+ '/bin/sh',+ [+ '-c',+ buildDesktopUninstallHandoffScript(+ {+ cliPath: f.executable(+ 'cli',+ `touch '${f.dir}/cleaning'\nprintf 'cleanup\\n' >> '${f.events}'\nexit 31`,+ ),+ projectPaths: [],+ logPath: join(f.dir, 'cleanup.log'),+ appBundlePath: '/Applications/OpenKnowledge.app',+ parentPid: 123,+ parentStartedAt: 'old',+ },+ {+ ...f.commands,+ ps: f.executable('ps', 'exit 1'),+ result: [+ f.executable(+ 'crashing-ui',+ `profile="${'$'}{1#--user-data-dir=}"+printf '%s' "$profile" > '${f.dir}/profile-path'+touch "$profile/ready"+while [ ! -f '${f.dir}/cleaning' ]; do /bin/sleep 0.01; done+exit 7`,+ ),+ ],+ },+ ),+ ],+ { encoding: 'utf8', timeout: 5000 },+ );+ expect(outcome.status).toBe(1);+ const events = readFileSync(f.events, 'utf8');+ expect(events.match(/cleanup\n/g)).toHaveLength(1);+ expect(events.match(/-e on run argv/g)).toHaveLength(1);+ expect(events).toContain('Cleanup didn’t finish');+ expect(events).not.toContain('OpenKnowledge files were removed');+ expect(existsSync(readFileSync(join(f.dir, 'profile-path'), 'utf8'))).toBe(false);+ });++ test('reaps its own progress process and profile if the handoff is interrupted', async () => {+ const f = fixture();+ const script = buildDesktopUninstallHandoffScript(+ {+ cliPath: f.executable('cli', `touch '${f.dir}/cleaning'`),+ projectPaths: [],+ logPath: join(f.dir, 'cleanup.log'),+ appBundlePath: '/Applications/OpenKnowledge.app',+ parentPid: 123,+ parentStartedAt: 'old',+ },+ {+ ...f.commands,+ ps: f.executable('ps', "printf 'old'"),+ result: [+ f.executable(+ 'waiting-ui',+ `profile="${'$'}{1#--user-data-dir=}"+printf '%s' "$profile" > '${f.dir}/profile-path'+printf '%s' "$$" > '${f.dir}/ui-pid'+touch "$profile/ready"+exec /bin/sleep 60`,+ ),+ ],+ },+ );+ const child = spawn('/bin/sh', ['-c', script], { stdio: ['ignore', 'pipe', 'ignore'] });+ try {+ await once(child.stdout, 'data');+ const closed = once(child, 'close');+ child.kill('SIGTERM');+ await closed;+ const pid = Number(readFileSync(join(f.dir, 'ui-pid'), 'utf8'));+ expect(() => process.kill(pid, 0)).toThrow();+ expect(existsSync(readFileSync(join(f.dir, 'profile-path'), 'utf8'))).toBe(false);+ expect(existsSync(join(f.dir, 'cleaning'))).toBe(false);+ } finally {+ if (child.exitCode === null) child.kill('SIGTERM');+ }+ });+});++test.skipIf(!existsSync('/bin/dash')).each([+ { state: 'empty', ps: 'exit 0', status: 1, cleanup: false },+ { state: 'absent', ps: 'exit 1', status: 0, cleanup: true },+ { state: 'reused', ps: "printf 'replacement'", status: 0, cleanup: true },+])(+ 'reaps the query watchdog promptly under dash when the parent is $state',+ ({ ps, status, cleanup }) => {+ const f = fixture();+ const script = buildDesktopUninstallHandoffScript(+ {+ cliPath: f.executable('cli', `touch '${f.dir}/cleanup-ran'`),+ projectPaths: [],+ logPath: join(f.dir, 'cleanup.log'),+ appBundlePath: '/owned/App.app',+ parentPid: 123,+ parentStartedAt: 'original',+ },+ { ...f.commands, ps: f.executable('ps', ps) },+ );+ for (let attempt = 0; attempt < 20; attempt++) {+ const result = spawnSync('/bin/dash', ['-c', script], {+ encoding: 'utf8',+ timeout: 3000,+ env: { ...process.env, TMPDIR: f.dir },+ });+ expect(result.error).toBeUndefined();+ expect(result.status).toBe(status);+ }+ expect(existsSync(join(f.dir, 'cleanup-ran'))).toBe(cleanup);+ expect(readdirSync(f.dir).filter((name) => name.startsWith('ok-uninstall-ps.'))).toEqual([]);+ },+);++test.skipIf(process.platform === 'win32')(+ 'fails closed when process-query output cannot be read',+ () => {+ const f = fixture();+ const script = buildDesktopUninstallHandoffScript(+ {+ cliPath: f.executable('cli', `touch '${f.dir}/cleanup-ran'`),+ projectPaths: [],+ logPath: join(f.dir, 'cleanup.log'),+ appBundlePath: '/owned/App.app',+ parentPid: 123,+ parentStartedAt: 'original',+ },+ {+ ...f.commands,+ ps: f.executable(+ 'ps',+ `for probe in '${f.dir}'/ok-uninstall-ps.*; do /bin/rm -f "$probe/output"; done+exit 1`,+ ),+ },+ );+ const result = spawnSync('/bin/sh', ['-c', script], {+ encoding: 'utf8',+ timeout: 3000,+ env: { ...process.env, TMPDIR: f.dir },+ });+ expect(result.error).toBeUndefined();+ expect(result.status).toBe(1);+ expect(existsSync(join(f.dir, 'cleanup-ran'))).toBe(false);+ expect(readFileSync(f.events, 'utf8')).toContain('Could not verify that OpenKnowledge stopped');+ expect(readdirSync(f.dir).filter((name) => name.startsWith('ok-uninstall-ps.'))).toEqual([]);+ },+);++test.skipIf(process.platform === 'win32')(+ 'bounds a stuck parent identity query without starting cleanup',+ () => {+ const f = fixture();+ const script = buildDesktopUninstallHandoffScript(+ {+ cliPath: f.executable('cli', `printf 'cleanup\\n' >> '${f.events}'`),+ projectPaths: [],+ logPath: join(f.dir, 'cleanup.log'),+ appBundlePath: '/owned/App.app',+ parentPid: 123,+ parentStartedAt: 'original',+ },+ { ...f.commands, ps: f.executable('ps', 'exec /bin/sleep 30'), psTimeoutSeconds: 0.05 },+ );+ const result = spawnSync('/bin/sh', ['-c', script], {+ encoding: 'utf8',+ timeout: 3000,+ env: { ...process.env, TMPDIR: f.dir },+ });+ expect(result.error).toBeUndefined();+ expect(result.status).toBe(1);+ expect(readdirSync(f.dir).filter((name) => name.startsWith('ok-uninstall-ps.'))).toEqual([]);+ expect(readFileSync(f.events, 'utf8')).toContain('Could not verify that OpenKnowledge stopped');+ expect(readFileSync(f.events, 'utf8')).not.toContain('cleanup\n');+ },+);++test.skipIf(process.platform === 'win32')(+ 'reports empty successful process-query output without running cleanup',+ () => {+ const f = fixture();+ const script = buildDesktopUninstallHandoffScript(+ {+ cliPath: f.executable('cli', `touch '${f.dir}/cleanup-ran'`),+ projectPaths: [],+ logPath: join(f.dir, 'cleanup.log'),+ appBundlePath: '/owned/App.app',+ parentPid: 123,+ parentStartedAt: 'original',+ },+ { ...f.commands, ps: f.executable('ps', 'exit 0') },+ );+ const result = spawnSync('/bin/sh', ['-c', script], {+ encoding: 'utf8',+ timeout: 3000,+ env: { ...process.env, TMPDIR: f.dir },+ });+ expect(result.error).toBeUndefined();+ expect(result.status).toBe(1);+ expect(readFileSync(f.events, 'utf8')).toContain('process query returned no start time');+ expect(readFileSync(f.events, 'utf8')).not.toContain('process query exit 0');+ expect(existsSync(join(f.dir, 'cleanup-ran'))).toBe(false);+ },+);diff --git a/packages/desktop/tests/main/desktop-uninstall-result-window.test.ts b/packages/desktop/tests/main/desktop-uninstall-result-window.test.tsnew file mode 100644index 000000000..cbb2e5da2--- /dev/null+++ b/packages/desktop/tests/main/desktop-uninstall-result-window.test.ts@@ -0,0 +1,127 @@+import { existsSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs';+import { tmpdir } from 'node:os';+import { join } from 'node:path';+import type {+ UninstallDispatchRequest,+ UninstallDispatchResult,+} from '@inkeep/open-knowledge-core';+import { afterEach, beforeEach, expect, test, vi } from 'vitest';+import { runDesktopUninstallResultWindow } from '../../src/main/desktop-uninstall-result-window.ts';++const mocks = vi.hoisted(() => ({+ exit: vi.fn(),+ events: new Map<string, () => void>(),+ handle:+ vi.fn<+ (+ channel: string,+ handler: (+ event: { sender: { id: number } },+ request: UninstallDispatchRequest,+ ) => UninstallDispatchResult,+ ) => void+ >(),+}));+vi.mock('electron', () => ({+ app: { whenReady: async () => {}, exit: mocks.exit, focus: vi.fn(), isPackaged: false },+ nativeTheme: { shouldUseDarkColors: false },+ ipcMain: { handle: mocks.handle },+ BrowserWindow: class {+ webContents = { id: 1, setWindowOpenHandler: vi.fn(), on: vi.fn() };+ once = (event: string, listener: () => void) => mocks.events.set(event, listener);+ setMenu = vi.fn();+ visible = false;+ show = () => {+ this.visible = true;+ };+ focus = vi.fn();+ isVisible = () => this.visible;+ setMinimumSize = vi.fn();+ setSize = vi.fn();+ setResizable = vi.fn();+ setTitle = vi.fn();+ },+}));+vi.mock('../../src/main/uninstall-window.ts', () => ({+ loadUninstallEntry: async () => {},+ resolveUninstallEntryTarget: vi.fn(),+ resolveUninstallWindowTheme: vi.fn(),+}));++let profile: string;+beforeEach(() => {+ vi.useFakeTimers();+ mocks.exit.mockClear();+ mocks.handle.mockClear();+ mocks.events.clear();+ profile = mkdtempSync(join(tmpdir(), 'ok-result-backstop-owned-'));+});+afterEach(() => {+ vi.clearAllTimers();+ vi.useRealTimers();+ rmSync(profile, { recursive: true, force: true });+});++function dispatch(request: UninstallDispatchRequest): UninstallDispatchResult {+ const handler = mocks.handle.mock.calls[0]?.[1];+ if (!handler) throw new Error('Uninstall handler was not registered');+ return handler({ sender: { id: 1 } }, request);+}++async function showProgress(): Promise<void> {+ await runDesktopUninstallResultWindow({ kind: 'progress', profile });+ mocks.events.get('ready-to-show')?.();+ dispatch({ kind: 'progress-shown' });+}++test('unblocks the shell after renderer silence without a user action', async () => {+ await showProgress();+ await vi.advanceTimersByTimeAsync(59_999);+ expect(mocks.exit).not.toHaveBeenCalled();+ await vi.advanceTimersByTimeAsync(1);+ expect(mocks.exit).toHaveBeenCalledExactlyOnceWith(1);+});++test('a displayed result cancels the backstop and remains until dismissed', async () => {+ await showProgress();+ writeFileSync(join(profile, 'result'), 'Done\0Settings removed.\0Reveal in Finder\0');+ expect(dispatch({ kind: 'ready' })).toEqual({+ kind: 'screen',+ screen: { kind: 'result', outcome: 'success' },+ });+ await vi.advanceTimersByTimeAsync(10 * 60_000 + 5000);+ expect(mocks.exit).not.toHaveBeenCalled();+ dispatch({ kind: 'notice-reveal-log' });+ await vi.advanceTimersByTimeAsync(1);+ expect(mocks.exit).toHaveBeenCalledExactlyOnceWith(10);+});++test.each([true, false])(+ 'reports readiness only after painting and visibility, paint first=%s',+ async (paintFirst) => {+ await runDesktopUninstallResultWindow({ kind: 'progress', profile });+ if (paintFirst) dispatch({ kind: 'progress-shown' });+ else mocks.events.get('ready-to-show')?.();+ expect(existsSync(join(profile, 'ready'))).toBe(false);+ if (paintFirst) mocks.events.get('ready-to-show')?.();+ else dispatch({ kind: 'progress-shown' });+ expect(existsSync(join(profile, 'ready'))).toBe(true);+ },+);++test('polls do not disarm the outer deadline and allow a minute to read the notice', async () => {+ await showProgress();+ for (let elapsed = 0; elapsed < 10 * 60_000; elapsed += 10_000) {+ expect(dispatch({ kind: 'ready' })).toEqual({+ kind: 'screen',+ screen: { kind: 'progress', awaitResult: true },+ });+ await vi.advanceTimersByTimeAsync(10_000);+ expect(mocks.exit).not.toHaveBeenCalled();+ }+ dispatch({ kind: 'ready' });+ await vi.advanceTimersByTimeAsync(59_999);+ expect(mocks.exit).not.toHaveBeenCalled();+ await vi.advanceTimersByTimeAsync(1);+ expect(mocks.exit).toHaveBeenCalledExactlyOnceWith(1);+});diff --git a/packages/desktop/tests/main/desktop-uninstall-result.test.ts b/packages/desktop/tests/main/desktop-uninstall-result.test.tsnew file mode 100644index 000000000..5293d168c--- /dev/null+++ b/packages/desktop/tests/main/desktop-uninstall-result.test.ts@@ -0,0 +1,101 @@+import { describe, expect, test } from 'vitest';+import {+ desktopUninstallResultCommand,+ desktopUninstallResultScreen,+ parseDesktopUninstallResultArgs,+ parseDesktopUninstallResultMessage,+} from '../../src/main/desktop-uninstall-result.ts';++const success = {+ title: 'OpenKnowledge files were removed',+ text: 'Removed settings.',+ actionLabel: 'Reveal in Finder',+} as const;++describe('uninstall completion window', () => {+ test('sends a success discriminator for verified cleanup', () => {+ expect(desktopUninstallResultScreen(success)).toEqual({ kind: 'result', outcome: 'success' });+ });+ test('sends a failure discriminator without inviting app removal', () => {+ expect(desktopUninstallResultScreen({ actionLabel: 'Close' })).toEqual({+ kind: 'result',+ outcome: 'failure',+ });+ });+ test('requires an isolated profile and a supported result action', () => {+ const args = [+ '--user-data-dir=/tmp/owned-profile',+ '--ok-uninstall-result',+ success.title,+ success.text,+ success.actionLabel,+ ];+ expect(parseDesktopUninstallResultArgs(args)).toEqual({+ profile: '/tmp/owned-profile',+ kind: 'result',+ ...success,+ });+ expect(parseDesktopUninstallResultArgs(args.slice(1))).toBeNull();+ expect(+ parseDesktopUninstallResultArgs(['--user-data-dir=relative', ...args.slice(1)]),+ ).toBeNull();+ expect(parseDesktopUninstallResultArgs([...args.slice(0, -1), 'Delete'])).toBeNull();+ expect(parseDesktopUninstallResultArgs([])).toBeNull();+ });+ test('launches the packaged entry or the explicit development app', () => {+ expect(+ desktopUninstallResultCommand(+ '/Applications/OpenKnowledge.app/Contents/MacOS/OpenKnowledge',+ true,+ '/app.asar',+ ),+ ).toEqual(['/Applications/OpenKnowledge.app/Contents/MacOS/OpenKnowledge']);+ expect(desktopUninstallResultCommand('/dev/Electron', false, '/work/desktop')).toEqual([+ '/dev/Electron',+ '/work/desktop',+ ]);+ });+});++test('progress mode requires its own profile and cannot also supply a premature result', () => {+ expect(+ parseDesktopUninstallResultArgs(['--ok-uninstall-progress', '--user-data-dir=/tmp/owned']),+ ).toEqual({ kind: 'progress', profile: '/tmp/owned' });+ expect(parseDesktopUninstallResultArgs(['--ok-uninstall-progress'])).toBeNull();+ expect(+ parseDesktopUninstallResultArgs([+ '--ok-uninstall-progress',+ '--user-data-dir=/tmp/owned',+ '--ok-uninstall-result',+ ]),+ ).toBeNull();+});++test('accepts complete result messages and rejects truncated or unsupported results', () => {+ expect(parseDesktopUninstallResultMessage('Cleanup didn’t finish\0Keep state.\0Close\0')).toEqual(+ { title: 'Cleanup didn’t finish', text: 'Keep state.', actionLabel: 'Close' },+ );+ expect(+ parseDesktopUninstallResultMessage('Cleanup didn’t finish\0Keep state.\0Close'),+ ).toBeNull();+ expect(parseDesktopUninstallResultMessage('title\0text\0Delete\0')).toBeNull();+ expect(parseDesktopUninstallResultMessage('title\0text\0Close\0extra\0')).toBeNull();+});++test('carries a validated locale into the disposable profile', () => {+ const command = desktopUninstallResultCommand('/app', true, '/app.asar', 'es');+ expect(+ parseDesktopUninstallResultArgs([+ ...command,+ '--user-data-dir=/tmp/owned',+ '--ok-uninstall-progress',+ ]),+ ).toEqual({ kind: 'progress', profile: '/tmp/owned', locale: 'es' });+ expect(+ parseDesktopUninstallResultArgs([+ '--ok-uninstall-locale=garbage',+ '--user-data-dir=/tmp/owned',+ '--ok-uninstall-progress',+ ]),+ ).toBeNull();+});diff --git a/packages/desktop/tests/main/uninstall-ipc.test.ts b/packages/desktop/tests/main/uninstall-ipc.test.tsindex 86a88a49d..1535f6778 100644--- a/packages/desktop/tests/main/uninstall-ipc.test.ts+++ b/packages/desktop/tests/main/uninstall-ipc.test.ts@@ -88,7 +88,6 @@ describe('uninstall screen registry — intent delivery', () => {for (const payload of [{ kind: 'delete-everything' },- { kind: 'notice-reveal-log' },{ kind: 42 },'notice-confirm',null,diff --git a/packages/desktop/tests/main/window-manager.test.ts b/packages/desktop/tests/main/window-manager.test.tsindex 2c28e946f..4229cc593 100644--- a/packages/desktop/tests/main/window-manager.test.ts+++ b/packages/desktop/tests/main/window-manager.test.ts@@ -2670,8 +2670,19 @@ describe('WindowManager', () => {});describe('forceStopConflictingServer (dialog "Stop Server & Retry")', () => {+ const ownedDirectories: string[] = [];+ function temporaryProject(prefix = 'ok-force-stop-'): string {+ const dir = mkdtempSync(join(tmpdir(), prefix));+ ownedDirectories.push(dir);+ return dir;+ }+ afterEach(() => {+ const owned = ownedDirectories.splice(0);+ for (const dir of owned) rmSync(dir, { recursive: true, force: true });+ for (const dir of owned) expect(existsSync(dir)).toBe(false);+ });function seedRawLock(pid: number, overrides?: { port?: number }): string {- const projectPath = mkdtempSync(join(tmpdir(), 'ok-force-stop-'));+ const projectPath = temporaryProject();const lockDir = join(projectPath, '.ok', 'local');mkdirSync(lockDir, { recursive: true });writeFileSync(@@ -2712,7 +2723,7 @@ describe('WindowManager', () => {env.deps.killProbe = (pid) => {killCalls.push(pid);};- const projectPath = mkdtempSync(join(tmpdir(), 'ok-force-stop-empty-'));+ const projectPath = temporaryProject('ok-force-stop-empty-');const wm = new WindowManager(env.deps);const outcome = await wm.forceStopConflictingServer(projectPath);diff --git a/packages/desktop/tests/smoke/_helpers/platform-gate.ts b/packages/desktop/tests/smoke/_helpers/platform-gate.tsindex 8f470a0a9..130dcad2d 100644--- a/packages/desktop/tests/smoke/_helpers/platform-gate.ts+++ b/packages/desktop/tests/smoke/_helpers/platform-gate.ts@@ -62,6 +62,7 @@ export const SPEC_PLATFORM_GATES = {'terminal-window.e2e.ts': ['!PTY_PLATFORM_SUPPORTED'],'theme-sync.e2e.ts': ['!DARWIN'],'uninstall-ipc-bridge.e2e.ts': ['!DARWIN'],+ 'uninstall-result.e2e.ts': ['!DARWIN', '!DARWIN'],'uninstall-notice.e2e.ts': ['!DARWIN'],'uninstall-picker.e2e.ts': ['!DARWIN'],'uninstall-survey.e2e.ts': ['!DARWIN'],diff --git a/packages/desktop/tests/smoke/_helpers/stale-build-guard.test.ts b/packages/desktop/tests/smoke/_helpers/stale-build-guard.test.tsindex 08f3f50b3..67aa8e591 100644--- a/packages/desktop/tests/smoke/_helpers/stale-build-guard.test.ts+++ b/packages/desktop/tests/smoke/_helpers/stale-build-guard.test.ts@@ -187,7 +187,9 @@ describe('the real CHECKS list, not an injected one', () => {const cli = verdict.missing.find((m) => m.name.includes('CLI'));expect(cli?.out).toMatch(/cli[/\\]dist[/\\]index\.mjs$/);expect(verdict.missing.map((m) => m.name)).toEqual([- 'main',+ 'main dispatcher',+ 'uninstall result window',+ 'app main','preload','renderer','utility server entry',@@ -195,3 +197,25 @@ describe('the real CHECKS list, not an injected one', () => {]);});});++it.each([+ ['src/main/entry.ts', ['main dispatcher']],+ ['src/main/index.ts', ['app main']],+ ['src/main/desktop-uninstall-result-window.ts', ['uninstall result window']],+ [+ 'src/main/desktop-uninstall-result.ts',+ ['main dispatcher', 'app main', 'uninstall result window'],+ ],+ ['src/main/uninstall-window.ts', ['app main', 'uninstall result window']],+ ['src/main/desktop-uninstall-handoff.ts', ['app main']],+] as const)('guards the entry emitted for %s', (source, artifacts) => {+ const verdict = evaluateBuild({+ exists: () => true,+ mtimeMs: (path) => (path.replaceAll('\\', '/').endsWith(source) ? 200 : 100),+ smokeEnabled: true,+ packagedOverride: undefined,+ });+ for (const artifact of artifacts) {+ expect(verdict.stale.some((item) => item.includes(`${artifact}:`))).toBe(true);+ }+});diff --git a/packages/desktop/tests/smoke/_helpers/stale-build-guard.ts b/packages/desktop/tests/smoke/_helpers/stale-build-guard.tsindex 05414d3e9..72cf58ead 100644--- a/packages/desktop/tests/smoke/_helpers/stale-build-guard.ts+++ b/packages/desktop/tests/smoke/_helpers/stale-build-guard.ts@@ -17,10 +17,30 @@ export const CLI_BUILD_COMMAND = 'pnpm --filter @inkeep/open-knowledge run buildconst CHECKS: BuildArtifactCheck[] = [{- name: 'main',+ name: 'main dispatcher',out: resolve(DESKTOP_PKG, 'out/main/index.js'),+ srcs: [+ resolve(DESKTOP_PKG, 'src/main/entry.ts'),+ resolve(DESKTOP_PKG, 'src/main/desktop-uninstall-result.ts'),+ ],+ },+ {+ name: 'uninstall result window',+ out: resolve(DESKTOP_PKG, 'out/main/uninstall-result-window.js'),+ srcs: [+ resolve(DESKTOP_PKG, 'src/main/desktop-uninstall-result-window.ts'),+ resolve(DESKTOP_PKG, 'src/main/uninstall-window.ts'),+ resolve(DESKTOP_PKG, 'src/main/desktop-uninstall-result.ts'),+ ],+ },+ {+ name: 'app main',+ out: resolve(DESKTOP_PKG, 'out/main/app-main.js'),srcs: [resolve(DESKTOP_PKG, 'src/main/index.ts'),+ resolve(DESKTOP_PKG, 'src/main/uninstall-window.ts'),+ resolve(DESKTOP_PKG, 'src/main/desktop-uninstall-handoff.ts'),+ resolve(DESKTOP_PKG, 'src/main/desktop-uninstall-result.ts'),resolve(DESKTOP_PKG, 'src/main/consent-dialog.ts'),resolve(DESKTOP_PKG, 'src/main/folder-admission.ts'),],diff --git a/packages/desktop/tests/smoke/uninstall-result.e2e.ts b/packages/desktop/tests/smoke/uninstall-result.e2e.tsnew file mode 100644index 000000000..9d0250ef5--- /dev/null+++ b/packages/desktop/tests/smoke/uninstall-result.e2e.ts@@ -0,0 +1,316 @@+import { execFileSync, spawn } from 'node:child_process';+import { once } from 'node:events';+import {+ existsSync,+ mkdirSync,+ mkdtempSync,+ readdirSync,+ readFileSync,+ rmSync,+ writeFileSync,+} from 'node:fs';+import { createRequire } from 'node:module';+import { createServer } from 'node:net';+import { tmpdir } from 'node:os';+import { join } from 'node:path';+import type { OkUninstallBridge } from '@inkeep/open-knowledge-core';+import { type Browser, chromium, _electron as electron, expect, test } from '@playwright/test';+import { buildDesktopUninstallHandoffScript } from '../../src/main/desktop-uninstall-handoff';+import { closeAppBounded } from './_helpers/electron-cleanup';+import { desktopLaunchOptions, resolveDesktopTarget } from './_helpers/launch-desktop';++const TARGET = resolveDesktopTarget();+const DARWIN = process.platform === 'darwin';+const owned: string[] = [];+test.afterEach(() => {+ for (const dir of owned.splice(0)) {+ rmSync(dir, { recursive: true, force: true });+ expect(existsSync(dir)).toBe(false);+ }+});++test.describe('isolated uninstall completion', () => {+ test.skip(!DARWIN, 'macOS uninstall handoff');+ test.skip(!TARGET.exists, TARGET.missingReason);+ for (const success of [true, false]) {+ test(`renders the ${success ? 'success' : 'failure'} result in the handed-off language`, async () => {+ const home = mkdtempSync(join(tmpdir(), 'ok-uninstall-locale-test-'));+ owned.push(home);+ const app = await electron.launch(+ desktopLaunchOptions({+ target: TARGET,+ args: [+ `--user-data-dir=${join(home, 'profile')}`,+ '--ok-uninstall-locale=es',+ '--ok-uninstall-result',+ success ? 'OpenKnowledge files were removed' : 'Cleanup didn’t finish',+ 'Details in the log.',+ success ? 'Reveal in Finder' : 'Close',+ ],+ env: { ...process.env, HOME: home },+ }),+ );+ const child = app.process();+ try {+ const page = await app.firstWindow();+ await expect(+ page.getByRole('heading', {+ name: success+ ? 'Se eliminaron los archivos de OpenKnowledge'+ : 'La limpieza no terminó',+ }),+ ).toBeVisible();+ await expect(page.locator('html')).toHaveAttribute('lang', 'es');+ await expect(page.getByRole('listitem')).toHaveCount(success ? 3 : 0);+ await expect(page.getByText('Kept your content')).toHaveCount(0);+ const exited = once(child, 'exit');+ await page.keyboard.down('Escape');+ expect(await exited).toEqual([0, null]);+ expect(existsSync(join(home, '.ok'))).toBe(false);+ } finally {+ await closeAppBounded(child);+ }+ });+ }+ test('keeps the normal desktop entry available', async () => {+ test.skip(TARGET.mode === 'packaged', 'The notice preview is development-only.');+ const home = mkdtempSync(join(tmpdir(), 'ok-uninstall-normal-entry-'));+ owned.push(home);+ const app = await electron.launch(+ desktopLaunchOptions({+ target: TARGET,+ args: [`--user-data-dir=${join(home, 'profile')}`],+ env: { ...process.env, HOME: home, OK_UNINSTALL_UI_PREVIEW: 'notice' },+ }),+ );+ const child = app.process();+ try {+ await expect(async () => {+ const headings = await Promise.all(+ app.windows().map((page) => page.locator('h1').allTextContents()),+ );+ expect(headings.flat()).toContain('Uninstall OpenKnowledge?');+ }).toPass({ timeout: 20_000 });+ } finally {+ await closeAppBounded(child);+ }+ });+ for (const [success, action, exitCode] of [+ [true, 'Reveal in Finder', 11],+ [true, 'Cleanup log', 10],+ [true, 'Escape', 0],+ [false, 'Cleanup log', 10],+ [false, 'Close', 0],+ ] as const) {+ // biome-ignore lint/correctness/noEmptyPattern: Playwright fixture contract+ test(`renders ${success ? 'success' : 'failure'} and exits on ${action}`, async ({}, testInfo) => {+ const home = mkdtempSync(join(tmpdir(), 'ok-uninstall-result-test-'));+ owned.push(home);+ const profile = join(home, 'result-profile');+ mkdirSync(profile);+ const note = join(home, 'notes.md');+ writeFileSync(note, '# Keep my notes');+ const app = await electron.launch(+ desktopLaunchOptions({+ target: TARGET,+ args: [+ `--user-data-dir=${profile}`,+ '--ok-uninstall-result',+ success ? 'OpenKnowledge files were removed' : 'Cleanup didn’t finish',+ success ? 'Settings removed.' : 'A server remains alive. Project state was retained.',+ success ? 'Reveal in Finder' : 'Close',+ ],+ env: { ...process.env, HOME: home },+ }),+ );+ const child = app.process();+ try {+ const page = await app.firstWindow();+ await expect(page.getByRole('alertdialog')).toBeVisible();+ if (success) {+ await expect(page.getByRole('listitem')).toHaveCount(3);+ await expect(page.getByText('Kept your content')).toBeVisible();+ await expect(page.getByRole('button', { name: 'Reveal in Finder' })).toBeFocused();+ if (action === 'Reveal in Finder') {+ await page.screenshot({ path: testInfo.outputPath('completion.png') });+ await page.keyboard.press('Tab');+ await expect(page.getByRole('button', { name: 'Cleanup log' })).toBeFocused();+ await page.keyboard.press('Tab');+ await expect(page.getByRole('button', { name: 'Reveal in Finder' })).toBeFocused();+ }+ } else {+ await expect(page.getByRole('listitem')).toHaveCount(0);+ await expect(+ page.getByText(+ 'Some files may not have been removed. Open the cleanup log for details. You can reopen OpenKnowledge to try again.',+ ),+ ).toBeVisible();+ }+ const exited = once(child, 'exit');+ if (action === 'Escape') await page.keyboard.down('Escape');+ else await page.getByRole('button', { name: action }).click();+ const [code] = await exited;+ expect(code).toBe(exitCode);+ expect(existsSync(join(home, '.ok'))).toBe(false);+ expect(existsSync(join(home, 'Library', 'Application Support', 'OpenKnowledge'))).toBe(+ false,+ );+ expect(readFileSync(note, 'utf8')).toBe('# Keep my notes');+ } finally {+ await closeAppBounded(child);+ }+ });+ }+});++test.describe('continuous uninstall handoff', () => {+ test.skip(!DARWIN, 'macOS uninstall handoff');+ test.skip(!TARGET.exists, TARGET.missingReason);+ for (const success of [true, false]) {+ // biome-ignore lint/correctness/noEmptyPattern: Playwright fixture contract+ test(`keeps the same window through shutdown, cleanup and ${success ? 'success' : 'failure'}`, async ({}, testInfo) => {+ const home = mkdtempSync(join(tmpdir(), 'ok-uninstall-progress-test-'));+ owned.push(home);+ const logPath = join(home, 'cleanup.log');+ const state = join(home, 'settings');+ const note = join(home, 'notes.md');+ const appBundlePath = join(home, 'OpenKnowledge.app');+ mkdirSync(appBundlePath);+ writeFileSync(note, '# Keep my notes');+ const parent = spawn(+ '/bin/sh',+ [+ '-c',+ `while [ ! -f '${home}/quit' ]; do /bin/sleep 0.05; done+printf 'final shutdown write' > '${state}'`,+ ],+ { detached: true, stdio: 'ignore' },+ );+ let helper: ReturnType<typeof spawn> | null = null;+ let browser: Browser | undefined;+ try {+ const parentPid = parent.pid;+ if (parentPid === undefined) throw new Error('No parent process');+ const parentStartedAt = execFileSync(+ '/bin/ps',+ ['-p', String(parentPid), '-o', 'lstart='],+ { encoding: 'utf8' },+ ).trim();+ const server = createServer();+ server.listen(0, '127.0.0.1');+ await once(server, 'listening');+ const address = server.address();+ if (address === null || typeof address === 'string') throw new Error('No debug port');+ const port = address.port;+ await new Promise<void>((resolve) => server.close(() => resolve()));+ const cliPath = join(home, 'cleanup');+ writeFileSync(+ cliPath,+ `#!/bin/sh+[ -f '${state}' ] || exit 2+touch '${home}/cleaning'+while [ ! -f '${home}/finish-cleanup' ]; do /bin/sleep 0.05; done+${success ? `rm '${state}'` : 'exit 31'}+`,+ { mode: 0o700 },+ );+ const open = join(home, 'open');+ writeFileSync(open, `#!/bin/sh\nprintf '%s' "$2" > '${home}/revealed'\n`, { mode: 0o700 });+ const require = createRequire(import.meta.url);+ const result =+ TARGET.mode === 'packaged'+ ? [TARGET.targetPath, `--remote-debugging-port=${port}`]+ : [String(require('electron')), TARGET.targetPath, `--remote-debugging-port=${port}`];+ const script = buildDesktopUninstallHandoffScript(+ {+ cliPath,+ projectPaths: [],+ logPath,+ appBundlePath,+ parentPid,+ parentStartedAt,+ },+ { result, open },+ );+ helper = spawn('/bin/sh', ['-c', script], {+ detached: true,+ env: { ...process.env, HOME: home, TMPDIR: home, OK_LANG: 'en' },+ stdio: ['ignore', 'pipe', 'ignore'],+ });+ let output = '';+ helper.stdout?.on('data', (chunk) => {+ output += String(chunk);+ });+ await expect.poll(() => output, { timeout: 35_000 }).toContain('OK_UNINSTALL_READY');+ browser = await chromium.connectOverCDP(`http://127.0.0.1:${port}`);+ const page = browser.contexts()[0]?.pages()[0];+ if (page === undefined) throw new Error('No progress window');+ await expect(+ page.getByRole('heading', { name: 'Removing OpenKnowledge files…' }),+ ).toBeVisible();+ expect(parent.exitCode).toBeNull();+ expect(existsSync(join(home, 'cleaning'))).toBe(false);+ await page.evaluate(() => {+ window.name = 'continuous-progress';+ });+ await page.keyboard.press('Escape');+ await expect(page.getByRole('status')).toBeVisible();+ expect(+ await page.evaluate(() => {+ const host = window as typeof window & { okUninstall?: OkUninstallBridge };+ return host.okUninstall?.send({ kind: 'notice-confirm' });+ }),+ ).toEqual({ kind: 'refused', reason: 'invalid-intent' });+ writeFileSync(join(home, 'quit'), 'quit');+ await expect.poll(() => existsSync(join(home, 'cleaning'))).toBe(true);+ await expect(page.getByRole('status')).toBeVisible();+ await page.screenshot({ path: testInfo.outputPath('progress.png') });+ expect(await page.getByRole('alertdialog').count()).toBe(0);+ writeFileSync(join(home, 'finish-cleanup'), 'finish');+ await expect(+ page.getByRole('heading', {+ name: success ? 'OpenKnowledge files were removed' : 'Cleanup didn’t finish',+ }),+ ).toBeVisible();+ expect(await page.evaluate(() => window.name)).toBe('continuous-progress');+ expect(browser.contexts()[0]?.pages()).toHaveLength(1);+ await expect(page.getByRole('listitem')).toHaveCount(success ? 3 : 0);+ await page.screenshot({ path: testInfo.outputPath('completion.png') });+ const closed = once(helper, 'close');+ await page+ .getByRole('button', { name: success ? 'Reveal in Finder' : 'Cleanup log' })+ .click();+ expect(await closed).toEqual([success ? 0 : 1, null]);+ expect(readFileSync(join(home, 'revealed'), 'utf8')).toBe(+ success ? appBundlePath : logPath,+ );+ expect(readFileSync(logPath, 'utf8')).toContain(+ `Cleanup result: ${success ? 'succeeded' : 'failed'}`,+ );+ expect(existsSync(state)).toBe(!success);+ expect(readFileSync(note, 'utf8')).toBe('# Keep my notes');+ expect(readdirSync(home).filter((name) => name.startsWith('ok-uninstall-result.'))).toEqual(+ [],+ );+ expect(existsSync(join(home, '.ok'))).toBe(false);+ expect(existsSync(join(home, 'Library', 'Application Support', 'OpenKnowledge'))).toBe(+ false,+ );+ } finally {+ if (parent.exitCode === null && parent.signalCode === null) {+ const closed = once(parent, 'close');+ parent.kill('SIGKILL');+ await closed;+ }+ if (helper !== null && helper.exitCode === null && helper.signalCode === null) {+ const closed = once(helper, 'close');+ helper.kill('SIGTERM');+ await closed;+ }+ await closeAppBounded(parent);+ await closeAppBounded(helper);+ await browser?.close().catch(() => {});+ }+ });+ }+});diff --git a/packages/server/src/index.ts b/packages/server/src/index.tsindex 927310173..ea1a93b84 100644--- a/packages/server/src/index.ts+++ b/packages/server/src/index.ts@@ -411,9 +411,11 @@ export {export {discoverLockDirs,extractOkBinaryPath,+ type LockProcessScan,type ProcessUsage,processCommand,processUsage,+ scanLockProcesses,} from './process-scan.ts';export {type EnsureProjectGitResult,diff --git a/packages/server/src/mcp/tools/get-preview-url.test.ts b/packages/server/src/mcp/tools/get-preview-url.test.tsindex bb1e15efa..eb12ee0c1 100644--- a/packages/server/src/mcp/tools/get-preview-url.test.ts+++ b/packages/server/src/mcp/tools/get-preview-url.test.ts@@ -1,7 +1,7 @@-import { mkdtempSync } from 'node:fs';+import { existsSync, mkdtempSync, rmSync } from 'node:fs';import { tmpdir } from 'node:os';import { join } from 'node:path';-import { describe, expect, test } from 'vitest';+import { afterEach, describe, expect, test } from 'vitest';import { AutoStartDisabledError } from '../../autostart.ts';import { resolveLockDir } from '../../config/paths.ts';import { type Config, ConfigSchema } from '../../config/schema.ts';@@ -11,6 +11,18 @@ import { register } from './get-preview-url.ts';import { bindTestServerLock, bindTestUiServerLock } from './preview-url-test-helpers.ts';import type { ServerInstance } from './shared.ts';+const ownedDirectories: string[] = [];+function temporaryProject(prefix = 'ok-get-preview-url-'): string {+ const dir = mkdtempSync(join(tmpdir(), prefix));+ ownedDirectories.push(dir);+ return dir;+}+afterEach(() => {+ const owned = ownedDirectories.splice(0);+ for (const dir of owned) rmSync(dir, { recursive: true, force: true });+ for (const dir of owned) expect(existsSync(dir)).toBe(false);+});+const BASE_CONFIG: Config = ConfigSchema.parse({});const CONFIG_AUTOOPEN_OFF: Config = ConfigSchema.parse({appearance: { preview: { autoOpen: false } },@@ -64,7 +76,7 @@ function captureRegistration(describe('preview_url tool — UI running', () => {test('with document: composes baseUrl + the doc route', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();const uiBase = bindTestUiServerLock(cwd);const handler = captureRegistration(cwd);const result = await handler({ document: 'specs/foo/SPEC' });@@ -77,7 +89,7 @@ describe('preview_url tool — UI running', () => {});test('with folder: composes the folder route with a trailing slash', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();const uiBase = bindTestUiServerLock(cwd);const handler = captureRegistration(cwd);const result = await handler({ folder: 'specs/foo' });@@ -85,7 +97,7 @@ describe('preview_url tool — UI running', () => {});test('folder route tolerates surrounding slashes and per-segment encodes', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();const uiBase = bindTestUiServerLock(cwd);const handler = captureRegistration(cwd);const result = await handler({ folder: '/My Notes/sub/' });@@ -94,7 +106,7 @@ describe('preview_url tool — UI running', () => {describe('isHostedAgent steer (desktop terminal or in-app agent panel)', () => {test('document: response leads with `ok open <doc>` and tells the agent not to navigate the URL', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();bindTestUiServerLock(cwd);const handler = captureRegistration(cwd, BASE_CONFIG, { isHostedAgent: true });const result = await handler({ document: 'specs/foo/SPEC' });@@ -106,7 +118,7 @@ describe('preview_url tool — UI running', () => {});test('document: steer tells the agent not to paste the URL into its reply', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();bindTestUiServerLock(cwd);const handler = captureRegistration(cwd, BASE_CONFIG, { isHostedAgent: true });const result = await handler({ document: 'specs/foo/SPEC' });@@ -114,7 +126,7 @@ describe('preview_url tool — UI running', () => {});test('folder: steers to `ok open <folder>`', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();bindTestUiServerLock(cwd);const handler = captureRegistration(cwd, BASE_CONFIG, { isHostedAgent: true });const result = await handler({ folder: 'specs/foo' });@@ -123,7 +135,7 @@ describe('preview_url tool — UI running', () => {});test('skill default scope (project): steers to `ok open <name> --skill` (no --scope)', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();bindTestUiServerLock(cwd);const handler = captureRegistration(cwd, BASE_CONFIG, { isHostedAgent: true });const result = await handler({ skill: { name: 'trip-log' } });@@ -133,7 +145,7 @@ describe('preview_url tool — UI running', () => {});test('skill --scope global: steers to `ok open <name> --skill --scope global`', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();bindTestUiServerLock(cwd);const handler = captureRegistration(cwd, BASE_CONFIG, { isHostedAgent: true });const result = await handler({ skill: { name: 'trip-log', scope: 'global' } });@@ -144,7 +156,7 @@ describe('preview_url tool — UI running', () => {});test('no target (root): no steer — nothing to `ok open`', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();bindTestUiServerLock(cwd);const handler = captureRegistration(cwd, BASE_CONFIG, { isHostedAgent: true });const result = await handler({});@@ -152,7 +164,7 @@ describe('preview_url tool — UI running', () => {});test('NOT a hosted agent (default): no steer — plain Preview URL', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();bindTestUiServerLock(cwd);const handler = captureRegistration(cwd);const result = await handler({ document: 'specs/foo/SPEC' });@@ -161,7 +173,7 @@ describe('preview_url tool — UI running', () => {});test('hosted agent + no UI running: steer + okOpenCommand still fire (ok open does not need the UI)', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();const handler = captureRegistration(cwd, BASE_CONFIG, { isHostedAgent: true });const result = await handler({ document: 'specs/foo/SPEC' });expect(result.structuredContent?.running).toBe(false);@@ -171,7 +183,7 @@ describe('preview_url tool — UI running', () => {});test('document with a space: okOpenCommand shell-quotes the path', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();bindTestUiServerLock(cwd);const handler = captureRegistration(cwd, BASE_CONFIG, { isHostedAgent: true });const result = await handler({ document: 'notes/My Doc' });@@ -179,7 +191,7 @@ describe('preview_url tool — UI running', () => {});test('document with an embedded single quote: okOpenCommand POSIX-escapes it', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();bindTestUiServerLock(cwd);const handler = captureRegistration(cwd, BASE_CONFIG, { isHostedAgent: true });const result = await handler({ document: "Q&A/what's new" });@@ -187,7 +199,7 @@ describe('preview_url tool — UI running', () => {});test('hosted agent + no UI + folder: okOpenCommand still fires', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();const handler = captureRegistration(cwd, BASE_CONFIG, { isHostedAgent: true });const result = await handler({ folder: 'specs/foo' });expect(result.structuredContent?.running).toBe(false);@@ -196,7 +208,7 @@ describe('preview_url tool — UI running', () => {});test('docName + folder together is rejected (mutually exclusive)', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();bindTestUiServerLock(cwd);const handler = captureRegistration(cwd);const result = await handler({ document: 'specs/foo/SPEC', folder: 'specs/foo' });@@ -205,7 +217,7 @@ describe('preview_url tool — UI running', () => {});test('without docName: returns the UI root URL', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();const uiBase = bindTestUiServerLock(cwd);const handler = captureRegistration(cwd);const result = await handler({});@@ -217,7 +229,7 @@ describe('preview_url tool — UI running', () => {});test('per-segment encodes docName when composing the URL', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();const uiBase = bindTestUiServerLock(cwd);const handler = captureRegistration(cwd);const result = await handler({ document: 'notes/My Doc' });@@ -227,7 +239,7 @@ describe('preview_url tool — UI running', () => {describe('preview_url tool — skill target', () => {test('with skill: composes the __skill__ route (default project scope)', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();const uiBase = bindTestUiServerLock(cwd);const handler = captureRegistration(cwd);const result = await handler({ skill: { name: 'trip-log' } });@@ -235,7 +247,7 @@ describe('preview_url tool — skill target', () => {});test('with skill + explicit global scope and a spaced name', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();const uiBase = bindTestUiServerLock(cwd);const handler = captureRegistration(cwd);const result = await handler({ skill: { name: 'run tests', scope: 'global' } });@@ -243,7 +255,7 @@ describe('preview_url tool — skill target', () => {});test('skill + document together is rejected (mutually exclusive)', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();bindTestUiServerLock(cwd);const handler = captureRegistration(cwd);const result = await handler({ skill: { name: 'trip-log' }, document: 'specs/foo/SPEC' });@@ -254,7 +266,7 @@ describe('preview_url tool — skill target', () => {describe('preview_url tool — no UI running', () => {test('returns running:false + the ok-start hint when nothing is running', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();const handler = captureRegistration(cwd);const result = await handler({ document: 'specs/foo/SPEC' });expect(result.isError).toBeUndefined();@@ -268,7 +280,7 @@ describe('preview_url tool — no UI running', () => {});test('no-UI branch is the same regardless of docName', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();const handler = captureRegistration(cwd);const result = await handler({});expect(result.structuredContent?.running).toBe(false);@@ -277,7 +289,7 @@ describe('preview_url tool — no UI running', () => {});test('draining ui-capable server: transient retry hint, no spawn advice', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();bindTestServerLock(cwd, 4321, ['http', 'ws', 'ui']);markServerLockDraining(resolveLockDir(cwd));const handler = captureRegistration(cwd);@@ -289,7 +301,7 @@ describe('preview_url tool — no UI running', () => {});test('--only server (capabilities omit ui): permanent hint, no "Retry" (UI never binds on its own)', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();bindTestServerLock(cwd, 4321, ['http', 'ws']);const handler = captureRegistration(cwd);const result = await handler({ document: 'specs/foo/SPEC' });@@ -302,7 +314,7 @@ describe('preview_url tool — no UI running', () => {});test('ui-capable server.lock resolves directly (single-listener): running, own origin, no ui.lock needed', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();bindTestServerLock(cwd, 4321, ['http', 'ws', 'ui']);const handler = captureRegistration(cwd);const result = await handler({ document: 'specs/foo/SPEC' });@@ -314,7 +326,7 @@ describe('preview_url tool — no UI running', () => {describe('preview_url tool — backend demand-ensure', () => {test('cold project: ensure spawns the backend and the call returns a live URL', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();let resolverCalls = 0;let uiBase = '';const handler = captureRegistration(cwd, BASE_CONFIG, {@@ -333,7 +345,7 @@ describe('preview_url tool — backend demand-ensure', () => {});test('resolver runs on every call, even with a live UI (orphan-heal contract)', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();const uiBase = bindTestUiServerLock(cwd);let resolverCalls = 0;const handler = captureRegistration(cwd, BASE_CONFIG, {@@ -349,7 +361,7 @@ describe('preview_url tool — backend demand-ensure', () => {});test('auto-start opt-out: soft not-running payload naming the knob', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();const handler = captureRegistration(cwd, BASE_CONFIG, {serverUrl: async () => {throw new AutoStartDisabledError(@@ -367,7 +379,7 @@ describe('preview_url tool — backend demand-ensure', () => {});test('spawn failure surfaces as a tool error carrying the resolver message', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();const handler = captureRegistration(cwd, BASE_CONFIG, {serverUrl: async () => {throw new Error('server did not start within 5000ms stderr:\nboom');@@ -379,7 +391,7 @@ describe('preview_url tool — backend demand-ensure', () => {});test('fresh spawn that comes up draining: server-running retry hint after the bounded wait', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();const handler = captureRegistration(cwd, BASE_CONFIG, {serverUrl: async () => {bindTestServerLock(cwd, 4321, ['http', 'ws', 'ui']);@@ -397,7 +409,7 @@ describe('preview_url tool — backend demand-ensure', () => {});test('spawn failure during demand-ensure surfaces isError', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();const handler = captureRegistration(cwd, BASE_CONFIG, {serverUrl: async () => {throw new Error('spawn failed: ENOENT');@@ -410,7 +422,7 @@ describe('preview_url tool — backend demand-ensure', () => {describe('preview_url tool — autoOpen field', () => {test('echoes resolved autoOpen=false when the user has disabled it', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();bindTestUiServerLock(cwd);const handler = captureRegistration(cwd, CONFIG_AUTOOPEN_OFF);const result = await handler({ document: 'specs/foo/SPEC' });@@ -420,7 +432,7 @@ describe('preview_url tool — autoOpen field', () => {});test('echoes autoOpen=false when no UI is running', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();const handler = captureRegistration(cwd, CONFIG_AUTOOPEN_OFF);const result = await handler({});expect(result.structuredContent?.running).toBe(false);@@ -428,7 +440,7 @@ describe('preview_url tool — autoOpen field', () => {});test('reads config fresh per call (resolver invoked on every invocation)', async () => {- const cwd = mkdtempSync(join(tmpdir(), 'ok-get-preview-url-'));+ const cwd = temporaryProject();bindTestUiServerLock(cwd);let currentAutoOpen = true;const configResolver = async (): Promise<Config> =>@@ -500,7 +512,7 @@ function mockOffCwdDeps(describe('preview_url tool — file branch (out-of-project)', () => {test('resolves a loose file to the session whose contentDir contains it', async () => {- const handler = captureRegistration(mkdtempSync(join(tmpdir(), 'ok-pv-')), BASE_CONFIG, {+ const handler = captureRegistration(temporaryProject('ok-pv-'), BASE_CONFIG, {offCwdResolverDeps: mockOffCwdDeps([{ contentDir: '/loose', baseUrl: 'http://localhost:6001' },]),@@ -515,7 +527,7 @@ describe('preview_url tool — file branch (out-of-project)', () => {});test('no session for the file → running:false with an ok-open hint', async () => {- const handler = captureRegistration(mkdtempSync(join(tmpdir(), 'ok-pv-')), BASE_CONFIG, {+ const handler = captureRegistration(temporaryProject('ok-pv-'), BASE_CONFIG, {offCwdResolverDeps: mockOffCwdDeps([]),});const result = await handler({ file: '/loose/notes.md' });@@ -526,7 +538,7 @@ describe('preview_url tool — file branch (out-of-project)', () => {});test('file is mutually exclusive with document', async () => {- const handler = captureRegistration(mkdtempSync(join(tmpdir(), 'ok-pv-')), BASE_CONFIG, {+ const handler = captureRegistration(temporaryProject('ok-pv-'), BASE_CONFIG, {offCwdResolverDeps: mockOffCwdDeps([]),});const result = await handler({ file: '/loose/notes.md', document: 'specs/foo' });@@ -551,7 +563,7 @@ describe('preview_url tool — file branch boot-on-demand', () => {: null,realpath: async (p) => p,};- const handler = captureRegistration(mkdtempSync(join(tmpdir(), 'ok-pv-')), BASE_CONFIG, {+ const handler = captureRegistration(temporaryProject('ok-pv-'), BASE_CONFIG, {offCwdResolverDeps: liveDeps,ensureSingleFileSession: async () => {candidate = { contentDir: '/loose', baseUrl: 'http://localhost:6010' };@@ -570,7 +582,7 @@ describe('preview_url tool — file branch boot-on-demand', () => {realpath: async (p) => p,};let called = false;- const handler = captureRegistration(mkdtempSync(join(tmpdir(), 'ok-pv-')), BASE_CONFIG, {+ const handler = captureRegistration(temporaryProject('ok-pv-'), BASE_CONFIG, {offCwdResolverDeps: empty,ensureSingleFileSession: async () => {called = true;@@ -589,7 +601,7 @@ describe('preview_url tool — file branch boot-on-demand', () => {inspect: async () => null,realpath: async (p) => p,};- const handler = captureRegistration(mkdtempSync(join(tmpdir(), 'ok-pv-')), BASE_CONFIG, {+ const handler = captureRegistration(temporaryProject('ok-pv-'), BASE_CONFIG, {offCwdResolverDeps: empty,});const result = await handler({ file: '/loose/y.md' });@@ -602,7 +614,7 @@ describe('preview_url tool — file branch boot-on-demand', () => {inspect: async () => null,realpath: async (p) => p,};- const handler = captureRegistration(mkdtempSync(join(tmpdir(), 'ok-pv-')), BASE_CONFIG, {+ const handler = captureRegistration(temporaryProject('ok-pv-'), BASE_CONFIG, {offCwdResolverDeps: empty,ensureSingleFileSession: async () => {throw new Error('spawn boom');@@ -614,7 +626,7 @@ describe('preview_url tool — file branch boot-on-demand', () => {expect(result.content[0]?.text).toContain('ok open');});test('relative file path is rejected (must be absolute)', async () => {- const handler = captureRegistration(mkdtempSync(join(tmpdir(), 'ok-pv-')), BASE_CONFIG);+ const handler = captureRegistration(temporaryProject('ok-pv-'), BASE_CONFIG);const result = await handler({ file: 'notes.md' });expect(result.isError).toBe(true);expect(result.content[0]?.text).toContain('absolute');@@ -625,7 +637,7 @@ describe('preview_url tool — file branch boot-on-demand', () => {inspect: async () => null,realpath: async (p) => p,};- const handler = captureRegistration(mkdtempSync(join(tmpdir(), 'ok-pv-')), BASE_CONFIG, {+ const handler = captureRegistration(temporaryProject('ok-pv-'), BASE_CONFIG, {offCwdResolverDeps: empty,ensureSingleFileSession: async () => true,});@@ -635,7 +647,7 @@ describe('preview_url tool — file branch boot-on-demand', () => {expect(result.content[0]?.text).toContain('ok open');});test('file branch honors a user-scoped autoOpen=false preference', async () => {- const handler = captureRegistration(mkdtempSync(join(tmpdir(), 'ok-pv-')), BASE_CONFIG, {+ const handler = captureRegistration(temporaryProject('ok-pv-'), BASE_CONFIG, {offCwdResolverDeps: mockOffCwdDeps([{ contentDir: '/loose', baseUrl: 'http://127.0.0.1:6020' },]),diff --git a/packages/server/src/process-scan.test.ts b/packages/server/src/process-scan.test.tsindex ecbd051da..f82d93dc2 100644--- a/packages/server/src/process-scan.test.ts+++ b/packages/server/src/process-scan.test.ts@@ -6,6 +6,7 @@ const existsSyncMock = vi.fn();const readdirSyncMock = vi.fn();const lstatSyncMock = vi.fn();+let scanLockProcesses: typeof import('./process-scan.ts').scanLockProcesses;let discoverLockDirs: typeof import('./process-scan.ts').discoverLockDirs;let findOkProcessPids: typeof import('./process-scan.ts').findOkProcessPids;let pidCwd: typeof import('./process-scan.ts').pidCwd;@@ -22,7 +23,9 @@ beforeAll(async () => {readdirSync: readdirSyncMock,lstatSync: lstatSyncMock,}));- ({ discoverLockDirs, findOkProcessPids, pidCwd } = await import('./process-scan.ts'));+ ({ scanLockProcesses, discoverLockDirs, findOkProcessPids, pidCwd } = await import(+ './process-scan.ts'+ ));});function makeSpawnResult(overrides: Partial<SpawnSyncReturns<string>>): SpawnSyncReturns<string> {@@ -537,3 +540,82 @@ describe('discoverLockDirs', () => {expect(dirs).toHaveLength(0);});});++describe('lock recovery process evidence', () => {+ beforeEach(() => {+ spawnSyncMock.mockReset();+ });+ afterEach(() => {+ spawnSyncMock.mockReset();+ });++ it('does not mistake failed process enumeration for evidence of absence', async () => {+ spawnSyncMock.mockReturnValue(makeSpawnResult({ status: 2, stderr: 'permission denied' }));+ const scan = await scanLockProcesses();+ expect(scan.candidates).toEqual([]);+ expect(scan.unavailable).toEqual(['Could not enumerate processes with pgrep or ps']);+ });+ it('accepts a successful empty process and listener scan', async () => {+ spawnSyncMock.mockReturnValue(makeSpawnResult({ status: 1 }));+ expect(await scanLockProcesses()).toEqual({ candidates: [], unavailable: [] });+ });+ it('retains listener inspection failures', async () => {+ spawnSyncMock+ .mockReturnValueOnce(makeSpawnResult({ status: 1 }))+ .mockReturnValueOnce(makeSpawnResult({ status: 1, stderr: 'permission denied' }));+ expect((await scanLockProcesses()).unavailable).toEqual([+ 'Could not enumerate TCP listeners with lsof',+ ]);+ });+ it('keeps explicit process provenance even without a lock file on disk', async () => {+ const lockDir = '/missing/project/.ok/local';+ spawnSyncMock+ .mockReturnValueOnce(+ makeSpawnResult({+ stdout: `${process.pid} node --ok-lock-dir-b64=${Buffer.from(lockDir).toString('base64url')}\n`,+ }),+ )+ .mockReturnValueOnce(makeSpawnResult({ status: 1 }));+ expect(await scanLockProcesses()).toEqual({+ candidates: [{ lockDir, pid: process.pid, source: 'lock-dir-argument' }],+ unavailable: [],+ });+ });+ it('recognizes the production server process title and its working directory', async () => {+ spawnSyncMock+ .mockReturnValueOnce(+ makeSpawnResult({ stdout: `${process.pid} open-knowledge-server notes\n` }),+ )+ .mockReturnValueOnce(makeSpawnResult({ stdout: 'p123\nfcwd\nn/notes\n' }))+ .mockReturnValueOnce(makeSpawnResult({ status: 1 }));+ expect((await scanLockProcesses()).candidates).toContainEqual({+ lockDir: '/notes/.ok/local',+ pid: process.pid,+ source: 'process-cwd',+ });+ });+ it('retains a live candidate with an unreadable working directory as uncertainty', async () => {+ spawnSyncMock+ .mockReturnValueOnce(+ makeSpawnResult({ stdout: `${process.pid} open-knowledge-server notes\n` }),+ )+ .mockReturnValueOnce(makeSpawnResult({ status: 1 }))+ .mockReturnValueOnce(makeSpawnResult({ status: 1 }));+ expect((await scanLockProcesses()).unavailable).toEqual([+ `Could not read the working directory of process ${process.pid}`,+ ]);+ });+ it('keeps listener provenance without asserting the process is an OpenKnowledge server', async () => {+ spawnSyncMock+ .mockReturnValueOnce(makeSpawnResult({ status: 1 }))+ .mockReturnValueOnce(+ makeSpawnResult({ stdout: `COMMAND PID USER\nnode ${process.pid} user\n` }),+ )+ .mockReturnValueOnce(makeSpawnResult({ stdout: 'p123\nfcwd\nn/notes\n' }));+ expect((await scanLockProcesses()).candidates).toContainEqual({+ lockDir: '/notes/.ok/local',+ pid: process.pid,+ source: 'listener-cwd',+ });+ });+});diff --git a/packages/server/src/process-scan.ts b/packages/server/src/process-scan.tsindex 8695d794a..134d4d617 100644--- a/packages/server/src/process-scan.ts+++ b/packages/server/src/process-scan.ts@@ -1,8 +1,9 @@import { spawnSync } from 'node:child_process';import { existsSync, lstatSync, readdirSync } from 'node:fs';import { realpath } from 'node:fs/promises';-import { basename, isAbsolute, join } from 'node:path';+import { basename, isAbsolute, join, resolve } from 'node:path';import { withHiddenWindowsConsole } from './child-process-windows-hide.ts';+import { isProcessAlive, isValidLockPid } from './process-alive.ts';const SPAWN_TIMEOUT_MS = 2000;const LOCK_SCAN_MAX_DEPTH = 3;@@ -13,6 +14,7 @@ const OK_PROCESS_PGREP_QUERY ='cli\\.mjs|open-knowledge|Open ?Knowledge(\\.app| Helper)|--ok-lock-dir-b64=|--ok-project-path=|(^|[ /])ok[ ]+(start|mcp|ui)([ ]|$)|packages/(cli|app)|hocuspocus|vite';const OK_PROCESS_PATTERNS: RegExp[] = [+ /^open-knowledge-server(?:\s|$)/,/cli\.mjs/,/(^|[\s/])(open-knowledge|ok)\s+(start|mcp|ui)(\s|$)/,/Open ?Knowledge(?:\.app| Helper)/,@@ -93,7 +95,7 @@ function parsePsOutput(output: string): OkProcessEntry[] {return entries;}-async function findOkProcessEntries(): Promise<OkProcessEntry[]> {+async function findOkProcessEntries(strict = false): Promise<OkProcessEntry[]> {const pgrepResult = spawnSync('pgrep',['-a', '-f', OK_PROCESS_PGREP_QUERY],@@ -106,7 +108,11 @@ async function findOkProcessEntries(): Promise<OkProcessEntry[]> {const pgrepUnavailable =pgrepResult.error != null && (pgrepResult.error as NodeJS.ErrnoException).code === 'ENOENT';- if (!pgrepUnavailable) {+ if (+ !pgrepUnavailable &&+ !pgrepResult.error &&+ (pgrepResult.status === 0 || pgrepResult.status === 1)+ ) {const output = pgrepResult.stdout ?? '';const entries = parsePgrepOutput(output);if (entries.length > 0 || output.trim() === '') return entries;@@ -121,7 +127,8 @@ async function findOkProcessEntries(): Promise<OkProcessEntry[]> {}),);- if (psResult.error != null || !psResult.stdout) {+ if (psResult.error != null || psResult.status !== 0 || !psResult.stdout) {+ if (strict) throw new Error('Could not enumerate processes with pgrep or ps');return [];}@@ -336,3 +343,73 @@ export async function discoverLockDirs(): Promise<string[]> {return [...canonical.values()];}++export interface LockProcessScan {+ candidates: Array<{+ lockDir: string;+ pid: number;+ source: 'lock-dir-argument' | 'project-argument' | 'process-cwd' | 'listener-cwd';+ }>;+ unavailable: string[];+}++export async function scanLockProcesses(): Promise<LockProcessScan> {+ const scan: LockProcessScan = { candidates: [], unavailable: [] };+ let entries: OkProcessEntry[];+ try {+ entries = await findOkProcessEntries(true);+ } catch (error) {+ scan.unavailable.push(error instanceof Error ? error.message : String(error));+ return scan;+ }+ const add = async (+ lockDir: string,+ pid: number,+ source: LockProcessScan['candidates'][number]['source'],+ ) => {+ const canonical = await realpath(lockDir).catch(() => resolve(lockDir));+ scan.candidates.push({ lockDir: canonical, pid, source });+ };+ const addProject = async (+ project: string,+ pid: number,+ source: LockProcessScan['candidates'][number]['source'],+ ) => {+ await add(join(project, '.ok', 'local'), pid, source);+ await add(join(project, '.ok'), pid, source);+ };+ const addCwd = async (pid: number, source: 'process-cwd' | 'listener-cwd') => {+ const cwd = await pidCwd(pid);+ if (cwd) await addProject(cwd, pid, source);+ else if (isProcessAlive(pid))+ scan.unavailable.push(`Could not read the working directory of process ${pid}`);+ };+ for (const entry of entries) {+ if (!isValidLockPid(entry.pid)) continue;+ const marked = extractMarkedLockDir(entry.command);+ const project = extractProjectPathArg(entry.command);+ if (marked) await add(marked, entry.pid, 'lock-dir-argument');+ else if (project) await addProject(project, entry.pid, 'project-argument');+ else await addCwd(entry.pid, 'process-cwd');+ }+ const listeners = spawnSync(+ 'lsof',+ ['-iTCP', '-sTCP:LISTEN', '-nP'],+ withHiddenWindowsConsole({+ encoding: 'utf-8',+ timeout: SPAWN_TIMEOUT_MS,+ }),+ );+ if (+ listeners.error ||+ (listeners.status !== 0 && !(listeners.status === 1 && !listeners.stdout && !listeners.stderr))+ ) {+ scan.unavailable.push('Could not enumerate TCP listeners with lsof');+ return scan;+ }+ const known = new Set(entries.map((entry) => entry.pid));+ for (const pid of parseListeningPids(listeners.stdout ?? '')) {+ if (isValidLockPid(pid) && !known.has(pid)) await addCwd(pid, 'listener-cwd');+ }+ return scan;+}