hermes-agent/hermes_cli
Teknium 4a65c9cd08
fix: profile paths broken in Docker — profiles go to /root/.hermes instead of mounted volume (#7170)
In Docker, HERMES_HOME=/opt/data (set in Dockerfile) and users mount
their .hermes directory to /opt/data. However, profile operations used
Path.home() / '.hermes' which resolves to /root/.hermes in Docker —
an ephemeral container path, not the mounted volume.

This caused:
- Profiles created at /root/.hermes/profiles/ (lost on container recreate)
- active_profile sticky file written to wrong location
- profile list looking at wrong directory

Fix: Add get_default_hermes_root() to hermes_constants.py that detects
Docker/custom deployments (HERMES_HOME outside ~/.hermes) and returns
HERMES_HOME as the root. Also handles Docker profiles correctly
(<root>/profiles/<name> → root is grandparent).

Files changed:
- hermes_constants.py: new get_default_hermes_root()
- hermes_cli/profiles.py: _get_default_hermes_home() delegates to shared fn
- hermes_cli/main.py: _apply_profile_override() + _invalidate_update_cache()
- hermes_cli/gateway.py: _profile_suffix() + _profile_arg()
- Tests: 12 new tests covering Docker scenarios
2026-04-10 05:53:10 -07:00
..
__init__.py chore: release v0.8.0 (2026.4.8) (#6135) 2026-04-08 04:56:20 -07:00
auth.py fix: flush stdin after curses/terminal menus to prevent escape sequence leakage (#7167) 2026-04-10 05:32:31 -07:00
auth_commands.py fix(auth): make 'auth remove' for claude_code prevent re-seeding 2026-04-10 05:19:21 -07:00
banner.py fix: remove 115 verified dead code symbols across 46 production files 2026-04-10 03:44:43 -07:00
callbacks.py refactor: remove 24 confirmed dead functions — 432 lines of unused code 2026-04-07 11:41:26 -07:00
claw.py refactor: codebase-wide lint cleanup — unused imports, dead code, and inefficient patterns (#5821) 2026-04-07 10:25:31 -07:00
clipboard.py refactor: deduplicate PowerShell script constants between Windows and WSL paths 2026-04-07 12:49:39 -07:00
codex_models.py fix: add gpt-5.4-mini to Codex fallback catalog (#3855) 2026-03-29 20:10:00 -07:00
colors.py feat: respect NO_COLOR env var and TERM=dumb (#4079) 2026-03-30 17:07:21 -07:00
commands.py fix(cli): make /status show gateway-style session status 2026-04-10 05:19:26 -07:00
config.py fix: STT provider-model mismatch — whisper-1 fed to faster-whisper (#7113) 2026-04-10 03:27:30 -07:00
copilot_auth.py fix: remove 115 verified dead code symbols across 46 production files 2026-04-10 03:44:43 -07:00
cron.py feat(cron): track delivery failures in job status (#6042) 2026-04-07 22:49:01 -07:00
curses_ui.py fix: flush stdin after curses/terminal menus to prevent escape sequence leakage (#7167) 2026-04-10 05:32:31 -07:00
default_soul.py fix: reset default SOUL.md to baseline identity text (#3159) 2026-03-26 01:34:27 -07:00
doctor.py fix: update Kimi Coding User-Agent to KimiCLI/1.30.0 2026-04-10 02:37:28 -07:00
dump.py fix: remove 115 verified dead code symbols across 46 production files 2026-04-10 03:44:43 -07:00
env_loader.py chore: remove ~100 unused imports across 55 files (#3016) 2026-03-25 15:02:03 -07:00
gateway.py fix: profile paths broken in Docker — profiles go to /root/.hermes instead of mounted volume (#7170) 2026-04-10 05:53:10 -07:00
logs.py refactor: codebase-wide lint cleanup — unused imports, dead code, and inefficient patterns (#5821) 2026-04-07 10:25:31 -07:00
main.py fix: profile paths broken in Docker — profiles go to /root/.hermes instead of mounted volume (#7170) 2026-04-10 05:53:10 -07:00
mcp_config.py fix: add TTY guard to interactive CLI commands to prevent CPU spin (#3933) 2026-03-30 08:10:23 -07:00
memory_setup.py refactor: replace inline HERMES_HOME re-implementations with get_hermes_home() 2026-04-07 10:40:34 -07:00
model_normalize.py fix(model): tighten direct-provider fallback normalization 2026-04-10 05:52:45 -07:00
model_switch.py fix: opencode-go missing from /model list and improve HERMES_OVERLAYS credential check 2026-04-10 05:52:45 -07:00
models.py fix: remove 115 verified dead code symbols across 46 production files 2026-04-10 03:44:43 -07:00
nous_subscription.py feat: switch managed browser provider from Browserbase to Browser Use (#5750) 2026-04-07 08:40:22 -04:00
pairing.py chore: fix 154 f-strings, simplify getattr/URL patterns, remove dead code (#3119) 2026-03-25 19:47:58 -07:00
plugins.py feat(cli): add on_session_finalize and on_session_reset plugin hooks 2026-04-08 04:27:34 -07:00
plugins_cmd.py refactor: replace inline HERMES_HOME re-implementations with get_hermes_home() 2026-04-07 10:40:34 -07:00
profiles.py fix: profile paths broken in Docker — profiles go to /root/.hermes instead of mounted volume (#7170) 2026-04-10 05:53:10 -07:00
providers.py fix: remove 115 verified dead code symbols across 46 production files 2026-04-10 03:44:43 -07:00
runtime_provider.py fix: skip stale Nous pool entry when agent_key is expired 2026-04-09 21:48:50 -07:00
setup.py fix: flush stdin after curses/terminal menus to prevent escape sequence leakage (#7167) 2026-04-10 05:32:31 -07:00
skills_config.py fix(bluebubbles): add missing integration points and documentation (#6460) 2026-04-09 00:19:05 -07:00
skills_hub.py fix(skills): validate hub bundle paths before install (#3986) 2026-03-30 08:37:19 -07:00
skin_engine.py refactor: codebase-wide lint cleanup — unused imports, dead code, and inefficient patterns (#5821) 2026-04-07 10:25:31 -07:00
status.py fix: deduplicate _is_termux() into hermes_constants.is_termux() 2026-04-09 16:24:53 -07:00
tools_config.py fix: flush stdin after curses/terminal menus to prevent escape sequence leakage (#7167) 2026-04-10 05:32:31 -07:00
uninstall.py fix(cli): add missing os and platform imports in uninstall.py (#7034) 2026-04-10 02:41:33 -07:00
webhook.py refactor: replace inline HERMES_HOME re-implementations with get_hermes_home() 2026-04-07 10:40:34 -07:00