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
39/// Reverse one completed turn's exact file changes.
40pub const TURN_UNDO: &str = "turn/undo";
41
42/// Force-terminate the selected session's foreground exec sessions.
43pub const EXEC_FORCE_CANCEL: &str = "session/exec/force-cancel";
44/// Move the selected session's foreground exec session to the background.
45pub const EXEC_BACKGROUND: &str = "session/exec/background";
46/// Respond to a pending interaction.
47pub const INTERACTION_RESPOND: &str = "interaction/respond";
48/// Discover active provider/model setup.
49pub const CONFIG_DISCOVER: &str = "config/discover";
50/// Change runtime session options while idle.
51pub const CONFIG_OPTIONS: &str = "config/options";
52/// Persist the selected built-in CLI theme.
53pub const CONFIG_THEME: &str = "config/theme";
54/// Read a bounded, credential-filtered CLI settings catalog.
55pub const CONFIG_SETTINGS_READ: &str = "config/settings/read";
56/// Persist one CLI setting through the shared configuration service.
57pub const CONFIG_SETTINGS_WRITE: &str = "config/settings/write";
58/// Open one layered config file in the platform default editor.
59pub const CONFIG_OPEN_FILE: &str = "config/openFile";
60/// Discover installed CLI skills and Agent Plugins.
61pub const COMPOSER_RESOURCES: &str = "composer/resources";
62/// List selectable models from the service's catalog.
63pub const CONFIG_MODELS: &str = "config/models";
64/// Select the provider/model for the selected session. The service restarts
65/// the session runtime under the same session id; the thread is preserved.
66pub const CONFIG_SELECT: &str = "config/select";
67/// Store a provider API key from the desktop client in secure storage.
68/// The secret travels the local channel only and is never echoed back.
69pub const CONFIG_SECRET_STORE: &str = "config/secret/store";
70/// Shut down the local service after owned tasks finish.
71pub const SHUTDOWN: &str = "desktop/shutdown";
72/// Stream an authoritative runtime event.
73pub const THREAD_EVENT: &str = "thread/event";
74/// Ask the client to resolve a runtime interaction.
75pub const INTERACTION_REQUESTED: &str = "interaction/requested";
76/// Publish the active primary agent for a live session.
77pub const PRIMARY_AGENT_CHANGED: &str = "session/primaryAgentChanged";
78/// Publish visible turn state.
79pub const TURN_STATUS: &str = "turn/status";
80/// Publish the authoritative queued-message snapshot.
81pub const TURN_QUEUE_STATUS: &str = "turn/queue-status";
82/// Read bridge state and the non-secret configured origin list.
83pub const WEBMCP_STATUS: &str = "webmcp/status";
84/// Start or reuse the WebMCP bridge and issue an origin-bound pairing code.
85pub const WEBMCP_PAIR: &str = "webmcp/pair";
86/// Revoke the bridge's pairings and stop its listener.
87pub const WEBMCP_STOP: &str = "webmcp/stop";
88/// Read the cached updater status (current/latest version, no network I/O).
89pub const UPDATE_STATUS: &str = "update/status";
90
91/// Transient UI progress for the active desktop session.
92pub const UI_PROGRESS: &str = "session/ui_progress";