vtcode_config/constants/tools.rs
1// ============================================================
2// UNIFIED TOOLS (Primary Interface)
3// ============================================================
4/// Unified search & discovery tool (aliases: grep_file, list_files, etc.)
5pub const UNIFIED_SEARCH: &str = "unified_search";
6/// Unified shell execution & code execution tool (aliases: run_pty_cmd, execute_code, etc.)
7pub const UNIFIED_EXEC: &str = "unified_exec";
8/// Unified file operations tool (aliases: read_file, write_file, edit_file, etc.)
9pub const UNIFIED_FILE: &str = "unified_file";
10
11// ============================================================
12// SKILL MANAGEMENT TOOLS (Progressive Disclosure)
13// ============================================================
14/// List all available skills (local and dormant system utilities)
15pub const LIST_SKILLS: &str = "list_skills";
16/// Load a skill's instructions and activate its tools
17pub const LOAD_SKILL: &str = "load_skill";
18/// Load resources from a skill (scripts, templates, docs)
19pub const LOAD_SKILL_RESOURCE: &str = "load_skill_resource";
20
21// ============================================================
22// AGENT CONTROL TOOLS (Delegation)
23// ============================================================
24/// Spawn a subagent for specialized tasks (explore, plan, general, etc.)
25pub const SPAWN_SUBAGENT: &str = "spawn_subagent";
26
27// ============================================================
28// LEGACY SEARCH ALIASES (use unified_search instead)
29// ============================================================
30pub const GREP_FILE: &str = "grep_file";
31pub const LIST_FILES: &str = "list_files";
32pub const SEARCH_TOOLS: &str = "search_tools";
33pub const SKILL: &str = "skill";
34pub const AGENT_INFO: &str = "agent_info";
35pub const WEB_FETCH: &str = "web_fetch";
36pub const SEARCH: &str = "search";
37pub const FIND: &str = "find";
38
39// ============================================================
40// LEGACY EXECUTION ALIASES (use unified_exec instead)
41// ============================================================
42pub const RUN_PTY_CMD: &str = "run_pty_cmd";
43pub const CREATE_PTY_SESSION: &str = "create_pty_session";
44pub const LIST_PTY_SESSIONS: &str = "list_pty_sessions";
45pub const CLOSE_PTY_SESSION: &str = "close_pty_session";
46pub const SEND_PTY_INPUT: &str = "send_pty_input";
47pub const READ_PTY_SESSION: &str = "read_pty_session";
48pub const RESIZE_PTY_SESSION: &str = "resize_pty_session";
49pub const EXECUTE_CODE: &str = "execute_code";
50/// Legacy provider-emitted alias for execute_code.
51pub const EXEC_CODE: &str = "exec_code";
52pub const EXEC_PTY_CMD: &str = "exec_pty_cmd";
53pub const EXEC: &str = "exec";
54pub const SHELL: &str = "shell";
55
56// ============================================================
57// LEGACY FILE OPERATION ALIASES (use unified_file instead)
58// ============================================================
59pub const READ_FILE: &str = "read_file";
60pub const WRITE_FILE: &str = "write_file";
61pub const EDIT_FILE: &str = "edit_file";
62pub const DELETE_FILE: &str = "delete_file";
63pub const CREATE_FILE: &str = "create_file";
64pub const APPLY_PATCH: &str = "apply_patch";
65pub const SEARCH_REPLACE: &str = "search_replace";
66pub const FILE_OP: &str = "file_op";
67pub const MOVE_FILE: &str = "move_file";
68pub const COPY_FILE: &str = "copy_file";
69
70// ============================================================
71// ERROR & DIAGNOSTICS
72// ============================================================
73pub const GET_ERRORS: &str = "get_errors";
74
75// ============================================================
76// HUMAN-IN-THE-LOOP (HITL)
77// ============================================================
78/// Canonical HITL tool name for structured user input.
79pub const REQUEST_USER_INPUT: &str = "request_user_input";
80/// Legacy alias routed to `request_user_input`.
81pub const ASK_QUESTIONS: &str = "ask_questions";
82/// Legacy alias routed to `request_user_input` (deprecated tabbed shape).
83pub const ASK_USER_QUESTION: &str = "ask_user_question";
84
85// ============================================================
86// PLAN MODE
87// ============================================================
88/// Enter plan mode - enables read-only tools and planning workflow.
89pub const ENTER_PLAN_MODE: &str = "enter_plan_mode";
90/// Exit plan mode - triggers confirmation modal before execution.
91pub const EXIT_PLAN_MODE: &str = "exit_plan_mode";
92/// Task tracker / plan manager - tracks checklist progress during complex tasks.
93pub const TASK_TRACKER: &str = "task_tracker";
94/// Plan-mode scoped task tracker persisted under `.vtcode/plans/`.
95pub const PLAN_TASK_TRACKER: &str = "plan_task_tracker";
96
97// Special wildcard for full access
98pub const WILDCARD_ALL: &str = "*";