Vorgabe ohne "hermes" im Pfad: $XDG_DATA_HOME/memoryd, sonst ~/.local/share/memoryd
Die Erinnerungen gehören dem Dienst, nicht dem Agenten-Framework. Auf n95 unverändert /var/lib/memoryd über MEMORYDIR.
This commit is contained in:
1 parent
f8e336c0f6
commit
61382a8f66
2 files changed
+9
-2
No files matched your search
@@ -13,7 +13,7 @@ memoryd --http 8795 # Streamable HTTP, so every host uses the same store
|
||||
|
||||
## Storage
|
||||
|
||||
One JSON file per memory under `$MEMORYDIR` (default `~/.hermes/memories`):
|
||||
One JSON file per memory under `$MEMORYDIR` (default `$XDG_DATA_HOME/memoryd`, else `~/.local/share/memoryd`):
|
||||
|
||||
```json
|
||||
{
|
||||
|
||||
@@ -94,7 +94,14 @@ static char *mem_root(void)
|
||||
home = getenv("HOME");
|
||||
if (home == NULL)
|
||||
home = "/tmp";
|
||||
mcp_buf_printf(&b, "%s/.hermes/memories", home);
|
||||
{
|
||||
const char *xdg = getenv("XDG_DATA_HOME");
|
||||
|
||||
if (xdg != NULL && *xdg != '\0')
|
||||
mcp_buf_printf(&b, "%s/memoryd", xdg);
|
||||
else
|
||||
mcp_buf_printf(&b, "%s/.local/share/memoryd", home);
|
||||
}
|
||||
return b.p;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user