From e8bb6d56eae45a6f78e9107b2637557db1f4669f Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Sun, 8 Nov 2026 20:03:03 +0000 Subject: [PATCH] Vorgabe ohne "hermes" im Pfad: $XDG_DATA_HOME/tasksd, sonst ~/.local/share/tasksd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Die Aufgaben gehören dem Dienst, nicht dem Agenten-Framework. Auf n95 unverändert /var/lib/tasksd über TASKDIR. --- tasksd.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tasksd.c b/tasksd.c index e268653..c489cc2 100644 --- a/tasksd.c +++ b/tasksd.c @@ -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; }