Skip to content

The agent that grows with you

fix(review): /api/profiles/active fails closed on `current`; document the hub-action secret scope

teknium12f0b102ce346
diff --git a/hermes_cli/web_routers/profiles.py b/hermes_cli/web_routers/profiles.py
index 553530b50c1..d8e384c72ff 100644
--- a/hermes_cli/web_routers/profiles.py
+++ b/hermes_cli/web_routers/profiles.py
@@ -881,13 +881,15 @@ async def get_active_profile_endpoint():
def _run():
# Both reads touch the filesystem; one hop so sidebar polling costs one round-trip.
- def _or_default(fn):
+ def _or_default(fn, on_error="default"):
try:
return fn() or "default"
except Exception:
- return "default"
+ return on_error
+ # A dashboard that cannot name its own home must not read as the machine
+ # dashboard: "default" is exactly what lets the SPA adopt the sticky profile.
return {"active": _or_default(profiles_mod.get_active_profile),
- "current": _or_default(profiles_mod.get_active_profile_name)}
+ "current": _or_default(profiles_mod.get_active_profile_name, on_error="custom")}
return await run_in_threadpool(_run)
diff --git a/website/docs/user-guide/features/web-dashboard.md b/website/docs/user-guide/features/web-dashboard.md
index 83800cead22..fe693cf4009 100644
--- a/website/docs/user-guide/features/web-dashboard.md
+++ b/website/docs/user-guide/features/web-dashboard.md
@@ -79,6 +79,11 @@ child with the selected profile's `HERMES_HOME`, so the conversation runs
with that profile's model, skills, memory, and session history. Switching
profiles starts a fresh terminal session.
+Hub actions (skill install/update/uninstall, MCP install, toolset setup)
+run with the target profile's own secret scope — its `.env` and configured
+secret sources — not the dashboard process's environment; this includes
+actions targeting the `default` profile from the machine dashboard.
+
What stays per-profile and is *not* absorbed by the switcher: gateway
processes (manage them via `hermes -p <name> gateway …`), each profile's
session database, and cron schedulers (the Cron page already aggregates