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/// Read one bounded page of archived tool output on demand.
15pub const SESSION_OUTPUT_READ: &str = "session/output/read";
16/// Read one bounded MCP app-resource body for static preview.
17pub const MCP_APP_READ: &str = "mcp/app/read";
18/// Close the selected session after cleanup.
19pub const SESSION_CLOSE: &str = "session/close";
20/// Delete one session archive by identifier.
21pub const SESSION_DELETE: &str = "session/delete";
22/// Read on-disk usage broken down by owning store.
23pub const STORAGE_SUMMARY: &str = "storage/summary";
24/// List managed loop-isolation worktrees.
25pub const WORKTREE_LIST: &str = "worktree/list";
26/// Remove one managed worktree by name.
27pub const WORKTREE_REMOVE: &str = "worktree/remove";
28/// Submit a user turn.
29pub const TURN_SUBMIT: &str = "turn/submit";
30/// Cancel a running turn.
31pub const TURN_CANCEL: &str = "turn/cancel";
32/// Pop the newest queued message back for editing.
33pub const TURN_QUEUE_TAKE_LATEST: &str = "turn/queue/take-latest";
34/// Force-terminate the selected session's foreground exec sessions.
35pub const EXEC_FORCE_CANCEL: &str = "session/exec/force-cancel";
36/// Move the selected session's foreground exec session to the background.
37pub const EXEC_BACKGROUND: &str = "session/exec/background";
38/// Respond to a pending interaction.
39pub const INTERACTION_RESPOND: &str = "interaction/respond";
40/// Discover active provider/model setup.
41pub const CONFIG_DISCOVER: &str = "config/discover";
42/// Change runtime session options while idle.
43pub const CONFIG_OPTIONS: &str = "config/options";
44/// Persist the selected built-in CLI theme.
45pub const CONFIG_THEME: &str = "config/theme";
46/// Read a bounded, credential-filtered CLI settings catalog.
47pub const CONFIG_SETTINGS_READ: &str = "config/settings/read";
48/// Persist one CLI setting through the shared configuration service.
49pub const CONFIG_SETTINGS_WRITE: &str = "config/settings/write";
50/// Open one layered config file in the platform default editor.
51pub const CONFIG_OPEN_FILE: &str = "config/openFile";
52/// Discover installed CLI skills and Agent Plugins.
53pub const COMPOSER_RESOURCES: &str = "composer/resources";
54/// List selectable models from the service's catalog.
55pub const CONFIG_MODELS: &str = "config/models";
56/// Select the provider/model for the selected session. The service restarts
57/// the session runtime under the same session id; the thread is preserved.
58pub const CONFIG_SELECT: &str = "config/select";
59/// Store a provider API key from the desktop client in secure storage.
60/// The secret travels the local channel only and is never echoed back.
61pub const CONFIG_SECRET_STORE: &str = "config/secret/store";
62/// Shut down the local service after owned tasks finish.
63pub const SHUTDOWN: &str = "desktop/shutdown";
64/// Stream an authoritative runtime event.
65pub const THREAD_EVENT: &str = "thread/event";
66/// Ask the client to resolve a runtime interaction.
67pub const INTERACTION_REQUESTED: &str = "interaction/requested";
68/// Publish the active primary agent for a live session.
69pub const PRIMARY_AGENT_CHANGED: &str = "session/primaryAgentChanged";
70/// Publish visible turn state.
71pub const TURN_STATUS: &str = "turn/status";
72/// Publish the authoritative queued-message snapshot.
73pub const TURN_QUEUE_STATUS: &str = "turn/queue-status";
74/// Read bridge state and the non-secret configured origin list.
75pub const WEBMCP_STATUS: &str = "webmcp/status";
76/// Start or reuse the WebMCP bridge and issue an origin-bound pairing code.
77pub const WEBMCP_PAIR: &str = "webmcp/pair";
78/// Revoke the bridge's pairings and stop its listener.
79pub const WEBMCP_STOP: &str = "webmcp/stop";
80/// Read the cached updater status (current/latest version, no network I/O).
81pub const UPDATE_STATUS: &str = "update/status";
82
83/// Transient UI progress for the active desktop session.
84pub const UI_PROGRESS: &str = "session/ui_progress";