The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(backup): keep cache/generated in hermes backup archives
kshitijk4poor0ecc5c644a89
diff --git a/hermes_cli/backup.py b/hermes_cli/backup.pyindex 66ad325be78..25dad5831d9 100644--- a/hermes_cli/backup.py+++ b/hermes_cli/backup.py@@ -24,6 +24,7 @@ from hermes_constants import (from hermes_state_dbfile import RETIRED_GENERATION_DIR_SUFFIXfrom hermes_state_holders import read_only_db_uri+from agent.provider_media import GENERATED_SUBDIRfrom hermes_cli.archive_safe import normalize_archive_partsfrom hermes_cli.backup_sqlite import _close_quietly, _safe_copy_dbfrom hermes_cli.home_data_layout import PM_RUNTIME_ROOT_DIRS, profile_root_entry@@ -100,7 +101,8 @@ _EXCLUDED_BACKUP_ROOT_DIRS = frozenset({"browser_profiles"})# profiles with locked SQLite, tool-output spill) with durable artifacts nothing can rebuild: media# the gateway delivered to or received from the user (``gateway.platforms.base``'s media-delivery# subdirs) and the grounded-citations evidence ledger. Only these subdirs are archived.-_KEPT_CACHE_SUBDIRS = {"images", "audio", "videos", "documents", "screenshots", "citations"}+_KEPT_CACHE_SUBDIRS = {+ "images", "audio", "videos", "documents", "screenshots", "citations", GENERATED_SUBDIR}def _in_excluded_root_dir(rel_path: Path) -> bool:diff --git a/tests/hermes_cli/test_backup.py b/tests/hermes_cli/test_backup.pyindex 6917fa0dbbe..6587379bfdf 100644--- a/tests/hermes_cli/test_backup.py+++ b/tests/hermes_cli/test_backup.py@@ -277,6 +277,8 @@ class TestIterBackupFiles:"cache/images/x.png": True,"cache/citations/ledger.json": True,"profiles/sage/cache/images/y.png": True,+ "cache/generated/images/x.png": True,+ "profiles/sage/cache/generated/videos/v.mp4": True,"skills/example/cache/state.db": True,}for rel in files: