| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- 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<typeof toolGroupsSchema>
- /**
- * 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",
- ] as const
- export const toolNamesSchema = z.enum(toolNames)
- export type ToolName = z.infer<typeof toolNamesSchema>
- /**
- * ToolUsage
- */
- export const toolUsageSchema = z.record(
- toolNamesSchema,
- z.object({
- attempts: z.number(),
- failures: z.number(),
- }),
- )
- export type ToolUsage = z.infer<typeof toolUsageSchema>
|