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/// Close the selected session after cleanup.
21pub const SESSION_CLOSE: &str = "session/close";
22/// Delete one session archive by identifier.
23pub const SESSION_DELETE: &str = "session/delete";
24/// Read on-disk usage broken down by owning store.
25pub const STORAGE_SUMMARY: &str = "storage/summary";
26/// List managed loop-isolation worktrees.
27pub const WORKTREE_LIST: &str = "worktree/list";
28/// Remove one managed worktree by name.
29pub const WORKTREE_REMOVE: &str = "worktree/remove";
30/// Submit a user turn.
31pub const TURN_SUBMIT: &str = "turn/submit";
32/// Cancel a running turn.
33pub const TURN_CANCEL: &str = "turn/cancel";
34/// Pop the newest queued message back for editing.
35pub const TURN_QUEUE_TAKE_LATEST: &str = "turn/queue/take-latest";
36/// Remove one queued message by entry id.
37pub const TURN_QUEUE_REMOVE: &str = "turn/queue/remove";
38/// Replace the prompt text of one queued message in place, keeping its FIFO
39/// position and wire entry id.
40pub const TURN_QUEUE_EDIT: &str = "turn/queue/edit";
41/// Inject a prompt into the live turn as steering input instead of queueing it.
42pub const TURN_STEER: &str = "turn/steer";
43/// Terminal runtime acknowledgment for a `turn/steer` handoff.
44pub const TURN_STEER_RESULT: &str = "turn/steer/result";
45/// Execute a `/goal` command against the selected session's goal loop.
46pub const GOAL_EXECUTE: &str = "goal/execute";
47
48/// Reverse one completed turn's exact file changes.
49pub const TURN_UNDO: &str = "turn/undo";
50
51/// Force-terminate the selected session's foreground exec sessions.
52pub const EXEC_FORCE_CANCEL: &str = "session/exec/force-cancel";
53/// Move the selected session's foreground exec session to the background.
54pub const EXEC_BACKGROUND: &str = "session/exec/background";
55/// Respond to a pending interaction.
56pub const INTERACTION_RESPOND: &str = "interaction/respond";
57/// Discover active provider/model setup.
58pub const CONFIG_DISCOVER: &str = "config/discover";
59/// Change runtime session options while idle.
60pub const CONFIG_OPTIONS: &str = "config/options";
61/// Persist the selected built-in CLI theme.
62pub const CONFIG_THEME: &str = "config/theme";
63/// Read a bounded, credential-filtered CLI settings catalog.
64pub const CONFIG_SETTINGS_READ: &str = "config/settings/read";
65/// Persist one CLI setting through the shared configuration service.
66pub const CONFIG_SETTINGS_WRITE: &str = "config/settings/write";
67/// Open one layered config file in the platform default editor.
68pub const CONFIG_OPEN_FILE: &str = "config/openFile";
69/// Discover installed CLI skills and Agent Plugins.
70pub const COMPOSER_RESOURCES: &str = "composer/resources";
71/// List selectable models from the service's catalog.
72pub const CONFIG_MODELS: &str = "config/models";
73/// Select the provider/model for the selected session. The service restarts
74/// the session runtime under the same session id; the thread is preserved.
75pub const CONFIG_SELECT: &str = "config/select";
76/// Store a provider API key from the desktop client in secure storage.
77/// The secret travels the local channel only and is never echoed back.
78pub const CONFIG_SECRET_STORE: &str = "config/secret/store";
79/// Shut down the local service after owned tasks finish.
80pub const SHUTDOWN: &str = "desktop/shutdown";
81/// Stream an authoritative runtime event.
82pub const THREAD_EVENT: &str = "thread/event";
83/// Ask the client to resolve a runtime interaction.
84pub const INTERACTION_REQUESTED: &str = "interaction/requested";
85/// Publish the active primary agent for a live session.
86pub const PRIMARY_AGENT_CHANGED: &str = "session/primaryAgentChanged";
87/// Publish visible turn state.
88pub const TURN_STATUS: &str = "turn/status";
89/// Publish the authoritative queued-message snapshot.
90pub const TURN_QUEUE_STATUS: &str = "turn/queue-status";
91/// Read bridge state and the non-secret configured origin list.
92pub const WEBMCP_STATUS: &str = "webmcp/status";
93/// Start or reuse the WebMCP bridge and issue an origin-bound pairing code.
94pub const WEBMCP_PAIR: &str = "webmcp/pair";
95/// Revoke the bridge's pairings and stop its listener.
96pub const WEBMCP_STOP: &str = "webmcp/stop";
97/// Read the cached updater status (current/latest version, no network I/O).
98pub const UPDATE_STATUS: &str = "update/status";
99/// Mark the running version's release notes as seen in the shared update
100/// cache, so the CLI and desktop app never show the same release twice.
101pub const UPDATE_ACKNOWLEDGE: &str = "update/acknowledge";
102/// Re-run the update check against GitHub (network I/O) and return the
103/// refreshed status, so a manual check observes a release the cache predates.
104pub const UPDATE_CHECK: &str = "update/check";
105/// Install the newest release. The response carries the starting install
106/// state; `update/installProgress` notifications then stream the phases.
107pub const UPDATE_INSTALL: &str = "update/install";
108/// Publish in-app update install progress. Coalescable: only the newest
109/// state matters, so a slow client never applies stale phases.
110pub const UPDATE_INSTALL_PROGRESS: &str = "update/installProgress";
111
112/// Transient UI progress for the active desktop session.
113pub const UI_PROGRESS: &str = "session/ui_progress";