1#ifndef YAZE_CLI_SERVICE_COMMAND_REGISTRY_H_
2#define YAZE_CLI_SERVICE_COMMAND_REGISTRY_H_
9#include "absl/status/statusor.h"
49 void Register(std::unique_ptr<resources::CommandHandler> handler,
100 absl::Status
Execute(
const std::string& name,
101 const std::vector<std::string>& args,
102 Rom* rom_context =
nullptr);
107 bool HasCommand(
const std::string& name)
const;
118 std::map<std::string, std::unique_ptr<resources::CommandHandler>>
handlers_;
The Rom class is used to load, save, and modify Rom data.
Single source of truth for all z3ed commands.
CommandRegistry()=default
std::map< std::string, std::string > aliases_
std::vector< std::string > GetCommandsInCategory(const std::string &category) const
Get all commands in a category.
static CommandRegistry & Instance()
std::string GenerateCategoryHelp(const std::string &category) const
Generate category help text.
void RegisterAllCommands()
std::string ExportFunctionSchemas() const
Export function schemas for AI tool calling (JSON)
const CommandMetadata * GetMetadata(const std::string &name) const
Get command metadata.
absl::Status Execute(const std::string &name, const std::vector< std::string > &args, Rom *rom_context=nullptr)
Execute a command by name.
std::string GenerateCompleteHelp() const
Generate complete help text (all commands)
std::vector< std::string > GetAgentCommands() const
Get all commands available to AI agents.
size_t Count() const
Get total command count.
std::map< std::string, CommandMetadata > metadata_
std::map< std::string, std::unique_ptr< resources::CommandHandler > > handlers_
resources::CommandHandler * Get(const std::string &name) const
Get a command handler by name or alias.
bool HasCommand(const std::string &name) const
Check if command exists.
std::vector< std::string > GetCategories() const
Get all categories.
void Register(std::unique_ptr< resources::CommandHandler > handler, const CommandMetadata &metadata)
Register a command handler.
std::string GenerateHelp(const std::string &name) const
Generate help text for a command.
Base class for CLI command handlers.
Main namespace for the application.