chore: commit src/shared/tools.ts

This commit is contained in:
sumeyaaaa 2026-02-21 13:59:19 +03:00
parent b7568c8852
commit 922841e6a9

View file

@ -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<string, unknown> }
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<ToolName, string> = {
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<ToolName, string> = {
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<ToolGroup, ToolGroupConfig> = {
// 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",