Skip to content

refactor(commands): drop /provider, /plan handler, and clean up slash registry#15047

Merged
teknium1 merged 2 commits into
mainfrom
remove-provider-command
Apr 24, 2026
Merged

refactor(commands): drop /provider, /plan handler, and clean up slash registry#15047
teknium1 merged 2 commits into
mainfrom
remove-provider-command

Conversation

@teknium1

@teknium1 teknium1 commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Drops /provider, drops /plan's special handler, and fixes registry bugs found in the same audit.

Summary

  • /provider — read-only info display duplicating what /model (no args) and /status already cover.
  • /plan special handler/plan now flows through the generic skill-dispatch path like any other bundled skill. The plan skill at skills/software-development/plan/SKILL.md is self-contained and already describes the .hermes/plans/ output convention.
  • Registry bugs found in the audit: /plan was never registered; /snapshot, /gquota, /skin, /reload had no gateway handler but were registered as cross-platform.

Changes

/provider removed

  • hermes_cli/commands.py — CommandDef + stale comment
  • cli.py — dispatch + _show_model_and_providers method (73 LOC)
  • gateway/run.py — dispatch + _handle_provider_command method (57 LOC)
  • gateway/platforms/discord.py — Discord slash registration
  • hermes_cli/models.py — stale comment
  • Docs: reference/slash-commands.md, user-guide/messaging/index.md, autonomous-ai-agents/hermes-agent.md
  • Tests: test_command_bypass_active_session.py, test_platform_commands.py

/plan special-handler removed (uses generic skill dispatch now)

  • cli.py_handle_plan_command method + early dispatch + build_plan_path import
  • gateway/run.pycanonical == "plan" early block
  • tui_gateway/server.pyif name == "plan": block
  • agent/skill_commands.pybuild_plan_path function + unused _PLAN_SLUG_RE/datetime imports + module docstring
  • Tests: deleted tests/cli/test_cli_plan_command.py and tests/gateway/test_plan_command.py (tested behavior that no longer exists); removed TestPlanSkillHelpers from tests/agent/test_skill_commands.py; removed /plan case from ui-tui/.../createSlashHandler.test.ts (redundant with the existing generic skill-dispatch test)
  • Docs: removed the dedicated /plan rows from reference/slash-commands.md and reworded features/skills.md

Registry audit fixes

  • /snapshot, /gquota, /skin, /reload — marked cli_only=True (they had no gateway handler; stop advertising them in gateway help / Telegram menu / Discord auto-registration)
  • tests/hermes_cli/test_commands.py::test_excludes_cli_only_commands_without_config_gate — substring check flagged /reload-mcp as matching /reload; switched to word-boundary regex
  • tests/gateway/test_discord_slash_commands.py::test_auto_registers_missing_gateway_commands — dropped /reload from expected_auto set

Validation

Result
py_compile (cli, gateway, commands, tui_gateway, skill_commands) OK
Targeted: test_skill_commands + gateway/test_command_bypass_active_session + hermes_cli/test_commands + e2e/test_platform_commands 236 passed
Broader: tests/gateway/ + tests/hermes_cli/ + tests/agent/ + tests/cli/ 4366 passed, 2 pre-existing flakes (unrelated to this PR, confirmed on stock main)
Live import check /provider gone everywhere; /plan absent from COMMAND_REGISTRY; build_plan_path removed; CLI falls through to generic skill dispatch

Net diff: +23 / -535 across 19 files.

@teknium1 teknium1 changed the title refactor(commands): drop /provider and clean up slash registry refactor(commands): drop /provider, /plan handler, and clean up slash registry Apr 24, 2026
@teknium1 teknium1 merged commit b2e124d into main Apr 24, 2026
11 of 13 checks passed
@teknium1 teknium1 deleted the remove-provider-command branch April 24, 2026 10:10
@alt-glitch alt-glitch added type/refactor Code restructuring, no behavior change P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery platform/discord Discord bot adapter labels Apr 24, 2026
nekorytaylor666 pushed a commit to nekorytaylor666/hermes-agent that referenced this pull request Apr 24, 2026
… registry (NousResearch#15047)

* refactor(commands): drop /provider and clean up slash registry

* refactor(commands): drop /plan special handler — use plain skill dispatch
justrhoto pushed a commit to justrhoto/hermes-agent that referenced this pull request Apr 24, 2026
… registry (NousResearch#15047)

* refactor(commands): drop /provider and clean up slash registry

* refactor(commands): drop /plan special handler — use plain skill dispatch
ulasbilgen pushed a commit to ulasbilgen/hermes-adhd-agent that referenced this pull request May 1, 2026
… registry (NousResearch#15047)

* refactor(commands): drop /provider and clean up slash registry

* refactor(commands): drop /plan special handler — use plain skill dispatch
aj-nt pushed a commit to aj-nt/hermes-agent that referenced this pull request May 1, 2026
… registry (NousResearch#15047)

* refactor(commands): drop /provider and clean up slash registry

* refactor(commands): drop /plan special handler — use plain skill dispatch
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
… registry (NousResearch#15047)

* refactor(commands): drop /provider and clean up slash registry

* refactor(commands): drop /plan special handler — use plain skill dispatch
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
… registry (NousResearch#15047)

* refactor(commands): drop /provider and clean up slash registry

* refactor(commands): drop /plan special handler — use plain skill dispatch
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
… registry (NousResearch#15047)

* refactor(commands): drop /provider and clean up slash registry

* refactor(commands): drop /plan special handler — use plain skill dispatch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have platform/discord Discord bot adapter type/refactor Code restructuring, no behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants