Avoid Hermes Home Assistant toolset collision
This commit is contained in:
@@ -52,10 +52,21 @@ import pathlib
|
||||
|
||||
root = pathlib.Path(os.environ["HERMES_DATA_DIR"]) / "profiles"
|
||||
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()
|
||||
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
|
||||
|
||||
"${STACK_DIR:-/opt/mike-ai/stack}/platform/hermes/install-skills.sh"
|
||||
|
||||
Reference in New Issue
Block a user