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// TOOL IDS
13// ============================================================
14pub const THINK: &str = "think";
15pub const SEARCH_TOOLS: &str = "search_tools";
16pub const WEB_SEARCH: &str = "web_search";
17pub const FETCH_URL: &str = "fetch_url";
18pub const LIST: &str = "list";
19pub const GREP: &str = "grep";
20pub const FETCH: &str = "fetch";
21pub const EXEC_PTY_CMD: &str = "exec_pty_cmd";
22pub const SHELL: &str = "shell";
23pub const GREP_FILE: &str = "grep_file";
24pub const LIST_FILES: &str = "list_files";
25
26// ============================================================
27// SKILL MANAGEMENT TOOLS (Progressive Disclosure)
28// ============================================================
29/// List all available skills (local and dormant system utilities)
30pub const LIST_SKILLS: &str = "list_skills";
31/// Load a skill's instructions and activate its tools
32pub const LOAD_SKILL: &str = "load_skill";
33/// Load resources from a skill (scripts, templates, docs)
34pub const LOAD_SKILL_RESOURCE: &str = "load_skill_resource";
35
36// ============================================================
37// LEGACY EXECUTION ALIASES (use unified_exec instead)
38// ============================================================
39pub const EXEC_COMMAND: &str = "exec_command";
40pub const WRITE_STDIN: &str = "write_stdin";
41pub const RUN_PTY_CMD: &str = "run_pty_cmd";
42pub const CREATE_PTY_SESSION: &str = "create_pty_session";
43pub const LIST_PTY_SESSIONS: &str = "list_pty_sessions";
44pub const CLOSE_PTY_SESSION: &str = "close_pty_session";
45pub const SEND_PTY_INPUT: &str = "send_pty_input";
46pub const READ_PTY_SESSION: &str = "read_pty_session";
47pub const RESIZE_PTY_SESSION: &str = "resize_pty_session";
48pub const EXECUTE_CODE: &str = "execute_code";
49
50// ============================================================
51// LEGACY FILE OPERATION ALIASES (use unified_file instead)
52// ============================================================
53pub const READ_FILE: &str = "read_file";
54pub const WRITE_FILE: &str = "write_file";
55pub const EDIT_FILE: &str = "edit_file";
56pub const DELETE_FILE: &str = "delete_file";
57pub const CREATE_FILE: &str = "create_file";
58pub const APPLY_PATCH: &str = "apply_patch";
59pub const SEARCH_REPLACE: &str = "search_replace";
60pub const FILE_OP: &str = "file_op";
61pub const MOVE_FILE: &str = "move_file";
62pub const COPY_FILE: &str = "copy_file";
63
64// ============================================================
65// ERROR & DIAGNOSTICS
66// ============================================================
67pub const GET_ERRORS: &str = "get_errors";
68
69// ============================================================
70// HUMAN-IN-THE-LOOP (HITL)
71// ============================================================
72/// Canonical HITL tool name for structured user input.
73pub const REQUEST_USER_INPUT: &str = "request_user_input";
74/// Legacy alias routed to `request_user_input`.
75pub const ASK_QUESTIONS: &str = "ask_questions";
76/// Legacy alias routed to `request_user_input` (deprecated tabbed shape).
77pub const ASK_USER_QUESTION: &str = "ask_user_question";
78/// Schedule a session-scoped task using a cron or one-shot schedule.
79pub const CRON_CREATE: &str = "cron_create";
80/// List session-scoped scheduled tasks.
81pub const CRON_LIST: &str = "cron_list";
82/// Delete a session-scoped scheduled task by id.
83pub const CRON_DELETE: &str = "cron_delete";
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// ============================================================
98// SUBAGENT COLLABORATION
99// ============================================================
100/// Spawn a delegated child agent.
101pub const SPAWN_AGENT: &str = "spawn_agent";
102/// Send follow-up input to a delegated child agent.
103pub const SEND_INPUT: &str = "send_input";
104/// Wait for one or more delegated child agents to finish.
105pub const WAIT_AGENT: &str = "wait_agent";
106/// Resume a delegated child agent without sending a message.
107pub const RESUME_AGENT: &str = "resume_agent";
108/// Close a delegated child agent.
109pub const CLOSE_AGENT: &str = "close_agent";
110
111// Special wildcard for full access
112pub const WILDCARD_ALL: &str = "*";