hermes-agent/tests/hermes_cli
Teknium 46176c8029
refactor: centralize slash command registry (#1603)
* refactor: centralize slash command registry

Replace 7+ scattered command definition sites with a single
CommandDef registry in hermes_cli/commands.py. All downstream
consumers now derive from this registry:

- CLI process_command() resolves aliases via resolve_command()
- Gateway _known_commands uses GATEWAY_KNOWN_COMMANDS frozenset
- Gateway help text generated by gateway_help_lines()
- Telegram BotCommands generated by telegram_bot_commands()
- Slack subcommand map generated by slack_subcommand_map()

Adding a command or alias is now a one-line change to
COMMAND_REGISTRY instead of touching 6+ files.

Bugfixes included:
- Telegram now registers /rollback, /background (were missing)
- Slack now has /voice, /update, /reload-mcp (were missing)
- Gateway duplicate 'reasoning' dispatch (dead code) removed
- Gateway help text can no longer drift from CLI help

Backwards-compatible: COMMANDS and COMMANDS_BY_CATEGORY dicts are
rebuilt from the registry, so existing imports work unchanged.

* docs: update developer docs for centralized command registry

Update AGENTS.md with full 'Slash Command Registry' and 'Adding a
Slash Command' sections covering CommandDef fields, registry helpers,
and the one-line alias workflow.

Also update:
- CONTRIBUTING.md: commands.py description
- website/docs/reference/slash-commands.md: reference central registry
- docs/plans/centralize-command-registry.md: mark COMPLETED
- plans/checkpoint-rollback.md: reference new pattern
- hermes-agent-dev skill: architecture table

* chore: remove stale plan docs
2026-03-16 23:21:03 -07:00
..
__init__.py test: reorganize test structure and add missing unit tests 2026-02-26 03:20:08 +03:00
test_chat_skills_flag.py feat: preload CLI skills on launch (#1359) 2026-03-14 19:33:59 -07:00
test_claw.py feat: add 'hermes claw migrate' command + migration docs 2026-03-12 08:20:12 -07:00
test_cmd_update.py fix(cli): fall back to main when current branch has no remote counterpart 2026-03-14 12:16:00 -07:00
test_coalesce_session_args.py fix(cli): handle unquoted multi-word session names in -c/--continue and -r/--resume 2026-03-09 21:36:29 -07:00
test_commands.py refactor: centralize slash command registry (#1603) 2026-03-16 23:21:03 -07:00
test_config.py feat: seed a default global SOUL.md 2026-03-14 08:05:30 -07:00
test_cron.py feat: add multi-skill cron editing and docs 2026-03-14 19:18:10 -07:00
test_doctor.py fix(gateway): surface missing linger in status and doctor (#1296) 2026-03-14 06:11:33 -07:00
test_env_loader.py fix(config): reload .env over stale shell overrides 2026-03-15 06:46:28 -07:00
test_gateway.py feat(gateway): scope systemd service name to HERMES_HOME 2026-03-16 04:42:46 -07:00
test_gateway_linger.py feat(gateway): scope systemd service name to HERMES_HOME 2026-03-16 04:42:46 -07:00
test_gateway_runtime_health.py fix(gateway): harden Telegram polling conflict handling 2026-03-14 12:11:23 -07:00
test_gateway_service.py fix: auto-detect D-Bus session bus for systemctl --user on headless servers (#1601) 2026-03-16 17:45:48 -07:00
test_model_validation.py fix(custom-endpoint): verify /models and suggest working /v1 base URL (#1480) 2026-03-15 20:09:50 -07:00
test_models.py feat: auto-detect provider when switching models via /model (#1506) 2026-03-16 04:34:45 -07:00
test_path_completion.py feat(cli): add file path autocomplete in the input prompt (#1545) 2026-03-16 06:07:45 -07:00
test_placeholder_usage.py fix: cover remaining config placeholder help text 2026-03-14 10:35:14 -07:00
test_session_browse.py feat: interactive session browser with search filtering (#718) 2026-03-08 17:42:50 -07:00
test_sessions_delete.py fix(cli): accept session ID prefixes for session actions 2026-03-15 04:01:56 -07:00
test_set_config_value.py fix(docker): gate cwd workspace mount behind config 2026-03-16 05:20:56 -07:00
test_setup.py fix(test): make Nous setup prompt selection robust to optional vision step 2026-03-14 22:28:15 -07:00
test_setup_model_provider.py fix(custom-endpoint): verify /models and suggest working /v1 base URL (#1480) 2026-03-15 20:09:50 -07:00
test_setup_noninteractive.py fix: cover headless first-run setup flow 2026-03-14 02:37:29 -07:00
test_setup_openclaw_migration.py fix: cover headless first-run setup flow 2026-03-14 02:37:29 -07:00
test_setup_prompt_menus.py fix(cli): prefer curses over simple_term_menu in setup.py (#1487) 2026-03-15 21:16:21 -07:00
test_skills_config.py refactor: extract shared curses checklist, fix skill discovery perf 2026-03-11 03:06:15 -07:00
test_skills_hub.py fix(skills): honor policy table for dangerous verdicts 2026-03-14 11:27:02 -07:00
test_skills_install_flags.py fix(cli): add --yes alias for skills install 2026-03-14 11:27:23 -07:00
test_skills_subparser.py fix(cli): resolve duplicate 'skills' subparser crash on Python 3.11+ 2026-03-11 00:50:39 -07:00
test_skin_engine.py fix(cli): make TUI prompt and accent output skin-aware 2026-03-14 03:12:52 -07:00
test_status_model_provider.py Show configured model and provider in status output 2026-03-14 03:35:37 -07:00
test_tools_config.py fix(tools): preserve MCP toolsets when saving platform tool config 2026-03-15 03:28:20 -07:00
test_update_autostash.py fix(update): clarify manual autostash cleanup 2026-03-14 22:56:59 -07:00
test_update_check.py fix(cli): non-blocking startup update check and banner deduplication 2026-03-14 21:45:50 -07:00
test_update_gateway_restart.py fix: hermes update causes dual gateways on macOS (launchd) (#1567) 2026-03-16 12:36:29 -07:00