diff --git a/src/shared/tools.ts b/src/shared/tools.ts index 6ae8eecfc3..235e49718b 100644 --- a/src/shared/tools.ts +++ b/src/shared/tools.ts @@ -80,6 +80,15 @@ export const toolParamNames = [ // read_file legacy format parameter (backward compatibility) "files", "line_ranges", + // select_active_intent parameter + "intent_id", + // create_intent parameters + "intent_name", + "owned_scope", + "constraints", + "acceptance_criteria", + // record_lesson parameters + "lesson", ] as const export type ToolParamName = (typeof toolParamNames)[number] @@ -115,6 +124,23 @@ export type NativeToolArgs = { update_todo_list: { todos: string } use_mcp_tool: { server_name: string; tool_name: string; arguments?: Record } write_to_file: { path: string; content: string } + select_active_intent: { intent_id: string } + create_intent: { + prompt: string + intent_id?: string + intent_name?: string + owned_scope?: string[] + constraints?: string[] + acceptance_criteria?: string[] + } + record_lesson: { + lesson: string + context?: { + tool?: string + error?: string + file?: string + } + } // Add more tools as they are migrated to native protocol } @@ -266,6 +292,7 @@ export type ToolGroupConfig = { export const TOOL_DISPLAY_NAMES: Record = { select_active_intent: "select active intent", + create_intent: "create intent", execute_command: "run commands", read_file: "read files", read_command_output: "read command output", @@ -290,6 +317,7 @@ export const TOOL_DISPLAY_NAMES: Record = { skill: "load skill", generate_image: "generate images", custom_tool: "use custom tools", + record_lesson: "record lesson", } as const // Define available tool groups. @@ -316,6 +344,7 @@ export const TOOL_GROUPS: Record = { // Tools that are always available to all modes. export const ALWAYS_AVAILABLE_TOOLS: ToolName[] = [ "select_active_intent", + "create_intent", "ask_followup_question", "attempt_completion", "switch_mode",