yaze
0.3.2
Link to the Past ROM Editor
Loading...
Searching...
No Matches
tool_dispatcher.h
Go to the documentation of this file.
1
#ifndef YAZE_SRC_CLI_SERVICE_AGENT_TOOL_DISPATCHER_H_
2
#define YAZE_SRC_CLI_SERVICE_AGENT_TOOL_DISPATCHER_H_
3
4
#include <string>
5
#include "absl/status/statusor.h"
6
#include "
cli/service/ai/common.h
"
7
8
namespace
yaze
{
9
10
class
Rom;
11
12
namespace
cli {
13
namespace
agent {
14
15
enum class
ToolCallType
{
16
kUnknown
,
17
kResourceList
,
18
kResourceSearch
,
19
// Dungeon
20
kDungeonListSprites
,
21
kDungeonDescribeRoom
,
22
kDungeonExportRoom
,
23
kDungeonListObjects
,
24
kDungeonGetRoomTiles
,
25
kDungeonSetRoomProperty
,
26
// Overworld
27
kOverworldFindTile
,
28
kOverworldDescribeMap
,
29
kOverworldListWarps
,
30
kOverworldListSprites
,
31
kOverworldGetEntrance
,
32
kOverworldTileStats
,
33
// Messages & Dialogue
34
kMessageList
,
35
kMessageRead
,
36
kMessageSearch
,
37
kDialogueList
,
38
kDialogueRead
,
39
kDialogueSearch
,
40
// GUI Automation
41
kGuiPlaceTile
,
42
kGuiClick
,
43
kGuiDiscover
,
44
kGuiScreenshot
,
45
// Music
46
kMusicList
,
47
kMusicInfo
,
48
kMusicTracks
,
49
// Sprites
50
kSpriteList
,
51
kSpriteProperties
,
52
kSpritePalette
,
53
// Emulator & Debugger
54
kEmulatorStep
,
55
kEmulatorRun
,
56
kEmulatorPause
,
57
kEmulatorReset
,
58
kEmulatorGetState
,
59
kEmulatorSetBreakpoint
,
60
kEmulatorClearBreakpoint
,
61
kEmulatorListBreakpoints
,
62
kEmulatorReadMemory
,
63
kEmulatorWriteMemory
,
64
kEmulatorGetRegisters
,
65
kEmulatorGetMetrics
,
66
};
67
68
class
ToolDispatcher
{
69
public
:
70
ToolDispatcher
() =
default
;
71
72
// Execute a tool call and return the result as a string.
73
absl::StatusOr<std::string>
Dispatch
(
const
ToolCall
& tool_call);
74
// Provide a ROM context for tool calls that require ROM access.
75
void
SetRomContext
(
Rom
* rom) {
rom_context_
= rom; }
76
77
private
:
78
Rom
*
rom_context_
=
nullptr
;
79
};
80
81
}
// namespace agent
82
}
// namespace cli
83
}
// namespace yaze
84
85
#endif
// YAZE_SRC_CLI_SERVICE_AGENT_TOOL_DISPATCHER_H_
yaze::Rom
The Rom class is used to load, save, and modify Rom data.
Definition
rom.h:71
yaze::cli::agent::ToolDispatcher
Definition
tool_dispatcher.h:68
yaze::cli::agent::ToolDispatcher::rom_context_
Rom * rom_context_
Definition
tool_dispatcher.h:78
yaze::cli::agent::ToolDispatcher::SetRomContext
void SetRomContext(Rom *rom)
Definition
tool_dispatcher.h:75
yaze::cli::agent::ToolDispatcher::Dispatch
absl::StatusOr< std::string > Dispatch(const ToolCall &tool_call)
Definition
tool_dispatcher.cc:232
yaze::cli::agent::ToolDispatcher::ToolDispatcher
ToolDispatcher()=default
common.h
yaze::cli::agent::ToolCallType
ToolCallType
Definition
tool_dispatcher.h:15
yaze::cli::agent::ToolCallType::kSpriteList
@ kSpriteList
yaze::cli::agent::ToolCallType::kMusicList
@ kMusicList
yaze::cli::agent::ToolCallType::kEmulatorPause
@ kEmulatorPause
yaze::cli::agent::ToolCallType::kDungeonDescribeRoom
@ kDungeonDescribeRoom
yaze::cli::agent::ToolCallType::kUnknown
@ kUnknown
yaze::cli::agent::ToolCallType::kGuiPlaceTile
@ kGuiPlaceTile
yaze::cli::agent::ToolCallType::kDungeonExportRoom
@ kDungeonExportRoom
yaze::cli::agent::ToolCallType::kSpriteProperties
@ kSpriteProperties
yaze::cli::agent::ToolCallType::kDialogueSearch
@ kDialogueSearch
yaze::cli::agent::ToolCallType::kOverworldTileStats
@ kOverworldTileStats
yaze::cli::agent::ToolCallType::kEmulatorReset
@ kEmulatorReset
yaze::cli::agent::ToolCallType::kMusicInfo
@ kMusicInfo
yaze::cli::agent::ToolCallType::kEmulatorGetState
@ kEmulatorGetState
yaze::cli::agent::ToolCallType::kDialogueRead
@ kDialogueRead
yaze::cli::agent::ToolCallType::kOverworldFindTile
@ kOverworldFindTile
yaze::cli::agent::ToolCallType::kMusicTracks
@ kMusicTracks
yaze::cli::agent::ToolCallType::kOverworldListSprites
@ kOverworldListSprites
yaze::cli::agent::ToolCallType::kSpritePalette
@ kSpritePalette
yaze::cli::agent::ToolCallType::kEmulatorWriteMemory
@ kEmulatorWriteMemory
yaze::cli::agent::ToolCallType::kDialogueList
@ kDialogueList
yaze::cli::agent::ToolCallType::kOverworldGetEntrance
@ kOverworldGetEntrance
yaze::cli::agent::ToolCallType::kDungeonGetRoomTiles
@ kDungeonGetRoomTiles
yaze::cli::agent::ToolCallType::kResourceList
@ kResourceList
yaze::cli::agent::ToolCallType::kDungeonListObjects
@ kDungeonListObjects
yaze::cli::agent::ToolCallType::kEmulatorGetMetrics
@ kEmulatorGetMetrics
yaze::cli::agent::ToolCallType::kEmulatorReadMemory
@ kEmulatorReadMemory
yaze::cli::agent::ToolCallType::kDungeonSetRoomProperty
@ kDungeonSetRoomProperty
yaze::cli::agent::ToolCallType::kGuiClick
@ kGuiClick
yaze::cli::agent::ToolCallType::kEmulatorGetRegisters
@ kEmulatorGetRegisters
yaze::cli::agent::ToolCallType::kGuiDiscover
@ kGuiDiscover
yaze::cli::agent::ToolCallType::kEmulatorRun
@ kEmulatorRun
yaze::cli::agent::ToolCallType::kGuiScreenshot
@ kGuiScreenshot
yaze::cli::agent::ToolCallType::kOverworldListWarps
@ kOverworldListWarps
yaze::cli::agent::ToolCallType::kEmulatorStep
@ kEmulatorStep
yaze::cli::agent::ToolCallType::kDungeonListSprites
@ kDungeonListSprites
yaze::cli::agent::ToolCallType::kOverworldDescribeMap
@ kOverworldDescribeMap
yaze::cli::agent::ToolCallType::kEmulatorSetBreakpoint
@ kEmulatorSetBreakpoint
yaze::cli::agent::ToolCallType::kMessageList
@ kMessageList
yaze::cli::agent::ToolCallType::kMessageSearch
@ kMessageSearch
yaze::cli::agent::ToolCallType::kEmulatorListBreakpoints
@ kEmulatorListBreakpoints
yaze::cli::agent::ToolCallType::kMessageRead
@ kMessageRead
yaze::cli::agent::ToolCallType::kEmulatorClearBreakpoint
@ kEmulatorClearBreakpoint
yaze::cli::agent::ToolCallType::kResourceSearch
@ kResourceSearch
yaze
Main namespace for the application.
Definition
asar_wrapper.cc:14
yaze::cli::ToolCall
Definition
common.h:12
src
cli
service
agent
tool_dispatcher.h
Generated by
1.9.8