The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(gui): detect leftover desktop install records
itsflownium80efaa56ee16
diff --git a/hermes_cli/gui_uninstall.py b/hermes_cli/gui_uninstall.pyindex e25cffb5c89..48694264e8a 100644--- a/hermes_cli/gui_uninstall.py+++ b/hermes_cli/gui_uninstall.py@@ -86,8 +86,11 @@ def agent_is_installed(hermes_home: Path) -> bool:def gui_is_installed(hermes_home: Path) -> bool:- """Return True when any desktop GUI artifact exists (built or packaged)."""- return any(p.exists() for p in (*source_built_gui_artifacts(hermes_home), *packaged_gui_app_paths(), desktop_userdata_dir()))+ """Return True when any desktop GUI artifact or install record exists."""+ return any(p.exists() for p in (+ *source_built_gui_artifacts(hermes_home), *packaged_gui_app_paths(),+ desktop_userdata_dir(), desktop_install_record(),+ ))def gui_install_summary(hermes_home: "Path | None" = None) -> dict:diff --git a/tests/hermes_cli/test_gui_uninstall_retention.py b/tests/hermes_cli/test_gui_uninstall_retention.pyindex 621d549034b..807410516cd 100644--- a/tests/hermes_cli/test_gui_uninstall_retention.py+++ b/tests/hermes_cli/test_gui_uninstall_retention.py@@ -9,9 +9,10 @@ from hermes_cli import gui_uninstall, mainfrom hermes_constants import get_hermes_home-def installation(tmp_path, monkeypatch):[email protected](params=("complete", "record_only"))+def installation(request, tmp_path, monkeypatch):monkeypatch.setattr(Path, "home", lambda: tmp_path)+ monkeypatch.setenv("HERMES_HOME", str(tmp_path / ".hermes"))home = get_hermes_home()assert home.resolve().is_relative_to(tmp_path.resolve())root = home / "hermes-agent"@@ -35,6 +36,8 @@ def installation(tmp_path, monkeypatch):userdata / "connections.json": b'{"fixture": true}',record: b'{"fixture": true}',}+ if request.param == "record_only":+ gui_files = {record: gui_files[record]}for path, data in {**protected, **gui_files}.items():path.parent.mkdir(parents=True, exist_ok=True)path.write_bytes(data)