hermes-agent/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 chore: bump version to v0.2.0 + add curated first-release changelog 2026-03-12 01:52:53 -07:00
auth.py feat: auto-detect provider when switching models via /model (#1506) 2026-03-16 04:34:45 -07:00
banner.py fix(cli): non-blocking startup update check and banner deduplication 2026-03-14 21:45:50 -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 feat: add 'hermes claw migrate' command + migration docs 2026-03-12 08:20:12 -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 Cleanup time! 2026-02-20 23:23:32 -08:00
commands.py refactor: centralize slash command registry (#1603) 2026-03-16 23:21:03 -07:00
config.py merge: resolve conflicts with main (show_cost, turn routing, docker docs) 2026-03-16 14:22:38 -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 fix(gateway): surface missing linger in status and doctor (#1296) 2026-03-14 06:11:33 -07:00
env_loader.py fix(config): reload .env over stale shell overrides 2026-03-15 06:46:28 -07:00
gateway.py fix: auto-detect D-Bus session bus for systemctl --user on headless servers (#1601) 2026-03-16 17:45:48 -07:00
main.py fix: auto-detect D-Bus session bus for systemctl --user on headless servers (#1601) 2026-03-16 17:45:48 -07:00
models.py feat: auto-detect provider when switching models via /model (#1506) 2026-03-16 04:34:45 -07:00
pairing.py Cleanup time! 2026-02-20 23:23:32 -08:00
plugins.py feat: first-class plugin architecture (#1555) 2026-03-16 07:17:36 -07:00
runtime_provider.py fix: restore config-saved custom endpoint resolution 2026-03-14 20:58:12 -07:00
setup.py fix(setup): defer config.yaml write until after model selection 2026-03-16 00:18:30 -07:00
skills_config.py fix: wire email platform into toolset mappings + add documentation 2026-03-11 06:34:32 -07:00
skills_hub.py fix(skills): honor policy table for dangerous verdicts 2026-03-14 11:27:02 -07:00
skin_engine.py feat(tools): centralize tool emoji metadata in registry + skin integration 2026-03-15 20:21:21 -07:00
status.py feat(gateway): scope systemd service name to HERMES_HOME 2026-03-16 04:42:46 -07:00
tools_config.py fix(tools): preserve MCP toolsets when saving platform tool config 2026-03-15 03:28:20 -07:00
uninstall.py feat(gateway): scope systemd service name to HERMES_HOME 2026-03-16 04:42:46 -07:00