|
| 1 | +/** |
| 2 | + * Union type of all available tool names |
| 3 | + */ |
| 4 | +export type ToolName = |
| 5 | + | 'add_message' |
| 6 | + | 'add_subgoal' |
| 7 | + | 'browser_logs' |
| 8 | + | 'code_search' |
| 9 | + | 'create_plan' |
| 10 | + | 'end_turn' |
| 11 | + | 'find_files' |
| 12 | + | 'read_docs' |
| 13 | + | 'read_files' |
| 14 | + | 'run_file_change_hooks' |
| 15 | + | 'run_terminal_command' |
| 16 | + | 'send_agent_message' |
| 17 | + | 'set_messages' |
| 18 | + | 'set_output' |
| 19 | + | 'spawn_agents' |
| 20 | + | 'spawn_agents_async' |
| 21 | + | 'str_replace' |
| 22 | + | 'think_deeply' |
| 23 | + | 'update_subgoal' |
| 24 | + | 'web_search' |
| 25 | + | 'write_file' |
| 26 | + |
| 27 | +/** |
| 28 | + * Map of tool names to their parameter types |
| 29 | + */ |
| 30 | +export interface ToolParamsMap { |
| 31 | + add_message: AddMessageParams |
| 32 | + add_subgoal: AddSubgoalParams |
| 33 | + browser_logs: BrowserLogsParams |
| 34 | + code_search: CodeSearchParams |
| 35 | + create_plan: CreatePlanParams |
| 36 | + end_turn: EndTurnParams |
| 37 | + find_files: FindFilesParams |
| 38 | + read_docs: ReadDocsParams |
| 39 | + read_files: ReadFilesParams |
| 40 | + run_file_change_hooks: RunFileChangeHooksParams |
| 41 | + run_terminal_command: RunTerminalCommandParams |
| 42 | + send_agent_message: SendAgentMessageParams |
| 43 | + set_messages: SetMessagesParams |
| 44 | + set_output: SetOutputParams |
| 45 | + spawn_agents: SpawnAgentsParams |
| 46 | + spawn_agents_async: SpawnAgentsAsyncParams |
| 47 | + str_replace: StrReplaceParams |
| 48 | + think_deeply: ThinkDeeplyParams |
| 49 | + update_subgoal: UpdateSubgoalParams |
| 50 | + web_search: WebSearchParams |
| 51 | + write_file: WriteFileParams |
| 52 | +} |
| 53 | + |
1 | 54 | /** |
2 | 55 | * Add a new message to the conversation history. To be used for complex requests that can't be solved in a single step, as you may forget what happened! |
3 | 56 | */ |
@@ -225,59 +278,6 @@ export interface WriteFileParams { |
225 | 278 | content: string |
226 | 279 | } |
227 | 280 |
|
228 | | -/** |
229 | | - * Union type of all available tool names |
230 | | - */ |
231 | | -export type ToolName = |
232 | | - | 'add_message' |
233 | | - | 'add_subgoal' |
234 | | - | 'browser_logs' |
235 | | - | 'code_search' |
236 | | - | 'create_plan' |
237 | | - | 'end_turn' |
238 | | - | 'find_files' |
239 | | - | 'read_docs' |
240 | | - | 'read_files' |
241 | | - | 'run_file_change_hooks' |
242 | | - | 'run_terminal_command' |
243 | | - | 'send_agent_message' |
244 | | - | 'set_messages' |
245 | | - | 'set_output' |
246 | | - | 'spawn_agents' |
247 | | - | 'spawn_agents_async' |
248 | | - | 'str_replace' |
249 | | - | 'think_deeply' |
250 | | - | 'update_subgoal' |
251 | | - | 'web_search' |
252 | | - | 'write_file' |
253 | | - |
254 | | -/** |
255 | | - * Map of tool names to their parameter types |
256 | | - */ |
257 | | -export interface ToolParamsMap { |
258 | | - add_message: AddMessageParams |
259 | | - add_subgoal: AddSubgoalParams |
260 | | - browser_logs: BrowserLogsParams |
261 | | - code_search: CodeSearchParams |
262 | | - create_plan: CreatePlanParams |
263 | | - end_turn: EndTurnParams |
264 | | - find_files: FindFilesParams |
265 | | - read_docs: ReadDocsParams |
266 | | - read_files: ReadFilesParams |
267 | | - run_file_change_hooks: RunFileChangeHooksParams |
268 | | - run_terminal_command: RunTerminalCommandParams |
269 | | - send_agent_message: SendAgentMessageParams |
270 | | - set_messages: SetMessagesParams |
271 | | - set_output: SetOutputParams |
272 | | - spawn_agents: SpawnAgentsParams |
273 | | - spawn_agents_async: SpawnAgentsAsyncParams |
274 | | - str_replace: StrReplaceParams |
275 | | - think_deeply: ThinkDeeplyParams |
276 | | - update_subgoal: UpdateSubgoalParams |
277 | | - web_search: WebSearchParams |
278 | | - write_file: WriteFileParams |
279 | | -} |
280 | | - |
281 | 281 | /** |
282 | 282 | * Get parameters type for a specific tool |
283 | 283 | */ |
|
0 commit comments