import { z } from "zod" /** * ToolGroup */ export const toolGroups = ["read", "edit", "browser", "command", "mcp", "modes"] as const export const toolGroupsSchema = z.enum(toolGroups) export type ToolGroup = z.infer /** * ToolName */ export const toolNames = [ "execute_command", "read_file", "write_to_file", "apply_diff", "insert_content", "search_and_replace", "search_files", "list_files", "list_code_definition_names", "browser_action", "use_mcp_tool", "access_mcp_resource", "ask_followup_question", "attempt_completion", "switch_mode", "new_task", "fetch_instructions", "codebase_search", "update_todo_list", "report_bug", "condense", "new_rule", ] as const export const toolNamesSchema = z.enum(toolNames) export type ToolName = z.infer /** * ToolUsage */ export const toolUsageSchema = z.record( toolNamesSchema, z.object({ attempts: z.number(), failures: z.number(), }), ) export type ToolUsage = z.infer