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 WEB_SEARCH: &str = "web_search";
17pub const WEB_FETCH: &str = "web_fetch";
18pub const FETCH_URL: &str = "fetch_url";
19pub const LIST: &str = "list";
20pub const GREP: &str = "grep";
21pub const FETCH: &str = "fetch";
22pub const EXEC_PTY_CMD: &str = "exec_pty_cmd";
23pub const SHELL: &str = "shell";
24pub const GREP_FILE: &str = "grep_file";
25pub const LIST_FILES: &str = "list_files";
26
27// ============================================================
28// SKILL MANAGEMENT TOOLS (Progressive Disclosure)
29// ============================================================
30/// List all available skills (local and dormant system utilities)
31pub const LIST_SKILLS: &str = "list_skills";
32/// Load a skill's instructions and activate its tools
33pub const LOAD_SKILL: &str = "load_skill";
34/// Load resources from a skill (scripts, templates, docs)
35pub const LOAD_SKILL_RESOURCE: &str = "load_skill_resource";
36
37// ============================================================
38// LEGACY EXECUTION ALIASES (use unified_exec instead)
39// ============================================================
40pub const EXEC_COMMAND: &str = "exec_command";
41pub const WRITE_STDIN: &str = "write_stdin";
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
51// ============================================================
52// LEGACY FILE OPERATION ALIASES (use unified_file instead)
53// ============================================================
54pub const READ_FILE: &str = "read_file";
55pub const WRITE_FILE: &str = "write_file";
56pub const EDIT_FILE: &str = "edit_file";
57pub const DELETE_FILE: &str = "delete_file";
58pub const CREATE_FILE: &str = "create_file";
59pub const APPLY_PATCH: &str = "apply_patch";
60pub const SEARCH_REPLACE: &str = "search_replace";
61pub const FILE_OP: &str = "file_op";
62pub const MOVE_FILE: &str = "move_file";
63pub const COPY_FILE: &str = "copy_file";
64
65// ============================================================
66// ERROR & DIAGNOSTICS
67// ============================================================
68pub const GET_ERRORS: &str = "get_errors";
69
70// ============================================================
71// HUMAN-IN-THE-LOOP (HITL)
72// ============================================================
73/// Canonical HITL tool name for structured user input.
74pub const REQUEST_USER_INPUT: &str = "request_user_input";
75/// Canonical memory tool name for Anthropic native memory sessions.
76pub const MEMORY: &str = "memory";
77/// Legacy alias routed to `request_user_input`.
78pub const ASK_QUESTIONS: &str = "ask_questions";
79/// Legacy alias routed to `request_user_input` (deprecated tabbed shape).
80pub const ASK_USER_QUESTION: &str = "ask_user_question";
81/// Schedule a session-scoped task using a cron or one-shot schedule.
82pub const CRON_CREATE: &str = "cron_create";
83/// List session-scoped scheduled tasks.
84pub const CRON_LIST: &str = "cron_list";
85/// Delete a session-scoped scheduled task by id.
86pub const CRON_DELETE: &str = "cron_delete";
87
88// ============================================================
89// PLAN MODE
90// ============================================================
91/// Enter plan mode - enables read-only tools and planning workflow.
92pub const ENTER_PLAN_MODE: &str = "enter_plan_mode";
93/// Exit plan mode - triggers confirmation modal before execution.
94pub const EXIT_PLAN_MODE: &str = "exit_plan_mode";
95/// Task tracker / plan manager - tracks checklist progress during complex tasks.
96pub const TASK_TRACKER: &str = "task_tracker";
97/// Plan-mode scoped task tracker persisted under `.vtcode/plans/`.
98pub const PLAN_TASK_TRACKER: &str = "plan_task_tracker";
99
100// ============================================================
101// SUBAGENT COLLABORATION
102// ============================================================
103/// Spawn a delegated child agent.
104pub const SPAWN_AGENT: &str = "spawn_agent";
105/// Send follow-up input to a delegated child agent.
106pub const SEND_INPUT: &str = "send_input";
107/// Wait for one or more delegated child agents to finish.
108pub const WAIT_AGENT: &str = "wait_agent";
109/// Resume a delegated child agent without sending a message.
110pub const RESUME_AGENT: &str = "resume_agent";
111/// Close a delegated child agent.
112pub const CLOSE_AGENT: &str = "close_agent";
113
114// Special wildcard for full access
115pub const WILDCARD_ALL: &str = "*";