Skip to main content

Crate vtcode_desktop_protocol

Crate vtcode_desktop_protocol 

Source
Expand description

Versioned JSON-RPC messages shared by the VT Code desktop app and service.

The protocol deliberately carries the canonical VersionedThreadEvent instead of defining a second runtime event model.

Re-exports§

pub use interaction_registry::InteractionRegistry;
pub use frames::read_frame;
pub use frames::write_frame;
pub use live_events::LiveEventReceiver;
pub use live_events::LiveEventSendError;
pub use live_events::LiveEventSender;
pub use live_events::live_event_channel;
pub use secret::SecretStoreInfo;
pub use secret::SecretStoreParams;
pub use secret::SecretStoreResult;
pub use storage::SessionDeleteResult;
pub use storage::StorageSummary;
pub use storage::WorktreeEntry;
pub use storage::WorktreeRemoveParams;
pub use storage::WorktreeRemoveResult;
pub use composer::ComposerResource;
pub use composer::ComposerResourceKind;
pub use config::ConfigOpenFileParams;
pub use config::ConfigSetting;
pub use config::ConfigSettingsSnapshot;
pub use config::ConfigSettingsWriteParams;
pub use config::ConfigSettingsWriteResult;
pub use config::ConfigTarget;
pub use config::ConfigTargetVersion;
pub use config::ConfigurationSnapshot;
pub use config::ModelCapabilities;
pub use config::ModelInfo;
pub use config::ModelSelectParams;
pub use config::SharedUiPreferences;
pub use interaction::InteractionChoice;
pub use interaction::InteractionHotkey;
pub use interaction::InteractionKind;
pub use interaction::InteractionRequest;
pub use interaction::InteractionResponse;
pub use interaction::InteractionStep;
pub use review::MAX_MCP_APP_BODY_BYTES;
pub use review::McpAppReadParams;
pub use review::McpAppReadResult;
pub use review::WorkspaceReviewParams;
pub use review::WorkspaceReviewResult;
pub use session::AgentModeInfo;
pub use session::MAX_RECENT_PROMPTS;
pub use session::MAX_SESSION_HISTORY_PAGE_MESSAGES;
pub use session::MAX_SESSION_LIST_LIMIT;
pub use session::MAX_SESSION_OUTPUT_PAGE_BYTES;
pub use session::PermissionMode;
pub use session::RESTORED_OUTPUT_TRUNCATION_SUFFIX;
pub use session::RecentPrompt;
pub use session::RecentPromptsParams;
pub use session::RecentPromptsResult;
pub use session::SessionCreateParams;
pub use session::SessionHistoryMessage;
pub use session::SessionHistoryPage;
pub use session::SessionHistoryParams;
pub use session::SessionIdParams;
pub use session::SessionListParams;
pub use session::SessionLoadResult;
pub use session::SessionOptionsSelectParams;
pub use session::SessionOptionsSnapshot;
pub use session::SessionOutputCursor;
pub use session::SessionOutputPage;
pub use session::SessionOutputReadParams;
pub use session::SessionSummary;
pub use session::ThemePreferenceSelectParams;
pub use turn::MAX_QUEUE_ENTRY_ID_LEN;
pub use turn::MAX_QUEUE_PREVIEW_CHARS;
pub use turn::MAX_QUEUE_STATUS_PREVIEWS;
pub use turn::SESSION_START_TURN_ID;
pub use turn::STARTUP_INTERACTION_PENDING_ERROR;
pub use turn::TurnAccepted;
pub use turn::TurnAttachment;
pub use turn::TurnCancelParams;
pub use turn::TurnQueueRemoveParams;
pub use turn::TurnQueueRemoveResult;
pub use turn::TurnQueueStatus;
pub use turn::TurnQueueTakeLatestParams;
pub use turn::TurnQueueTakeLatestResult;
pub use turn::TurnSubmitParams;
pub use turn::TurnUndoFile;
pub use turn::TurnUndoParams;
pub use turn::TurnUndoResult;
pub use turn::queue_preview_label;
pub use update::UpdateStatusSnapshot;
pub use webmcp::WebmcpBridgeStatus;
pub use webmcp::WebmcpPairParams;
pub use webmcp::WebmcpPairResult;

Modules§

composer
Native composer resource-discovery DTOs.
config
Configuration snapshots, settings catalog, and model picker DTOs.
frames
Length-delimited JSON-RPC frame transport.
handoff_url
vtcode:// handoff links: open the desktop app at a thread from the CLI.
interaction
Runtime interaction request/response DTOs.
interaction_registry
Track pending interaction identities and reject stale or duplicate replies.
live_events
Coalescing live-event channel from the service to desktop clients.
method
Known desktop JSON-RPC methods.
review
Workspace review snapshots and MCP app-resource preview DTOs.
secret
In-app API-key storage (config/secret/store) types.
session
Session lifecycle, history paging, and idle-session option DTOs.
slash_command
Shared slash-command grammar used by the CLI and desktop client.
storage
Storage accounting and cleanup DTOs for the desktop Storage settings.
turn
Turn submission, acceptance, cancellation, and queue DTOs.
update
Cached updater-status DTOs.
webmcp
WebMCP bridge status and pairing DTOs.

Structs§

ErrorResponse
A failed JSON-RPC response.
InitializeParams
Client initialization request.
InitializeResult
Successful initialization response.
Notification
A JSON-RPC notification received from or sent to the desktop client.
PrimaryAgentChanged
Ephemeral active primary-agent display state for one live session.
ProtocolRange
A client’s acceptable range for protocol negotiation.
ProtocolVersion
A comparable protocol version.
Request
A JSON-RPC request received from the desktop client.
Response
A successful JSON-RPC response.
RpcError
Standard JSON-RPC error body.
SlashCommandInfo
Display metadata for a slash command exposed by the CLI chat input.
ThreadEventNotification
Canonical runtime event notification.

Enums§

ProtocolError
Error raised by protocol framing, negotiation, or identity validation.
RequestId
JSON-RPC request id. null is intentionally not accepted for requests.

Constants§

DEFAULT_QUEUE_CAPACITY
Capacity used by host-owned event and command queues.
MAX_FRAME_BYTES
Largest permitted JSON-RPC line, excluding its line ending.
PROTOCOL_VERSION
Current protocol version supported by the desktop client and service.

Functions§

error_response
Build a JSON-RPC error response with a sanitized public message.
success_response
Build a JSON-RPC success response.