Vorgabe ohne "hermes" im Pfad: $XDG_DATA_HOME/skilld, sonst ~/.local/share/skilld
Die Ablage gehört dem Dienst, nicht dem Agenten-Framework — der Name des Frameworks hat in einem Datenpfad nichts zu suchen. Ist XDG_DATA_HOME gesetzt, gilt das; sonst der Standardort ~/.local/share. Auf n95 unverändert /var/lib/skilld über SKILLLIB.
This commit is contained in:
1 parent
317ea9ba40
commit
4fab73a70a
1 file changed
+9
-2
@@ -7,7 +7,7 @@
|
||||
* Built on libmcp (../libmcp/mcp.h): this file owns storage and the tool
|
||||
* handlers, the library owns the protocol.
|
||||
*
|
||||
* Storage: $SKILLLIB (default ~/.hermes/skilld)
|
||||
* Storage: $SKILLLIB (default $XDG_DATA_HOME/skilld, else ~/.local/share/skilld)
|
||||
* <name>/SKILL.md YAML frontmatter + markdown body
|
||||
* <name>/<anything> references, scripts, templates
|
||||
*/
|
||||
@@ -86,7 +86,14 @@ static char *skilllib_path(void)
|
||||
home = getenv("HOME");
|
||||
if (home == NULL)
|
||||
home = "/tmp";
|
||||
mcp_buf_printf(&b, "%s/.hermes/skilld", home);
|
||||
{
|
||||
const char *xdg = getenv("XDG_DATA_HOME");
|
||||
|
||||
if (xdg != NULL && *xdg != '\0')
|
||||
mcp_buf_printf(&b, "%s/skilld", xdg);
|
||||
else
|
||||
mcp_buf_printf(&b, "%s/.local/share/skilld", home);
|
||||
}
|
||||
return b.p;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user