fix: persist memory across Docker restarts #2

Closed
Barsic Bot wants to merge 21 commits from fix/persistent-memory-docker into master
pull from: fix/persistent-memory-docker
Showing only changes of commit 870b3ffec4 - Show all commits
+12 -1
View File
@@ -1,5 +1,16 @@
"""Memory package for HomeAgent."""
from pathlib import Path
from typing import Optional
from homeagent.memory.global_memory import GlobalMemory, MemoryItem, get_global_memory
__all__ = ["GlobalMemory", "MemoryItem", "get_global_memory"]
def get_configured_global_memory(data_dir: Optional[Path] = None) -> GlobalMemory:
"""Return global memory under the configured durable data directory."""
if data_dir is None:
return get_global_memory()
return get_global_memory(Path(data_dir) / "global_memory.json")
__all__ = ["GlobalMemory", "MemoryItem", "get_global_memory", "get_configured_global_memory"]