hermes-agent/hermes_cli
Teknium 14a5e56f6f
refactor: consolidate gateway session metadata into state.db
Move gateway routing metadata (session_key, platform, chat_type, origin,
display_name, memory_flushed) from sessions.json into the sessions table
in state.db. This eliminates the dual-file dependency that caused the
mcp_serve polling bug (#8925) and makes state.db the single source of
truth for session discovery.

Changes:
- Schema v7 migration: add 6 new columns to sessions table with backfill
  from existing sessions.json during migration
- New SessionDB methods: set_gateway_metadata(), list_gateway_sessions(),
  find_session_by_origin(), set_memory_flushed()
- Gateway session.py: write routing metadata to state.db on every
  session create/reset/switch
- Rewire all consumers (mcp_serve, mirror, channel_directory, status)
  to query state.db first with sessions.json fallback for pre-migration
  databases
- mcp_serve _poll_once: simplified to watch only state.db mtime (fixes
  the split-mtime bug from #8925 as a side effect)

sessions.json continues to be written by the gateway for now but is no
longer read as the primary source by any consumer. Can be made optional
in a future PR.
2026-04-13 05:07:35 -07:00
..
__init__.py chore: release v0.8.0 (2026.4.8) (#6135) 2026-04-08 04:56:20 -07:00
auth.py fix: write refreshed Codex tokens back to ~/.codex/auth.json (#8277) 2026-04-12 02:05:20 -07:00
auth_commands.py fix(auth): make 'auth remove' for claude_code prevent re-seeding 2026-04-10 05:19:21 -07:00
backup.py fix(backup): correct marker filenames in _validate_backup_zip 2026-04-12 16:35:56 -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 fix: unify OpenClaw detection, add isatty guard, fix print_warning import 2026-04-12 16:40:37 -07:00
cli_output.py refactor: extract shared helpers to deduplicate repeated code patterns (#7917) 2026-04-11 13:59:52 -07:00
clipboard.py feat(gateway): WSL-aware gateway with smart systemd detection (#7510) 2026-04-10 21:15:47 -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 feat: web UI dashboard for managing Hermes Agent (#8756) 2026-04-12 22:26:28 -07:00
config.py feat: web UI dashboard for managing Hermes Agent (#8756) 2026-04-12 22:26:28 -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 feat(cli): add native /model picker modal for provider → model selection 2026-04-11 17:16:06 -07:00
debug.py feat: add hermes debug share — upload debug report to pastebin (#8681) 2026-04-12 18:05:14 -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 refactor: extract shared helpers to deduplicate repeated code patterns (#7917) 2026-04-11 13:59:52 -07:00
dump.py fix(gateway): harden Docker/container gateway pathway 2026-04-12 16:36:11 -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(gateway): keep venv python symlink unresolved when remapping paths 2026-04-13 00:49:22 -07:00
logs.py feat: component-separated logging with session context and filtering (#7991) 2026-04-11 17:23:36 -07:00
main.py feat: web UI dashboard for managing Hermes Agent (#8756) 2026-04-12 22:26:28 -07:00
mcp_config.py feat: add --env and --preset support to hermes mcp add 2026-04-11 15:34:57 -07:00
memory_setup.py refactor: extract shared helpers to deduplicate repeated code patterns (#7917) 2026-04-11 13:59:52 -07:00
model_normalize.py fix: preserve dots in model names for OpenCode Zen and ZAI providers (#8794) 2026-04-12 21:22:59 -07:00
model_switch.py fix(cli): narrow Nous Hermes non-agentic warning to actual hermes-3/-4 models 2026-04-13 04:33:52 -07:00
models.py fix: preserve dots in model names for OpenCode Zen and ZAI providers (#8794) 2026-04-12 21:22:59 -07:00
nous_subscription.py feat(tools): add Voxtral TTS provider (Mistral AI) 2026-04-11 01:56:55 -07:00
pairing.py chore: fix 154 f-strings, simplify getattr/URL patterns, remove dead code (#3119) 2026-03-25 19:47:58 -07:00
platforms.py docs: add platform adapter developer guide + WeCom Callback docs (#7969) 2026-04-11 15:50:54 -07:00
plugins.py feat: wire context engine plugin slot into agent and plugin system 2026-04-10 19:15:50 -07:00
plugins_cmd.py fix: no auto-activation + unified hermes plugins UI with provider categories 2026-04-10 19:15:50 -07:00
profiles.py fix: improve profile creation UX — seed SOUL.md + credential warning (#8553) 2026-04-12 12:22:34 -07:00
providers.py feat(xiaomi): add Xiaomi MiMo as first-class provider 2026-04-11 11:17:52 -07:00
runtime_provider.py fix: propagate model through credential pool path + add tests 2026-04-11 14:09:40 -07:00
setup.py fix: preserve dots in model names for OpenCode Zen and ZAI providers (#8794) 2026-04-12 21:22:59 -07:00
skills_config.py refactor: extract shared helpers to deduplicate repeated code patterns (#7917) 2026-04-11 13:59:52 -07:00
skills_hub.py fix(skills): cache GitHub repo trees to avoid rate-limit exhaustion on install 2026-04-12 16:39:04 -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 refactor: consolidate gateway session metadata into state.db 2026-04-13 05:07:35 -07:00
tips.py feat(tips): add 69 deeper hidden-gem tips (279 total) (#8237) 2026-04-12 00:54:07 -07:00
tools_config.py refactor: extract shared helpers to deduplicate repeated code patterns (#7917) 2026-04-11 13:59:52 -07:00
uninstall.py fix(cli): add missing os and platform imports in uninstall.py (#7034) 2026-04-10 02:41:33 -07:00
web_server.py feat: web UI dashboard for managing Hermes Agent (#8756) 2026-04-12 22:26:28 -07:00
webhook.py refactor: replace inline HERMES_HOME re-implementations with get_hermes_home() 2026-04-07 10:40:34 -07:00