Avoid Hermes Home Assistant toolset collision

This commit is contained in:
Mikei386 committed 2026-08-25 15:41:30 +02:00
1 parent 137b2e915c
commit f5c2817c19
2 files changed
+14 -3

No files matched your search

+1 -1
View File
@@ -149,7 +149,7 @@ mcp_servers:
timeout: 300 timeout: 300
connect_timeout: 30 connect_timeout: 30
supports_parallel_tool_calls: false supports_parallel_tool_calls: false
homeassistant: homeassistant-admin:
url: "http://mcp-homeassistant:8000/mcp" url: "http://mcp-homeassistant:8000/mcp"
timeout: 300 timeout: 300
connect_timeout: 30 connect_timeout: 30
+13 -2
View File
@@ -52,10 +52,21 @@ import pathlib
root = pathlib.Path(os.environ["HERMES_DATA_DIR"]) / "profiles" root = pathlib.Path(os.environ["HERMES_DATA_DIR"]) / "profiles"
placeholder = "${ROUTER_API_KEY}" placeholder = "${ROUTER_API_KEY}"
for path in sorted(root.glob("*/config.yaml")): paths = [pathlib.Path(os.environ["HERMES_DATA_DIR"]) / "config.yaml"]
paths.extend(sorted(root.glob("*/config.yaml")))
for path in paths:
if not path.exists():
continue
text = path.read_text() text = path.read_text()
if placeholder in text: if placeholder in text:
path.write_text(text.replace(placeholder, os.environ["ROUTER_API_KEY"], 1)) text = text.replace(placeholder, os.environ["ROUTER_API_KEY"], 1)
# Avoid collision with Hermes' disabled built-in `homeassistant` toolset.
# The collision filters the healthy external MCP out of agent snapshots.
text = text.replace(
"\n homeassistant:\n url: http://mcp-homeassistant:8000/mcp\n",
"\n homeassistant-admin:\n url: http://mcp-homeassistant:8000/mcp\n",
)
path.write_text(text)
PY PY
"${STACK_DIR:-/opt/mike-ai/stack}/platform/hermes/install-skills.sh" "${STACK_DIR:-/opt/mike-ai/stack}/platform/hermes/install-skills.sh"