36template <
typename HandlerClass>
39 []() {
return std::make_unique<HandlerClass>(); });
42#define REGISTER_BUILTIN_AGENT_TOOL(Name, Category, Desc, Usage, Examples, \
43 ReqRom, ReqProject, HandlerClass) \
44 RegisterBuiltinTool<HandlerClass>(registry, {Name, \
51 ToolAccess::kReadOnly, \
61 std::string
GetName()
const override {
return "tools-list"; }
62 std::string
GetUsage()
const override {
return "tools-list"; }
67 return absl::OkStatus();
71 return absl::UnimplementedError(
72 "Handled by ToolDispatcher meta-tool handler");
78 std::string
GetName()
const override {
return "tools-describe"; }
80 return "tools-describe --name=<tool>";
86 return absl::OkStatus();
90 return absl::UnimplementedError(
91 "Handled by ToolDispatcher meta-tool handler");
97 std::string
GetName()
const override {
return "tools-search"; }
99 return "tools-search --query=<keyword>";
105 return absl::OkStatus();
109 return absl::UnimplementedError(
110 "Handled by ToolDispatcher meta-tool handler");
117 "tools-list", {},
false,
false,
120 "Get detailed information about a tool",
121 "tools-describe --name=<tool>", {},
false,
false,
124 "tools-search --query=<keyword>", {},
false,
129 "resource-list",
"resource",
"List resource labels",
130 "resource-list --type=<type>", {
"resource-list --type=dungeon"},
true,
133 "resource-search",
"resource",
"Search resource labels",
134 "resource-search --query=<query>", {
"resource-search --query=castle"},
139 "List sprites in a dungeon room",
140 "dungeon-list-sprites --room=<id>", {},
true,
144 "dungeon-describe-room --room=<id>", {},
true,
148 "dungeon-export-room --room=<id>", {},
true,
152 "dungeon-list-objects --room=<id>", {},
true,
155 "List custom collision tiles for a room",
156 "dungeon-list-custom-collision --room=<id>", {},
160 "dungeon-export-custom-collision-json",
"dungeon",
161 "Export custom collision maps to JSON",
162 "dungeon-export-custom-collision-json --out=<path> "
163 "[--room=<id>|--rooms=<ids>|--all] [--report=<path>]",
166 "dungeon-import-custom-collision-json",
"dungeon",
167 "Import custom collision maps from JSON",
168 "dungeon-import-custom-collision-json --in=<path> "
169 "[--dry-run] [--replace-all --force] [--report=<path>]",
172 "dungeon-export-water-fill-json",
"dungeon",
173 "Export water fill zones to JSON",
174 "dungeon-export-water-fill-json --out=<path> "
175 "[--room=<id>|--rooms=<ids>|--all] [--report=<path>]",
178 "dungeon-import-water-fill-json",
"dungeon",
179 "Import water fill zones from JSON",
180 "dungeon-import-water-fill-json --in=<path> [--dry-run] "
181 "[--strict-masks] [--report=<path>]",
184 "dungeon-minecart-audit",
"dungeon",
185 "Audit minecart-related room data (objects/sprites/collision)",
186 "dungeon-minecart-audit --room=<id>", {},
true,
false,
189 "dungeon-minecart-map",
"dungeon",
190 "Enumerate track tile positions/types with ASCII grid for "
192 "dungeon-minecart-map --room=<id>", {},
true,
false,
196 "dungeon-get-room-tiles --room=<id>", {},
true,
199 "dungeon-set-room-property",
"dungeon",
"Set room property",
200 "dungeon-set-room-property --room=<id> --key=<key> --value=<val>", {},
203 "Debug room header bytes",
204 "dungeon-room-header --room=<id>", {},
true,
209 "Get tile by map/x/y",
210 "overworld-get-tile --map=<id> --x=<x> --y=<y>",
213 "overworld-set-tile",
"overworld",
"Set tile by map/x/y",
214 "overworld-set-tile --map=<id> --x=<x> --y=<y> --tile=<tile>", {},
true,
217 "Find tile locations",
218 "overworld-find-tile --tile=<id>", {},
true,
222 "overworld-describe-map --map=<id>", {},
true,
225 "overworld-list-warps --map=<id>", {},
true,
229 "overworld-list-sprites --map=<id>", {},
true,
233 "overworld-get-entrance --id=<id>", {},
true,
236 "Get tile statistics",
"overworld-tile-stats", {},
241 "message-list", {},
true,
false,
244 "message-read --id=<id>", {},
true,
false,
247 "message-search --query=<text>", {},
true,
false,
250 "dialogue-list", {},
true,
false,
253 "dialogue-read --id=<id>", {},
true,
false,
256 "dialogue-search --query=<text>", {},
true,
false,
261 "gui-place-tile --x=<x> --y=<y> --tile=<id>", {},
264 "gui-click",
"gui",
"Click GUI element",
265 "gui-click --target=<type:label> [--widget-key=<key>] "
266 "[--click-type=<left|right|middle|double>]",
269 "gui-type --target=<type:label> --text=<text> "
270 "[--widget-key=<key>] [--clear-first]",
273 "Wait for GUI condition/widget",
274 "gui-wait --condition=<condition> "
275 "[--widget-key=<key>] [--timeout-ms=<ms>]",
278 "gui-assert",
"gui",
"Assert GUI condition/widget",
279 "gui-assert --condition=<condition> [--widget-key=<key>]", {},
false,
282 "gui-discover-tool", {},
false,
false,
285 "gui-screenshot", {},
false,
false,
288 "Get a high-level summary of visible GUI widgets",
289 "gui-summarize-widgets", {},
false,
false,
294 "music-list", {},
true,
false,
297 "music-info --id=<id>", {},
true,
false,
300 "music-tracks", {},
true,
false,
305 "sprite-list", {},
true,
false,
308 "Get sprite properties",
309 "sprite-properties --id=<id>", {},
true,
false,
312 "sprite-palette --id=<id>", {},
true,
false,
317 "filesystem-list",
"filesystem",
"List directory contents",
320 "filesystem-read",
"filesystem",
"Read file contents",
323 "filesystem-exists",
"filesystem",
"Check file existence",
326 "filesystem-info --path=<path>", {},
false,
false,
331 "build-configure",
"build",
332 "Configure the build system with a CMake preset",
333 "build-configure --preset <preset> [--build-dir <dir>] "
337 "build-compile",
"build",
"Build a specific target or all targets",
338 "build-compile [--target <target>] [--config <config>] "
339 "[--build-dir <dir>] [--verbose]",
342 "build-test",
"build",
"Run tests with optional filter",
343 "build-test [--filter <pattern>] [--rom-path <path>] "
344 "[--build-dir <dir>] [--verbose]",
347 "Get current build operation status",
348 "build-status [--build-dir <dir>]", {},
false,
353 "Analyze memory region",
354 "memory-analyze --address=<addr> --length=<len>",
357 "memory-search",
"memory",
"Search for byte pattern",
360 "Compare memory regions",
"memory-compare", {},
365 "List known memory regions",
"memory-regions", {},
370 "List test helper tools",
"tools-helper-list", {},
373 "Generate WRAM state",
"tools-harness-state", {},
376 "tools-extract-values",
"tools",
"Extract vanilla ROM values",
379 "Extract golden data",
"tools-extract-golden", {},
382 "Create v3 patched ROM",
"tools-patch-v3", {},
387 "visual-find-similar-tiles",
"visual",
"Find tiles with similar patterns",
390 "visual-analyze-spritesheet",
"visual",
"Identify unused regions",
393 "Analyze palette usage",
"visual-palette-usage",
396 "visual-tile-histogram",
"visual",
"Generate tile usage histogram",
401 "Generate ASM hook",
"codegen-asm-hook", {},
true,
404 "Generate patch",
"codegen-freespace-patch", {},
407 "Generate sprite ASM",
"codegen-sprite-template",
410 "Generate event handler",
"codegen-event-handler",
415 "Show current project state",
"project-status",
418 "Create named checkpoint",
"project-snapshot", {},
421 "Restore ROM to checkpoint",
"project-restore",
424 "project-export", {},
true,
true,
427 "project-import", {},
false,
true,
430 "Compare project states",
"project-diff", {},
433 "project-graph",
"project",
434 "Query project graph info (files, symbols, config)",
435 "project-graph --query=<info|files|symbols|lookup|writes|bank> "
436 "[--path=<folder>] [--symbol=<name>] [--address=<hex>] [--bank=<hex>]",
441 "emulator-step", {},
true,
false,
444 "emulator-run", {},
true,
false,
447 "emulator-pause", {},
true,
false,
450 "emulator-reset", {},
true,
false,
453 "Get emulator state",
"emulator-get-state", {},
456 "Set breakpoint",
"emulator-set-breakpoint", {},
459 "Clear breakpoint",
"emulator-clear-breakpoint",
463 "List breakpoints",
"emulator-list-breakpoints",
467 "emulator-read-memory", {},
true,
false,
470 "Write memory",
"emulator-write-memory", {},
true,
473 "Get registers",
"emulator-get-registers", {},
476 "emulator-get-metrics", {},
true,
false,
481#undef REGISTER_BUILTIN_AGENT_TOOL
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Command handler for listing dialogue messages.
Command handler for reading dialogue messages.
Command handler for searching dialogue messages.
Command handler for describing a dungeon room.
Command handler for exporting room data.
Command handler for getting room tiles.
Command handler for listing objects in a room.
Command handler for listing sprites in a dungeon room.
Command handler for reading raw room header bytes (diagnostic)
Command handler for setting room properties.
Command handler for GUI assertions.
Command handler for clicking GUI elements.
Command handler for placing tiles via GUI automation.
Command handler for taking screenshots.
Command handler for typing into GUI inputs.
Command handler for waiting on GUI conditions.
Command handler for listing messages.
Command handler for reading messages.
Command handler for searching messages.
Command handler for getting music track information.
Command handler for listing music tracks.
Command handler for getting detailed music track data.
Command handler for describing overworld maps.
Command handler for finding tiles in overworld.
Command handler for getting entrance information.
Command handler for listing sprites in overworld.
Command handler for listing warps in overworld.
Command handler for getting tile statistics.
Command handler for listing resource labels by type.
Command handler for searching resource labels.
Command handler for listing sprites.
Command handler for getting sprite palette information.
Command handler for getting sprite properties.
Utility for parsing common CLI argument patterns.
Base class for CLI command handlers.
void RegisterBuiltinAgentTools(ToolRegistry ®istry)
CLI command handlers for test helper tools.