hermes-agent/hermes_cli
Teknium 77bcaba2d7
refactor: consolidate get_hermes_home() and parse_reasoning_effort() (#3062)
Centralizes two widely-duplicated patterns into hermes_constants.py:

1. get_hermes_home() — Path resolution for ~/.hermes (HERMES_HOME env var)
   - Was copy-pasted inline across 30+ files as:
     Path(os.getenv("HERMES_HOME", Path.home() / ".hermes"))
   - Now defined once in hermes_constants.py (zero-dependency module)
   - hermes_cli/config.py re-exports it for backward compatibility
   - Removed local wrapper functions in honcho_integration/client.py,
     tools/website_policy.py, tools/tirith_security.py, hermes_cli/uninstall.py

2. parse_reasoning_effort() — Reasoning effort string validation
   - Was copy-pasted in cli.py, gateway/run.py, cron/scheduler.py
   - Same validation logic: check against (xhigh, high, medium, low, minimal, none)
   - Now defined once in hermes_constants.py, called from all 3 locations
   - Warning log for unknown values kept at call sites (context-specific)

31 files changed, net +31 lines (125 insertions, 94 deletions)
Full test suite: 6179 passed, 0 failed
2026-03-25 15:54:28 -07:00
..
__init__.py chore: release v0.4.0 (v2026.3.23) 2026-03-23 22:34:04 -07:00
auth.py fix(auth): preserve 'custom' provider instead of silently remapping to 'openrouter' 2026-03-24 06:41:11 -07:00
banner.py refactor: consolidate get_hermes_home() and parse_reasoning_effort() (#3062) 2026-03-25 15:54:28 -07:00
callbacks.py refactor(cli): implement approval locking mechanism to serialize concurrent requests 2026-03-13 23:59:18 -07:00
checklist.py fix: skip hanging tests + add global test timeout 2026-03-12 01:23:28 -07:00
claw.py chore: remove ~100 unused imports across 55 files (#3016) 2026-03-25 15:02:03 -07:00
clipboard.py fix: clean up empty file after failed wl-paste clipboard extraction 2026-03-11 02:56:19 -07:00
codex_models.py fix: add codex forward-compat model listing 2026-03-13 21:34:01 -07:00
colors.py Revert "feat(cli): skin-aware light/dark theme mode with terminal auto-detection" 2026-03-17 10:04:53 -07:00
commands.py chore: remove ~100 unused imports across 55 files (#3016) 2026-03-25 15:02:03 -07:00
config.py refactor: consolidate get_hermes_home() and parse_reasoning_effort() (#3062) 2026-03-25 15:54:28 -07:00
copilot_auth.py chore: remove ~100 unused imports across 55 files (#3016) 2026-03-25 15:02:03 -07:00
cron.py docs: clarify gateway service scopes (#1378) 2026-03-14 21:17:41 -07:00
curses_ui.py refactor: extract shared curses checklist, fix skill discovery perf 2026-03-11 03:06:15 -07:00
default_soul.py feat: seed a default global SOUL.md 2026-03-14 08:05:30 -07:00
doctor.py chore: remove ~100 unused imports across 55 files (#3016) 2026-03-25 15:02:03 -07:00
env_loader.py chore: remove ~100 unused imports across 55 files (#3016) 2026-03-25 15:02:03 -07:00
gateway.py refactor: consolidate get_hermes_home() and parse_reasoning_effort() (#3062) 2026-03-25 15:54:28 -07:00
main.py chore: remove ~100 unused imports across 55 files (#3016) 2026-03-25 15:02:03 -07:00
mcp_config.py chore: remove ~100 unused imports across 55 files (#3016) 2026-03-25 15:02:03 -07:00
model_switch.py chore: remove ~100 unused imports across 55 files (#3016) 2026-03-25 15:02:03 -07:00
models.py feat(model): /model command overhaul — Phases 2, 3, 5 2026-03-24 06:58:04 -07:00
pairing.py Cleanup time! 2026-02-20 23:23:32 -08:00
plugins.py revert: remove trailing empty assistant message stripping 2026-03-22 04:55:34 -07:00
plugins_cmd.py feat(cli): add hermes plugins install/remove/list command 2026-03-21 09:47:33 -07:00
runtime_provider.py fix(auth): preserve 'custom' provider instead of silently remapping to 'openrouter' 2026-03-24 06:41:11 -07:00
setup.py chore: remove ~100 unused imports across 55 files (#3016) 2026-03-25 15:02:03 -07:00
skills_config.py chore: remove ~100 unused imports across 55 files (#3016) 2026-03-25 15:02:03 -07:00
skills_hub.py chore: remove ~100 unused imports across 55 files (#3016) 2026-03-25 15:02:03 -07:00
skin_engine.py refactor: consolidate get_hermes_home() and parse_reasoning_effort() (#3062) 2026-03-25 15:54:28 -07:00
status.py feat(web): add Tavily as web search/extract/crawl backend (#1731) 2026-03-17 04:28:03 -07:00
tools_config.py chore: remove ~100 unused imports across 55 files (#3016) 2026-03-25 15:02:03 -07:00
uninstall.py refactor: consolidate get_hermes_home() and parse_reasoning_effort() (#3062) 2026-03-25 15:54:28 -07:00