Vorgabe ohne "hermes" im Pfad: $XDG_DATA_HOME/tasksd, sonst ~/.local/share/tasksd

Die Aufgaben gehören dem Dienst, nicht dem Agenten-Framework. Auf n95 unverändert
/var/lib/tasksd über TASKDIR.
This commit is contained in:
Hermes Agent committed 2026-11-08 20:03:03 +00:00
1 parent ddb7355868
commit e8bb6d56ea
1 file changed
+9 -2
+9 -2
View File
@@ -15,7 +15,7 @@
* anything below it, so task_next(scope="fleet") also picks "fleet/console"
* work. There is no list object: the scope IS the category.
*
* Storage is one JSON file per task under $TASKDIR (default ~/.hermes/tasks):
* Storage is one JSON file per task under $TASKDIR (default $XDG_DATA_HOME/tasksd, else ~/.local/share/tasksd):
*
* t0001.json {"id","title","goal","scope","tags","state","priority",
* "created","started","ended","result"}
@@ -64,7 +64,14 @@ static char *tasks_root(void)
home = getenv("HOME");
if (home == NULL)
home = "/tmp";
mcp_buf_printf(&b, "%s/.hermes/tasks", home);
{
const char *xdg = getenv("XDG_DATA_HOME");
if (xdg != NULL && *xdg != '\0')
mcp_buf_printf(&b, "%s/tasksd", xdg);
else
mcp_buf_printf(&b, "%s/.local/share/tasksd", home);
}
return b.p;
}