Skip to main content

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 MCP_SEARCH_TOOLS: &str = "mcp_search_tools";
17pub const MCP_GET_TOOL_DETAILS: &str = "mcp_get_tool_details";
18pub const MCP_LIST_SERVERS: &str = "mcp_list_servers";
19pub const MCP_CONNECT_SERVER: &str = "mcp_connect_server";
20pub const MCP_DISCONNECT_SERVER: &str = "mcp_disconnect_server";
21pub const WEB_SEARCH: &str = "web_search";
22pub const WEB_FETCH: &str = "web_fetch";
23pub const FETCH_URL: &str = "fetch_url";
24pub const LIST: &str = "list";
25pub const GREP: &str = "grep";
26pub const FETCH: &str = "fetch";
27pub const EXEC_PTY_CMD: &str = "exec_pty_cmd";
28pub const SHELL: &str = "shell";
29pub const GREP_FILE: &str = "grep_file";
30pub const LIST_FILES: &str = "list_files";
31
32// ============================================================
33// SKILL MANAGEMENT TOOLS (Progressive Disclosure)
34// ============================================================
35/// List all available skills (local and dormant system utilities)
36pub const LIST_SKILLS: &str = "list_skills";
37/// Load a skill's instructions and activate its tools
38pub const LOAD_SKILL: &str = "load_skill";
39/// Load resources from a skill (scripts, templates, docs)
40pub const LOAD_SKILL_RESOURCE: &str = "load_skill_resource";
41
42// ============================================================
43// LEGACY EXECUTION ALIASES (use unified_exec instead)
44// ============================================================
45pub const EXEC_COMMAND: &str = "exec_command";
46pub const WRITE_STDIN: &str = "write_stdin";
47pub const RUN_PTY_CMD: &str = "run_pty_cmd";
48pub const CREATE_PTY_SESSION: &str = "create_pty_session";
49pub const LIST_PTY_SESSIONS: &str = "list_pty_sessions";
50pub const CLOSE_PTY_SESSION: &str = "close_pty_session";
51pub const SEND_PTY_INPUT: &str = "send_pty_input";
52pub const READ_PTY_SESSION: &str = "read_pty_session";
53pub const RESIZE_PTY_SESSION: &str = "resize_pty_session";
54pub const EXECUTE_CODE: &str = "execute_code";
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/// Canonical memory tool name for Anthropic native memory sessions.
81pub const MEMORY: &str = "memory";
82/// Legacy alias routed to `request_user_input`.
83pub const ASK_QUESTIONS: &str = "ask_questions";
84/// Legacy alias routed to `request_user_input` (deprecated tabbed shape).
85pub const ASK_USER_QUESTION: &str = "ask_user_question";
86/// Schedule a session-scoped task using a cron or one-shot schedule.
87pub const CRON_CREATE: &str = "cron_create";
88/// List session-scoped scheduled tasks.
89pub const CRON_LIST: &str = "cron_list";
90/// Delete a session-scoped scheduled task by id.
91pub const CRON_DELETE: &str = "cron_delete";
92
93// ============================================================
94// PLAN MODE
95// ============================================================
96/// Enter plan mode - enables read-only tools and planning workflow.
97pub const ENTER_PLAN_MODE: &str = "enter_plan_mode";
98/// Exit plan mode - triggers confirmation modal before execution.
99pub const EXIT_PLAN_MODE: &str = "exit_plan_mode";
100/// Task tracker / plan manager - tracks checklist progress during complex tasks.
101pub const TASK_TRACKER: &str = "task_tracker";
102/// Plan-mode scoped task tracker persisted under `.vtcode/plans/`.
103pub const PLAN_TASK_TRACKER: &str = "plan_task_tracker";
104
105// ============================================================
106// SUBAGENT COLLABORATION
107// ============================================================
108/// Spawn a delegated child agent.
109pub const SPAWN_AGENT: &str = "spawn_agent";
110/// Launch a managed background subprocess that hosts a background-enabled subagent.
111pub const SPAWN_BACKGROUND_SUBPROCESS: &str = "spawn_background_subprocess";
112/// Send follow-up input to a delegated child agent.
113pub const SEND_INPUT: &str = "send_input";
114/// Wait for one or more delegated child agents to finish.
115pub const WAIT_AGENT: &str = "wait_agent";
116/// Resume a delegated child agent without sending a message.
117pub const RESUME_AGENT: &str = "resume_agent";
118/// Close a delegated child agent.
119pub const CLOSE_AGENT: &str = "close_agent";
120
121// Special wildcard for full access
122pub const WILDCARD_ALL: &str = "*";