The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(profiles): profiles named dashboard, serve or webapp get their wrapper alias as on main
emozilla98bfbb2b259c
diff --git a/hermes_cli/profiles.py b/hermes_cli/profiles.pyindex 759bae387cc..5e67e3faf0c 100644--- a/hermes_cli/profiles.py+++ b/hermes_cli/profiles.py@@ -273,7 +273,7 @@ _RESERVED_NAMES = frozenset({"hermes", "default", "test", "tmp", "root", "sudo"}# Hermes subcommands that cannot be used as profile names/aliases_HERMES_SUBCOMMANDS = frozenset({"chat", "model", "gateway", "setup", "whatsapp", "login", "logout",- "status", "cron", "doctor", "dump", "config", "pairing", "skills", "tools", "serve", "dashboard", "webapp",+ "status", "cron", "doctor", "dump", "config", "pairing", "skills", "tools","mcp", "connectors", "sessions", "insights", "version", "update", "uninstall", "profile", "plugins", "honcho", "acp",})diff --git a/tests/hermes_cli/test_profiles_alias_names.py b/tests/hermes_cli/test_profiles_alias_names.pynew file mode 100644index 00000000000..c49a48ea095--- /dev/null+++ b/tests/hermes_cli/test_profiles_alias_names.py@@ -0,0 +1,22 @@+"""``hermes profile`` alias names: profiles named like Hermes' server subcommands keep their alias.++A profile's wrapper alias is its own command on PATH (``~/.local/bin/<name>``); it does not shadow+``hermes dashboard``, ``hermes serve`` or ``hermes webapp``, so ``check_alias_collision`` admits those+names as main does: ``hermes profile create dashboard`` gets its ``dashboard`` alias, and ``profile+alias``, rename and import accept them.+"""+from __future__ import annotations++import subprocess++import pytest++from hermes_cli.profiles import check_alias_collision++[email protected]("name", ["dashboard", "serve", "webapp"])+def test_an_alias_named_like_a_server_subcommand_is_allowed_as_on_main(monkeypatch, name):+ # No such command on PATH, so only Hermes' own rules decide.+ monkeypatch.setattr(subprocess, "run", lambda *a, **k: subprocess.CompletedProcess(a, 1, "", ""))++ assert check_alias_collision(name) is None