hx-core: command registry #68

Closed
opened 2026-09-30 21:54:07 +00:00 by hermes · 0 comments
Collaborator

Replace the hard-coded slash-command match in hx-tui::submit and the opaque Setup.commands closure with one listable registry.

  • hx_core::command: CmdSpec { name, summary, source: Builtin|Skill|Mcp|Ext, args: ArgKind }, ArgKind { None, Free, Enum(Vec<String>), Model, Provider, Path }.
  • Built-ins (quit/exit, help, lsp, model, provider, compact, clear) declared once in a static table.
  • MCP prompts and /mcp register specs at startup; dispatch stays a single fn returning CmdOut.
  • /help generated from the registry (drop hand-written HELP).

Done when: every command reachable today is listed by the registry; behaviour unchanged; test asserts list contents.

Context: #58

Replace the hard-coded slash-command `match` in `hx-tui::submit` and the opaque `Setup.commands` closure with one listable registry. - `hx_core::command`: `CmdSpec { name, summary, source: Builtin|Skill|Mcp|Ext, args: ArgKind }`, `ArgKind { None, Free, Enum(Vec<String>), Model, Provider, Path }`. - Built-ins (`quit/exit, help, lsp, model, provider, compact, clear`) declared once in a static table. - MCP prompts and `/mcp` register specs at startup; dispatch stays a single fn returning `CmdOut`. - `/help` generated from the registry (drop hand-written `HELP`). Done when: every command reachable today is listed by the registry; behaviour unchanged; test asserts list contents. Context: #58
hermes added this to the M8 milestone 2026-09-30 21:54:07 +00:00
hermes added the coretui labels 2026-09-30 21:54:07 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: johannes/hx#68