yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
tool_registration.cc
Go to the documentation of this file.
3
16#ifdef YAZE_WITH_GRPC
18#endif
28
29namespace yaze {
30namespace cli {
31namespace agent {
32
33using namespace yaze::cli::handlers;
34using namespace yaze::cli::agent::tools;
35
36namespace {
37
38template <typename HandlerClass>
39void RegisterBuiltinTool(ToolRegistry& registry, ToolDefinition definition) {
40 // A bare-name usage carries no flags; the handler's usage is the contract
41 // that required/flag argument inference and tools-describe rely on.
42 if (definition.usage == definition.name) {
43 definition.usage = HandlerClass().GetUsage();
44 }
45 registry.RegisterTool(std::move(definition),
46 []() { return std::make_unique<HandlerClass>(); });
47}
48
49#define REGISTER_BUILTIN_AGENT_TOOL(Name, Category, Desc, Usage, Examples, \
50 ReqRom, ReqProject, HandlerClass) \
51 RegisterBuiltinTool<HandlerClass>(registry, {Name, \
52 Category, \
53 Desc, \
54 Usage, \
55 Examples, \
56 ReqRom, \
57 ReqProject, \
58 ToolAccess::kReadOnly, \
59 {}, \
60 {}});
61
62} // namespace
63
64// Placeholder classes for meta-tools (they're handled specially in the
65// dispatcher) but still need handlers for registry metadata.
67 public:
68 std::string GetName() const override { return "tools-list"; }
69 std::string GetUsage() const override { return "tools-list"; }
70 bool RequiresRom() const override { return false; }
71
72 protected:
73 absl::Status ValidateArgs(const resources::ArgumentParser&) override {
74 return absl::OkStatus();
75 }
76 absl::Status Execute(Rom*, const resources::ArgumentParser&,
78 return absl::UnimplementedError(
79 "Handled by ToolDispatcher meta-tool handler");
80 }
81};
82
84 public:
85 std::string GetName() const override { return "tools-describe"; }
86 std::string GetUsage() const override {
87 return "tools-describe --name=<tool>";
88 }
89 bool RequiresRom() const override { return false; }
90
91 protected:
92 absl::Status ValidateArgs(const resources::ArgumentParser&) override {
93 return absl::OkStatus();
94 }
95 absl::Status Execute(Rom*, const resources::ArgumentParser&,
97 return absl::UnimplementedError(
98 "Handled by ToolDispatcher meta-tool handler");
99 }
100};
101
103 public:
104 std::string GetName() const override { return "tools-search"; }
105 std::string GetUsage() const override {
106 return "tools-search --query=<keyword>";
107 }
108 bool RequiresRom() const override { return false; }
109
110 protected:
111 absl::Status ValidateArgs(const resources::ArgumentParser&) override {
112 return absl::OkStatus();
113 }
114 absl::Status Execute(Rom*, const resources::ArgumentParser&,
115 resources::OutputFormatter&) override {
116 return absl::UnimplementedError(
117 "Handled by ToolDispatcher meta-tool handler");
118 }
119};
120
122 // Meta-tools (handled specially but registered for discovery)
123 REGISTER_BUILTIN_AGENT_TOOL("tools-list", "meta", "List all available tools",
124 "tools-list", {}, false, false,
126 REGISTER_BUILTIN_AGENT_TOOL("tools-describe", "meta",
127 "Get detailed information about a tool",
128 "tools-describe --name=<tool>", {}, false, false,
130 REGISTER_BUILTIN_AGENT_TOOL("tools-search", "meta", "Search tools by keyword",
131 "tools-search --query=<keyword>", {}, false,
133
134 // Resource commands
136 "resource-list", "resource", "List resource labels",
137 "resource-list --type=<type>", {"resource-list --type=dungeon"}, true,
140 "resource-search", "resource", "Search resource labels",
141 "resource-search --query=<query>", {"resource-search --query=castle"},
142 true, false, ResourceSearchCommandHandler)
143
144 // Dungeon commands
145 REGISTER_BUILTIN_AGENT_TOOL("dungeon-list-sprites", "dungeon",
146 "List sprites in a dungeon room",
147 "dungeon-list-sprites --room=<id>", {}, true,
149 REGISTER_BUILTIN_AGENT_TOOL("dungeon-describe-room", "dungeon",
150 "Describe a room",
151 "dungeon-describe-room --room=<id>", {}, true,
153 REGISTER_BUILTIN_AGENT_TOOL("dungeon-export-room", "dungeon",
154 "Export room data",
155 "dungeon-export-room --room=<id>", {}, true,
157 REGISTER_BUILTIN_AGENT_TOOL("dungeon-list-objects", "dungeon",
158 "List room objects",
159 "dungeon-list-objects --room=<id>", {}, true,
161 REGISTER_BUILTIN_AGENT_TOOL("dungeon-list-custom-collision", "dungeon",
162 "List custom collision tiles for a room",
163 "dungeon-list-custom-collision --room=<id>", {},
164 true, false,
167 "dungeon-export-custom-collision-json", "dungeon",
168 "Export custom collision maps to JSON",
169 "dungeon-export-custom-collision-json --out=<path> "
170 "[--room=<id>|--rooms=<ids>|--all] [--report=<path>]",
172 RegisterBuiltinTool<DungeonImportCustomCollisionJsonCommandHandler>(
173 registry,
174 {"dungeon-import-custom-collision-json",
175 "dungeon",
176 "Import custom collision maps and immediately save unless --dry-run",
177 "dungeon-import-custom-collision-json --in=<path> "
178 "[--dry-run [--report=<path>]] [--sandbox | --mock-rom] "
179 "[--replace-all --force]",
180 {},
181 true,
182 true,
184 {},
185 {"dry-run", "sandbox", "mock-rom", "replace-all", "force"}});
187 "dungeon-export-water-fill-json", "dungeon",
188 "Export water fill zones to JSON",
189 "dungeon-export-water-fill-json --out=<path> "
190 "[--room=<id>|--rooms=<ids>|--all] [--report=<path>]",
192 RegisterBuiltinTool<DungeonImportWaterFillJsonCommandHandler>(
193 registry,
194 {"dungeon-import-water-fill-json",
195 "dungeon",
196 "Import water fill zones and immediately save unless --dry-run",
197 "dungeon-import-water-fill-json --in=<path> "
198 "[--dry-run [--report=<path>]] [--sandbox | --mock-rom] "
199 "[--strict-masks]",
200 {},
201 true,
202 true,
204 {},
205 {"dry-run", "sandbox", "mock-rom", "strict-masks"}});
207 "dungeon-minecart-audit", "dungeon",
208 "Audit minecart-related room data (objects/sprites/collision)",
209 "dungeon-minecart-audit --room=<id>", {}, true, false,
212 "dungeon-minecart-map", "dungeon",
213 "Enumerate track tile positions/types with ASCII grid for "
214 "spatial reasoning",
215 "dungeon-minecart-map --room=<id>", {}, true, false,
217 REGISTER_BUILTIN_AGENT_TOOL("dungeon-get-room-tiles", "dungeon",
218 "Get room tiles",
219 "dungeon-get-room-tiles --room=<id>", {}, true,
222 "dungeon-tile-types", "dungeon",
223 "Vanilla collision tile types ($7F2000/$7F3000); pits are 0x20",
224 "dungeon-tile-types --room=<id> [--layer=upper|lower|both] "
225 "[--type=<hex>] [--no-rows]",
226 {}, true, false, DungeonTileTypesCommandHandler)
228 "dungeon-set-room-property", "dungeon", "Set room property",
229 "dungeon-set-room-property --room=<id> --property=<property> "
230 "--value=<val>",
232 REGISTER_BUILTIN_AGENT_TOOL("dungeon-room-header", "dungeon",
233 "Debug room header bytes",
234 "dungeon-room-header --room=<id>", {}, true,
237 "dungeon-get-palette", "dungeon",
238 "Resolve a US/OOS room's shared dungeon palette and affected rooms",
239 "dungeon-get-palette --room=<hex> [--index=<0..89>]", {}, true, false,
241 RegisterBuiltinTool<DungeonSetPaletteColorCommandHandler>(
242 registry,
243 {"dungeon-set-palette-color",
244 "dungeon",
245 "Dry-run or persist one US/OOS shared dungeon palette color with CAS, "
246 "manifest, clean-file baseline, backup, atomic-save, and "
247 "external-readback guards",
248 "dungeon-set-palette-color --room=<hex> --index=<0..89> "
249 "--expect-palette-set=<hex> --expect-palette-index=<0..19> "
250 "--expect-color=<hex> --color=<hex> --manifest=<path> [--write]",
251 {},
252 true,
253 false,
255 {},
256 {"write"}});
257
258 // Overworld commands
260 "overworld-get-tile", "overworld",
261 "Get the tile16 id at an overworld area position. map is a hex screen "
262 "id; x/y are decimal tile16 coordinates relative to the parent area's "
263 "top-left (0-31 small, 0-63 on doubled axes of large/wide/tall areas)",
264 "overworld-get-tile --map=<hex> --x=<area_tile_x> --y=<area_tile_y>", {},
267 "overworld-set-tile", "overworld",
268 "Set one tile16 id at an overworld area position (coordinates as "
269 "overworld-get-tile). Dry-run unless write is set",
270 "overworld-set-tile --map=<hex> --x=<area_tile_x> --y=<area_tile_y> "
271 "--tile=<hex> [--write]",
272 {}, true, true, OverworldSetTileCommandHandler)
274 "overworld-find-tile", "overworld",
275 "Find every position of a tile16 id; x/y in each match feed "
276 "overworld-get-tile",
277 "overworld-find-tile --tile=<hex> [--map=<hex>] "
278 "[--world=<light|dark|special>]",
279 {}, true, false, OverworldFindTileCommandHandler)
280 REGISTER_BUILTIN_AGENT_TOOL("overworld-describe-map", "overworld",
281 "Describe a map",
282 "overworld-describe-map --screen=<hex>", {}, true,
284 REGISTER_BUILTIN_AGENT_TOOL("overworld-list-warps", "overworld", "List warps",
285 "overworld-list-warps [--screen=<hex>]", {}, true,
288 "overworld-list-sprites", "overworld", "List sprites",
289 "overworld-list-sprites --screen=<id> "
290 "[--phase=0|1|2]",
291 {}, true, false, OverworldListSpritesCommandHandler)
292 REGISTER_BUILTIN_AGENT_TOOL("overworld-get-entrance", "overworld",
293 "Get entrance info",
294 "overworld-get-entrance --entrance=<hex>", {},
297 "overworld-tile-stats", "overworld",
298 "Count tile16 usage per screen, per world and per tile16 id",
299 "overworld-tile-stats [--map=<hex>] [--world=<light|dark|special>] "
300 "[--tile=<hex>] [--top=<n>]",
301 {}, true, false, OverworldTileStatsCommandHandler)
302
303 // Message & Dialogue commands
304 REGISTER_BUILTIN_AGENT_TOOL("message-list", "message", "List messages",
305 "message-list", {}, true, false,
307 REGISTER_BUILTIN_AGENT_TOOL("message-read", "message", "Read message",
308 "message-read --id=<id>", {}, true, false,
310 REGISTER_BUILTIN_AGENT_TOOL("message-search", "message", "Search messages",
311 "message-search --query=<text>", {}, true, false,
314 "message-source-sync", "message",
315 "Dry-run or publish canonical expanded-message source artifacts",
316 "message-source-sync --project=<path> --file=<bundle.json> "
317 "[--expected-source-sha256=<sha256>] [--write]",
318 {}, false, false, MessageSourceSyncCommandHandler)
319 REGISTER_BUILTIN_AGENT_TOOL("dialogue-list", "dialogue", "List dialogues",
320 "dialogue-list", {}, true, false,
322 REGISTER_BUILTIN_AGENT_TOOL("dialogue-read", "dialogue", "Read dialogue",
323 "dialogue-read --id=<id>", {}, true, false,
325 REGISTER_BUILTIN_AGENT_TOOL("dialogue-search", "dialogue", "Search dialogues",
326 "dialogue-search --query=<text>", {}, true, false,
328
329 // GUI Automation commands
330 REGISTER_BUILTIN_AGENT_TOOL("gui-place-tile", "gui", "Place a tile on canvas",
331 "gui-place-tile --x=<x> --y=<y> --tile=<id>", {},
332 false, false, GuiPlaceTileCommandHandler)
334 "gui-click", "gui", "Click GUI element",
335 "gui-click --target=<type:label> [--widget-key=<key>] "
336 "[--click-type=<left|right|middle|double>]",
337 {}, false, false, GuiClickCommandHandler)
338 REGISTER_BUILTIN_AGENT_TOOL("gui-type", "gui", "Type text into a GUI element",
339 "gui-type --target=<type:label> --text=<text> "
340 "[--widget-key=<key>] [--clear-first]",
341 {}, false, false, GuiTypeCommandHandler)
342 REGISTER_BUILTIN_AGENT_TOOL("gui-wait", "gui",
343 "Wait for GUI condition/widget",
344 "gui-wait --condition=<condition> "
345 "[--widget-key=<key>] [--timeout-ms=<ms>]",
346 {}, false, false, GuiWaitCommandHandler)
348 "gui-assert", "gui", "Assert GUI condition/widget",
349 "gui-assert --condition=<condition> [--widget-key=<key>]", {}, false,
351 REGISTER_BUILTIN_AGENT_TOOL("gui-discover-tool", "gui", "Discover GUI tools",
352 "gui-discover-tool", {}, false, false,
354 REGISTER_BUILTIN_AGENT_TOOL("gui-screenshot", "gui", "Take screenshot",
355 "gui-screenshot", {}, false, false,
357 REGISTER_BUILTIN_AGENT_TOOL("gui-summarize-widgets", "gui",
358 "Get a high-level summary of visible GUI widgets",
359 "gui-summarize-widgets", {}, false, false,
361
362 // Music commands
363 REGISTER_BUILTIN_AGENT_TOOL("music-list", "music", "List music tracks",
364 "music-list", {}, true, false,
366 REGISTER_BUILTIN_AGENT_TOOL("music-info", "music", "Get music info",
367 "music-info --id=<id>", {}, true, false,
369 REGISTER_BUILTIN_AGENT_TOOL("music-tracks", "music", "List tracks",
370 "music-tracks", {}, true, false,
372
373 // Sprite commands
374 REGISTER_BUILTIN_AGENT_TOOL("sprite-list", "sprite", "List sprites",
375 "sprite-list", {}, true, false,
377 REGISTER_BUILTIN_AGENT_TOOL("sprite-properties", "sprite",
378 "Get sprite properties",
379 "sprite-properties --id=<id>", {}, true, false,
381 REGISTER_BUILTIN_AGENT_TOOL("sprite-palette", "sprite", "Get sprite palette",
382 "sprite-palette --id=<id>", {}, true, false,
384
385 // Filesystem commands
387 "filesystem-list", "filesystem", "List directory contents",
388 "filesystem-list --path=<path>", {}, false, false, FileSystemListTool)
390 "filesystem-read", "filesystem", "Read file contents",
391 "filesystem-read --path=<path>", {}, false, false, FileSystemReadTool)
393 "filesystem-exists", "filesystem", "Check file existence",
394 "filesystem-exists --path=<path>", {}, false, false, FileSystemExistsTool)
395 REGISTER_BUILTIN_AGENT_TOOL("filesystem-info", "filesystem", "Get file info",
396 "filesystem-info --path=<path>", {}, false, false,
398
399 // Build commands
401 "build-configure", "build",
402 "Configure the build system with a CMake preset",
403 "build-configure --preset <preset> [--build-dir <dir>] "
404 "[--verbose]",
405 {}, false, false, BuildConfigureCommandHandler)
407 "build-compile", "build", "Build a specific target or all targets",
408 "build-compile [--target <target>] [--config <config>] "
409 "[--build-dir <dir>] [--verbose]",
410 {}, false, false, BuildCompileCommandHandler)
412 "build-test", "build", "Run tests with optional filter",
413 "build-test [--filter <pattern>] [--rom-path <path>] "
414 "[--build-dir <dir>] [--verbose]",
415 {}, false, false, BuildTestCommandHandler)
416 REGISTER_BUILTIN_AGENT_TOOL("build-status", "build",
417 "Get current build operation status",
418 "build-status [--build-dir <dir>]", {}, false,
420
421 // Memory inspector commands
422 REGISTER_BUILTIN_AGENT_TOOL("memory-analyze", "memory",
423 "Analyze memory region",
424 "memory-analyze --address=<addr> --length=<len>",
425 {}, true, false, MemoryAnalyzeTool)
427 "memory-search", "memory", "Search for byte pattern",
428 "memory-search --pattern=<hex>", {}, true, false, MemorySearchTool)
429 REGISTER_BUILTIN_AGENT_TOOL("memory-compare", "memory",
430 "Compare memory regions", "memory-compare", {},
431 true, false, MemoryCompareTool)
432 REGISTER_BUILTIN_AGENT_TOOL("memory-check", "memory", "Check memory",
433 "memory-check", {}, true, false, MemoryCheckTool)
434 REGISTER_BUILTIN_AGENT_TOOL("memory-regions", "memory",
435 "List known memory regions", "memory-regions", {},
436 false, false, MemoryRegionsTool)
437
438 // Test helper tools
439 REGISTER_BUILTIN_AGENT_TOOL("tools-helper-list", "tools",
440 "List test helper tools", "tools-helper-list", {},
441 false, false, ToolsListCommandHandler)
442 REGISTER_BUILTIN_AGENT_TOOL("tools-harness-state", "tools",
443 "Generate WRAM state", "tools-harness-state", {},
446 "tools-extract-values", "tools", "Extract vanilla ROM values",
447 "tools-extract-values", {}, true, false, ToolsExtractValuesCommandHandler)
448 REGISTER_BUILTIN_AGENT_TOOL("tools-extract-golden", "tools",
449 "Extract golden data", "tools-extract-golden", {},
451 REGISTER_BUILTIN_AGENT_TOOL("tools-patch-v3", "tools",
452 "Create v3 patched ROM", "tools-patch-v3", {},
453 true, false, ToolsPatchV3CommandHandler)
454
455 // Visual analysis tools
457 "visual-find-similar-tiles", "visual", "Find tiles with similar patterns",
458 "visual-find-similar-tiles", {}, true, false, TileSimilarityTool)
460 "visual-analyze-spritesheet", "visual", "Identify unused regions",
461 "visual-analyze-spritesheet", {}, true, false, SpritesheetAnalysisTool)
462 REGISTER_BUILTIN_AGENT_TOOL("visual-palette-usage", "visual",
463 "Analyze palette usage", "visual-palette-usage",
464 {}, true, false, PaletteUsageTool)
466 "visual-tile-histogram", "visual", "Generate tile usage histogram",
467 "visual-tile-histogram", {}, true, false, TileHistogramTool)
468
469 // Code generation tools
470 REGISTER_BUILTIN_AGENT_TOOL("codegen-asm-hook", "codegen",
471 "Generate ASM hook", "codegen-asm-hook", {}, true,
472 false, CodeGenAsmHookTool)
473 REGISTER_BUILTIN_AGENT_TOOL("codegen-freespace-patch", "codegen",
474 "Generate patch", "codegen-freespace-patch", {},
475 true, false, CodeGenFreespacePatchTool)
476 REGISTER_BUILTIN_AGENT_TOOL("codegen-sprite-template", "codegen",
477 "Generate sprite ASM", "codegen-sprite-template",
478 {}, false, false, CodeGenSpriteTemplateTool)
479 REGISTER_BUILTIN_AGENT_TOOL("codegen-event-handler", "codegen",
480 "Generate event handler", "codegen-event-handler",
481 {}, false, false, CodeGenEventHandlerTool)
482
483 // Project management tools
484 REGISTER_BUILTIN_AGENT_TOOL("project-status", "project",
485 "Show current project state", "project-status",
486 {}, true, true, ProjectStatusTool)
487 REGISTER_BUILTIN_AGENT_TOOL("project-snapshot", "project",
488 "Create named checkpoint", "project-snapshot", {},
489 true, true, ProjectSnapshotTool)
490 REGISTER_BUILTIN_AGENT_TOOL("project-restore", "project",
491 "Restore ROM to checkpoint", "project-restore",
492 {}, true, true, ProjectRestoreTool)
493 REGISTER_BUILTIN_AGENT_TOOL("project-export", "project", "Export project",
494 "project-export", {}, true, true,
496 REGISTER_BUILTIN_AGENT_TOOL("project-import", "project", "Import project",
497 "project-import", {}, false, true,
499 REGISTER_BUILTIN_AGENT_TOOL("project-diff", "project",
500 "Compare project states", "project-diff", {},
501 true, true, ProjectDiffTool)
503 "project-graph", "project",
504 "Query project graph info (files, symbols, config)",
505 "project-graph --query=<info|files|symbols|lookup|writes|bank> "
506 "[--path=<folder>] [--symbol=<name>] [--address=<hex>] [--bank=<hex>]",
507 {}, true, true, ProjectGraphTool)
508
509#ifdef YAZE_WITH_GRPC
510 REGISTER_BUILTIN_AGENT_TOOL("emulator-step", "emulator", "Step emulator",
511 "emulator-step", {}, true, false,
513 REGISTER_BUILTIN_AGENT_TOOL("emulator-run", "emulator", "Run emulator",
514 "emulator-run", {}, true, false,
516 REGISTER_BUILTIN_AGENT_TOOL("emulator-pause", "emulator", "Pause emulator",
517 "emulator-pause", {}, true, false,
519 REGISTER_BUILTIN_AGENT_TOOL("emulator-reset", "emulator", "Reset emulator",
520 "emulator-reset", {}, true, false,
522 REGISTER_BUILTIN_AGENT_TOOL("emulator-get-state", "emulator",
523 "Get emulator state", "emulator-get-state", {},
525 REGISTER_BUILTIN_AGENT_TOOL("emulator-set-breakpoint", "emulator",
526 "Set breakpoint", "emulator-set-breakpoint", {},
528 REGISTER_BUILTIN_AGENT_TOOL("emulator-clear-breakpoint", "emulator",
529 "Clear breakpoint", "emulator-clear-breakpoint",
530 {}, true, false,
532 REGISTER_BUILTIN_AGENT_TOOL("emulator-list-breakpoints", "emulator",
533 "List breakpoints", "emulator-list-breakpoints",
534 {}, true, false,
536 REGISTER_BUILTIN_AGENT_TOOL("emulator-read-memory", "emulator", "Read memory",
537 "emulator-read-memory", {}, true, false,
539 REGISTER_BUILTIN_AGENT_TOOL("emulator-write-memory", "emulator",
540 "Write memory", "emulator-write-memory", {}, true,
542 REGISTER_BUILTIN_AGENT_TOOL("emulator-get-registers", "emulator",
543 "Get registers", "emulator-get-registers", {},
545 REGISTER_BUILTIN_AGENT_TOOL("emulator-get-metrics", "emulator", "Get metrics",
546 "emulator-get-metrics", {}, true, false,
548#endif
549}
550
551#undef REGISTER_BUILTIN_AGENT_TOOL
552
553} // namespace agent
554} // namespace cli
555} // namespace yaze
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Definition rom.h:52
std::string GetUsage() const override
Get the command usage string.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
std::string GetName() const override
Get the command name.
absl::Status ValidateArgs(const resources::ArgumentParser &) override
Validate command arguments.
absl::Status Execute(Rom *, const resources::ArgumentParser &, resources::OutputFormatter &) override
Execute the command business logic.
std::string GetName() const override
Get the command name.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
absl::Status Execute(Rom *, const resources::ArgumentParser &, resources::OutputFormatter &) override
Execute the command business logic.
std::string GetUsage() const override
Get the command usage string.
absl::Status ValidateArgs(const resources::ArgumentParser &) override
Validate command arguments.
std::string GetUsage() const override
Get the command usage string.
absl::Status Execute(Rom *, const resources::ArgumentParser &, resources::OutputFormatter &) override
Execute the command business logic.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
std::string GetName() const override
Get the command name.
absl::Status ValidateArgs(const resources::ArgumentParser &) override
Validate command arguments.
Centralized registry for all agent tools.
void RegisterTool(const ToolDefinition &def, HandlerFactory factory)
Generate ASM hook at a specific ROM address.
Generate patch using detected freespace regions.
Check if a file or directory exists.
Get detailed information about a file or directory.
List files and directories in a given path.
Analyze a memory region with structure awareness.
Check memory for anomalies and corruption.
Compare memory regions or detect changes.
List known memory regions and their descriptions.
Search for byte patterns in memory.
Analyze palette usage across maps.
Export project as portable archive.
Provides the AI agent with structured information about the project.
Restore ROM to named checkpoint.
Create named checkpoint with edit deltas.
Show current project state and pending edits.
Analyze spritesheets for unused graphics regions.
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.
Resolve and inspect the shared dungeon palette used by one room.
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 discovering GUI tools.
Command handler for placing tiles via GUI automation.
Command handler for taking screenshots.
Command handler for summarizing GUI widgets.
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.
Merge an expanded-message subset into project-owned source artifacts.
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.
Extract comprehensive golden data from ROM.
Create v3 ZSCustomOverworld patched ROM.
Utility for parsing common CLI argument patterns.
Base class for CLI command handlers.
Utility for consistent output formatting across commands.
Code generation tools for AI agents.
void RegisterBuiltinTool(ToolRegistry &registry, ToolDefinition definition)
void RegisterBuiltinAgentTools(ToolRegistry &registry)
Project management tools for AI agents.
Metadata describing a tool for the LLM.
CLI command handlers for test helper tools.
#define REGISTER_BUILTIN_AGENT_TOOL(Name, Category, Desc, Usage, Examples, ReqRom, ReqProject, HandlerClass)
Visual analysis tools for AI agents.