Skip to main content

Module commands

Module commands 

Source
Expand description

Slash-command registry and the core built-in commands (Goal 146).

A CommandSpec is a static description (name, aliases, summary, handler). The CommandRegistry wraps a Vec<CommandSpec> (built-ins) and a Vec<SkillCommand> (Goal-169 skill-backed dynamic commands), and provides exact lookup (with alias resolution) and prefix search for the completion menu.

Handlers are split into CommandHandler::Sync (mutate AppState directly and return a CommandOutcome) and CommandHandler::Async (push UserActions for the backend worker to service).

Side-effects: handlers may push transcript blocks, modify App.modals, or set App.should_quit. They never block the event loop.

Structs§

CommandRegistry
Vec-backed slash-command registry.
CommandSpec
One registered slash command.

Enums§

CommandHandler
What a command’s handler does when invoked.
CommandOutcome
Result of a synchronous command.