Skip to main content

vtcode_desktop_protocol/
method.rs

1//! Known desktop JSON-RPC methods.
2/// Initialize and negotiate protocol support.
3pub const INITIALIZE: &str = "desktop/initialize";
4/// Capture a bounded read-only Git preview, including valid unborn branches.
5pub const WORKSPACE_REVIEW: &str = "workspace/review";
6/// List sessions in the selected workspace.
7pub const SESSION_LIST: &str = "session/list";
8/// Create a session.
9pub const SESSION_CREATE: &str = "session/create";
10/// Load a durable session.
11pub const SESSION_LOAD: &str = "session/load";
12/// Load one bounded earlier page from the selected durable session.
13pub const SESSION_HISTORY: &str = "session/history";
14/// List recent genuine user prompts across workspace sessions for history search.
15pub const SESSION_RECENT_PROMPTS: &str = "session/recent-prompts";
16/// Read one bounded page of archived tool output on demand.
17pub const SESSION_OUTPUT_READ: &str = "session/output/read";
18/// Read one bounded MCP app-resource body for static preview.
19pub const MCP_APP_READ: &str = "mcp/app/read";
20/// Read one retained computer-use screenshot body, or its expiry.
21pub const COMPUTER_PREVIEW_READ: &str = "computer/preview/read";
22/// Close the selected session after cleanup.
23pub const SESSION_CLOSE: &str = "session/close";
24/// Delete one session archive by identifier.
25pub const SESSION_DELETE: &str = "session/delete";
26/// Read on-disk usage broken down by owning store.
27pub const STORAGE_SUMMARY: &str = "storage/summary";
28/// List managed loop-isolation worktrees.
29pub const WORKTREE_LIST: &str = "worktree/list";
30/// Remove one managed worktree by name.
31pub const WORKTREE_REMOVE: &str = "worktree/remove";
32/// Submit a user turn.
33pub const TURN_SUBMIT: &str = "turn/submit";
34/// Cancel a running turn.
35pub const TURN_CANCEL: &str = "turn/cancel";
36/// Pop the newest queued message back for editing.
37pub const TURN_QUEUE_TAKE_LATEST: &str = "turn/queue/take-latest";
38/// Remove one queued message by entry id.
39pub const TURN_QUEUE_REMOVE: &str = "turn/queue/remove";
40/// Replace the prompt text of one queued message in place, keeping its FIFO
41/// position and wire entry id.
42pub const TURN_QUEUE_EDIT: &str = "turn/queue/edit";
43/// Inject a prompt into the live turn as steering input instead of queueing it.
44pub const TURN_STEER: &str = "turn/steer";
45/// Terminal runtime acknowledgment for a `turn/steer` handoff.
46pub const TURN_STEER_RESULT: &str = "turn/steer/result";
47/// Execute a `/goal` command against the selected session's goal loop.
48pub const GOAL_EXECUTE: &str = "goal/execute";
49
50/// Reverse one completed turn's exact file changes.
51pub const TURN_UNDO: &str = "turn/undo";
52
53/// Force-terminate the selected session's foreground exec sessions.
54pub const EXEC_FORCE_CANCEL: &str = "session/exec/force-cancel";
55/// Move the selected session's foreground exec session to the background.
56pub const EXEC_BACKGROUND: &str = "session/exec/background";
57/// Respond to a pending interaction.
58pub const INTERACTION_RESPOND: &str = "interaction/respond";
59/// Discover active provider/model setup.
60pub const CONFIG_DISCOVER: &str = "config/discover";
61/// Change runtime session options while idle.
62pub const CONFIG_OPTIONS: &str = "config/options";
63/// Persist the selected built-in CLI theme.
64pub const CONFIG_THEME: &str = "config/theme";
65/// Read a bounded, credential-filtered CLI settings catalog.
66pub const CONFIG_SETTINGS_READ: &str = "config/settings/read";
67/// Persist one CLI setting through the shared configuration service.
68pub const CONFIG_SETTINGS_WRITE: &str = "config/settings/write";
69/// Open one layered config file in the platform default editor.
70pub const CONFIG_OPEN_FILE: &str = "config/openFile";
71/// Discover installed CLI skills and Agent Plugins.
72pub const COMPOSER_RESOURCES: &str = "composer/resources";
73/// List selectable models from the service's catalog.
74pub const CONFIG_MODELS: &str = "config/models";
75/// Select the provider/model for the selected session. The service restarts
76/// the session runtime under the same session id; the thread is preserved.
77pub const CONFIG_SELECT: &str = "config/select";
78/// Store a provider API key from the desktop client in secure storage.
79/// The secret travels the local channel only and is never echoed back.
80pub const CONFIG_SECRET_STORE: &str = "config/secret/store";
81/// Shut down the local service after owned tasks finish.
82pub const SHUTDOWN: &str = "desktop/shutdown";
83/// Stream an authoritative runtime event.
84pub const THREAD_EVENT: &str = "thread/event";
85/// Ask the client to resolve a runtime interaction.
86pub const INTERACTION_REQUESTED: &str = "interaction/requested";
87/// Publish the active primary agent for a live session.
88pub const PRIMARY_AGENT_CHANGED: &str = "session/primaryAgentChanged";
89/// Publish visible turn state.
90pub const TURN_STATUS: &str = "turn/status";
91/// Publish the authoritative queued-message snapshot.
92pub const TURN_QUEUE_STATUS: &str = "turn/queue-status";
93/// Read bridge state and the non-secret configured origin list.
94pub const WEBMCP_STATUS: &str = "webmcp/status";
95/// Start or reuse the WebMCP bridge and issue an origin-bound pairing code.
96pub const WEBMCP_PAIR: &str = "webmcp/pair";
97/// Revoke the bridge's pairings and stop its listener.
98pub const WEBMCP_STOP: &str = "webmcp/stop";
99/// Read the cached updater status (current/latest version, no network I/O).
100pub const UPDATE_STATUS: &str = "update/status";
101/// Mark the running version's release notes as seen in the shared update
102/// cache, so the CLI and desktop app never show the same release twice.
103pub const UPDATE_ACKNOWLEDGE: &str = "update/acknowledge";
104/// Re-run the update check against GitHub (network I/O) and return the
105/// refreshed status, so a manual check observes a release the cache predates.
106pub const UPDATE_CHECK: &str = "update/check";
107/// Install the newest release. The response carries the starting install
108/// state; `update/installProgress` notifications then stream the phases.
109pub const UPDATE_INSTALL: &str = "update/install";
110/// Publish in-app update install progress. Coalescable: only the newest
111/// state matters, so a slow client never applies stale phases.
112pub const UPDATE_INSTALL_PROGRESS: &str = "update/installProgress";
113
114/// Transient UI progress for the active desktop session.
115pub const UI_PROGRESS: &str = "session/ui_progress";
116
117/// List applicable setup repairs for the workspace (pure detection, no writes).
118pub const DIAGNOSTICS_CHECKUP: &str = "diagnostics/checkup";
119/// Apply one directly-appliable setup repair by id.
120pub const DIAGNOSTICS_APPLY: &str = "diagnostics/apply";