1syntax = "proto3";
2package zed.messages;
3
4import "ai.proto";
5import "app.proto";
6import "buffer.proto";
7import "call.proto";
8import "channel.proto";
9import "core.proto";
10import "debugger.proto";
11import "download.proto";
12import "git.proto";
13import "image.proto";
14import "lsp.proto";
15import "notification.proto";
16import "task.proto";
17import "toolchain.proto";
18import "worktree.proto";
19
20// Looking for a number? Search "// current max"
21
22message Envelope {
23 uint32 id = 1;
24 optional uint32 responding_to = 2;
25 optional PeerId original_sender_id = 3;
26 optional uint32 ack_id = 266;
27
28 oneof payload {
29 Hello hello = 4;
30 Ack ack = 5;
31 Error error = 6;
32 Ping ping = 7;
33 Test test = 8;
34 EndStream end_stream = 165;
35
36 CreateRoom create_room = 9;
37 CreateRoomResponse create_room_response = 10;
38 JoinRoom join_room = 11;
39 JoinRoomResponse join_room_response = 12;
40 RejoinRoom rejoin_room = 13;
41 RejoinRoomResponse rejoin_room_response = 14;
42 LeaveRoom leave_room = 15;
43 Call call = 16;
44 IncomingCall incoming_call = 17;
45 CallCanceled call_canceled = 18;
46 CancelCall cancel_call = 19;
47 DeclineCall decline_call = 20;
48 UpdateParticipantLocation update_participant_location = 21;
49 RoomUpdated room_updated = 22;
50
51 ShareProject share_project = 23;
52 ShareProjectResponse share_project_response = 24;
53 UnshareProject unshare_project = 25;
54 JoinProject join_project = 26;
55 JoinProjectResponse join_project_response = 27;
56 LeaveProject leave_project = 28;
57 AddProjectCollaborator add_project_collaborator = 29;
58 UpdateProjectCollaborator update_project_collaborator = 30;
59 RemoveProjectCollaborator remove_project_collaborator = 31;
60
61 GetDefinition get_definition = 32;
62 GetDefinitionResponse get_definition_response = 33;
63 GetDeclaration get_declaration = 237;
64 GetDeclarationResponse get_declaration_response = 238;
65 GetTypeDefinition get_type_definition = 34;
66 GetTypeDefinitionResponse get_type_definition_response = 35;
67
68 GetReferences get_references = 36;
69 GetReferencesResponse get_references_response = 37;
70 GetDocumentHighlights get_document_highlights = 38;
71 GetDocumentHighlightsResponse get_document_highlights_response = 39;
72 GetProjectSymbols get_project_symbols = 40;
73 GetProjectSymbolsResponse get_project_symbols_response = 41;
74 OpenBufferForSymbol open_buffer_for_symbol = 42;
75 OpenBufferForSymbolResponse open_buffer_for_symbol_response = 43;
76
77 UpdateProject update_project = 44;
78 UpdateWorktree update_worktree = 45;
79
80 CreateProjectEntry create_project_entry = 46;
81 RenameProjectEntry rename_project_entry = 47;
82 CopyProjectEntry copy_project_entry = 48;
83 DeleteProjectEntry delete_project_entry = 49;
84 ProjectEntryResponse project_entry_response = 50;
85 ExpandProjectEntry expand_project_entry = 51;
86 ExpandProjectEntryResponse expand_project_entry_response = 52;
87 ExpandAllForProjectEntry expand_all_for_project_entry = 291;
88 ExpandAllForProjectEntryResponse expand_all_for_project_entry_response = 292;
89 UpdateDiagnosticSummary update_diagnostic_summary = 53;
90 StartLanguageServer start_language_server = 54;
91 UpdateLanguageServer update_language_server = 55;
92
93 OpenBufferById open_buffer_by_id = 56;
94 OpenBufferByPath open_buffer_by_path = 57;
95 OpenBufferResponse open_buffer_response = 58;
96 CreateBufferForPeer create_buffer_for_peer = 59;
97 UpdateBuffer update_buffer = 60;
98 UpdateBufferFile update_buffer_file = 61;
99 SaveBuffer save_buffer = 62;
100 BufferSaved buffer_saved = 63;
101 BufferReloaded buffer_reloaded = 64;
102 ReloadBuffers reload_buffers = 65;
103 ReloadBuffersResponse reload_buffers_response = 66;
104 SynchronizeBuffers synchronize_buffers = 67;
105 SynchronizeBuffersResponse synchronize_buffers_response = 68;
106 FormatBuffers format_buffers = 69;
107 FormatBuffersResponse format_buffers_response = 70;
108 GetCompletions get_completions = 71;
109 GetCompletionsResponse get_completions_response = 72;
110 ResolveCompletionDocumentation resolve_completion_documentation = 73;
111 ResolveCompletionDocumentationResponse resolve_completion_documentation_response = 74;
112 ApplyCompletionAdditionalEdits apply_completion_additional_edits = 75;
113 ApplyCompletionAdditionalEditsResponse apply_completion_additional_edits_response = 76;
114 GetCodeActions get_code_actions = 77;
115 GetCodeActionsResponse get_code_actions_response = 78;
116 GetHover get_hover = 79;
117 GetHoverResponse get_hover_response = 80;
118 ApplyCodeAction apply_code_action = 81;
119 ApplyCodeActionResponse apply_code_action_response = 82;
120 PrepareRename prepare_rename = 83;
121 PrepareRenameResponse prepare_rename_response = 84;
122 PerformRename perform_rename = 85;
123 PerformRenameResponse perform_rename_response = 86;
124
125 UpdateContacts update_contacts = 89;
126 ShowContacts show_contacts = 91;
127
128 GetUsers get_users = 92;
129 FuzzySearchUsers fuzzy_search_users = 93;
130 UsersResponse users_response = 94;
131 RequestContact request_contact = 95;
132 RespondToContactRequest respond_to_contact_request = 96;
133 RemoveContact remove_contact = 97;
134
135 Follow follow = 98;
136 FollowResponse follow_response = 99;
137 UpdateFollowers update_followers = 100;
138 Unfollow unfollow = 101;
139 UpdateDiffBases update_diff_bases = 104;
140
141 OnTypeFormatting on_type_formatting = 105;
142 OnTypeFormattingResponse on_type_formatting_response = 106;
143
144 UpdateWorktreeSettings update_worktree_settings = 107;
145
146 InlayHints inlay_hints = 108;
147 InlayHintsResponse inlay_hints_response = 109;
148 ResolveInlayHint resolve_inlay_hint = 110;
149 ResolveInlayHintResponse resolve_inlay_hint_response = 111;
150 RefreshInlayHints refresh_inlay_hints = 112;
151
152 CreateChannel create_channel = 113;
153 CreateChannelResponse create_channel_response = 114;
154 InviteChannelMember invite_channel_member = 115;
155 RemoveChannelMember remove_channel_member = 116;
156 RespondToChannelInvite respond_to_channel_invite = 117;
157 UpdateChannels update_channels = 118;
158 JoinChannel join_channel = 119;
159 DeleteChannel delete_channel = 120;
160 GetChannelMembers get_channel_members = 121;
161 GetChannelMembersResponse get_channel_members_response = 122;
162 SetChannelMemberRole set_channel_member_role = 123;
163 RenameChannel rename_channel = 124;
164 RenameChannelResponse rename_channel_response = 125;
165 SubscribeToChannels subscribe_to_channels = 207;
166
167 JoinChannelBuffer join_channel_buffer = 126;
168 JoinChannelBufferResponse join_channel_buffer_response = 127;
169 UpdateChannelBuffer update_channel_buffer = 128;
170 LeaveChannelBuffer leave_channel_buffer = 129;
171 UpdateChannelBufferCollaborators update_channel_buffer_collaborators = 130;
172 RejoinChannelBuffers rejoin_channel_buffers = 131;
173 RejoinChannelBuffersResponse rejoin_channel_buffers_response = 132;
174 AckBufferOperation ack_buffer_operation = 133;
175
176 JoinChannelChat join_channel_chat = 134;
177 JoinChannelChatResponse join_channel_chat_response = 135;
178 LeaveChannelChat leave_channel_chat = 136;
179 SendChannelMessage send_channel_message = 137;
180 SendChannelMessageResponse send_channel_message_response = 138;
181 ChannelMessageSent channel_message_sent = 139;
182 GetChannelMessages get_channel_messages = 140;
183 GetChannelMessagesResponse get_channel_messages_response = 141;
184 RemoveChannelMessage remove_channel_message = 142;
185 AckChannelMessage ack_channel_message = 143;
186 GetChannelMessagesById get_channel_messages_by_id = 144;
187
188 MoveChannel move_channel = 147;
189 ReorderChannel reorder_channel = 349;
190 SetChannelVisibility set_channel_visibility = 148;
191
192 AddNotification add_notification = 149;
193 GetNotifications get_notifications = 150;
194 GetNotificationsResponse get_notifications_response = 151;
195 DeleteNotification delete_notification = 152;
196 MarkNotificationRead mark_notification_read = 153;
197 LspExtExpandMacro lsp_ext_expand_macro = 154;
198 LspExtExpandMacroResponse lsp_ext_expand_macro_response = 155;
199 SetRoomParticipantRole set_room_participant_role = 156;
200
201 UpdateUserChannels update_user_channels = 157;
202
203 GetImplementation get_implementation = 162;
204 GetImplementationResponse get_implementation_response = 163;
205
206 UpdateChannelMessage update_channel_message = 170;
207 ChannelMessageUpdate channel_message_update = 171;
208
209 BlameBuffer blame_buffer = 172;
210 BlameBufferResponse blame_buffer_response = 173;
211
212 UpdateNotification update_notification = 174;
213
214 RestartLanguageServers restart_language_servers = 208;
215
216 RejoinRemoteProjects rejoin_remote_projects = 186;
217 RejoinRemoteProjectsResponse rejoin_remote_projects_response = 187;
218
219 OpenNewBuffer open_new_buffer = 196;
220
221 TaskContextForLocation task_context_for_location = 203;
222 TaskContext task_context = 204;
223
224 LinkedEditingRange linked_editing_range = 209;
225 LinkedEditingRangeResponse linked_editing_range_response = 210;
226
227 AdvertiseContexts advertise_contexts = 211;
228 OpenContext open_context = 212;
229 OpenContextResponse open_context_response = 213;
230 CreateContext create_context = 232;
231 CreateContextResponse create_context_response = 233;
232 UpdateContext update_context = 214;
233 SynchronizeContexts synchronize_contexts = 215;
234 SynchronizeContextsResponse synchronize_contexts_response = 216;
235
236 GetSignatureHelp get_signature_help = 217;
237 GetSignatureHelpResponse get_signature_help_response = 218;
238
239 ListRemoteDirectory list_remote_directory = 219;
240 ListRemoteDirectoryResponse list_remote_directory_response = 220;
241 AddWorktree add_worktree = 222;
242 AddWorktreeResponse add_worktree_response = 223;
243
244 LspExtSwitchSourceHeader lsp_ext_switch_source_header = 241;
245 LspExtSwitchSourceHeaderResponse lsp_ext_switch_source_header_response = 242;
246
247 FindSearchCandidates find_search_candidates = 243;
248
249 CloseBuffer close_buffer = 245;
250
251 ShutdownRemoteServer shutdown_remote_server = 257;
252
253 RemoveWorktree remove_worktree = 258;
254
255 LanguageServerLog language_server_log = 260;
256
257 Toast toast = 261;
258 HideToast hide_toast = 262;
259
260 OpenServerSettings open_server_settings = 263;
261
262 GetPermalinkToLine get_permalink_to_line = 264;
263 GetPermalinkToLineResponse get_permalink_to_line_response = 265;
264
265 FlushBufferedMessages flush_buffered_messages = 267;
266
267 LanguageServerPromptRequest language_server_prompt_request = 268;
268 LanguageServerPromptResponse language_server_prompt_response = 269;
269
270 GitBranchesResponse git_branches_response = 271;
271
272 UpdateGitBranch update_git_branch = 272;
273
274 ListToolchains list_toolchains = 273;
275 ListToolchainsResponse list_toolchains_response = 274;
276 ActivateToolchain activate_toolchain = 275;
277 ActiveToolchain active_toolchain = 276;
278 ActiveToolchainResponse active_toolchain_response = 277;
279
280 GetPathMetadata get_path_metadata = 278;
281 GetPathMetadataResponse get_path_metadata_response = 279;
282
283 CancelLanguageServerWork cancel_language_server_work = 282;
284
285 LspExtOpenDocs lsp_ext_open_docs = 283;
286 LspExtOpenDocsResponse lsp_ext_open_docs_response = 284;
287
288 SyncExtensions sync_extensions = 285;
289 SyncExtensionsResponse sync_extensions_response = 286;
290 InstallExtension install_extension = 287;
291
292 OpenUnstagedDiff open_unstaged_diff = 288;
293 OpenUnstagedDiffResponse open_unstaged_diff_response = 289;
294
295 RegisterBufferWithLanguageServers register_buffer_with_language_servers = 290;
296
297 Stage stage = 293;
298 Unstage unstage = 294;
299 Commit commit = 295;
300 OpenCommitMessageBuffer open_commit_message_buffer = 296;
301
302 OpenUncommittedDiff open_uncommitted_diff = 297;
303 OpenUncommittedDiffResponse open_uncommitted_diff_response = 298;
304
305 SetIndexText set_index_text = 299;
306
307 GitShow git_show = 300;
308 GitReset git_reset = 301;
309 GitCommitDetails git_commit_details = 302;
310 GitCheckoutFiles git_checkout_files = 303;
311
312 Push push = 304;
313 Fetch fetch = 305;
314 GetRemotes get_remotes = 306;
315 GetRemotesResponse get_remotes_response = 307;
316 Pull pull = 308;
317
318 ApplyCodeActionKind apply_code_action_kind = 309;
319 ApplyCodeActionKindResponse apply_code_action_kind_response = 310;
320
321 RemoteMessageResponse remote_message_response = 311;
322
323 GitGetBranches git_get_branches = 312;
324 GitCreateBranch git_create_branch = 313;
325 GitChangeBranch git_change_branch = 314;
326
327 CheckForPushedCommits check_for_pushed_commits = 315;
328 CheckForPushedCommitsResponse check_for_pushed_commits_response = 316;
329
330 AskPassRequest ask_pass_request = 317;
331 AskPassResponse ask_pass_response = 318;
332
333 GitDiff git_diff = 319;
334 GitDiffResponse git_diff_response = 320;
335 GitInit git_init = 321;
336
337 CodeLens code_lens = 322;
338 GetCodeLens get_code_lens = 323;
339 GetCodeLensResponse get_code_lens_response = 324;
340 RefreshCodeLens refresh_code_lens = 325;
341
342 ToggleBreakpoint toggle_breakpoint = 326;
343 BreakpointsForFile breakpoints_for_file = 327;
344
345 UpdateRepository update_repository = 328;
346 RemoveRepository remove_repository = 329;
347
348 GetDocumentSymbols get_document_symbols = 330;
349 GetDocumentSymbolsResponse get_document_symbols_response = 331;
350
351 LoadCommitDiff load_commit_diff = 334;
352 LoadCommitDiffResponse load_commit_diff_response = 335;
353
354 StopLanguageServers stop_language_servers = 336;
355
356 LspExtRunnables lsp_ext_runnables = 337;
357 LspExtRunnablesResponse lsp_ext_runnables_response = 338;
358
359 GetDebugAdapterBinary get_debug_adapter_binary = 339;
360 DebugAdapterBinary debug_adapter_binary = 340;
361 RunDebugLocators run_debug_locators = 341;
362 DebugRequest debug_request = 342;
363
364 LspExtGoToParentModule lsp_ext_go_to_parent_module = 343;
365 LspExtGoToParentModuleResponse lsp_ext_go_to_parent_module_response = 344;
366 LspExtCancelFlycheck lsp_ext_cancel_flycheck = 345;
367 LspExtRunFlycheck lsp_ext_run_flycheck = 346;
368 LspExtClearFlycheck lsp_ext_clear_flycheck = 347;
369
370 LogToDebugConsole log_to_debug_console = 348;
371
372 GetDocumentDiagnostics get_document_diagnostics = 350;
373 GetDocumentDiagnosticsResponse get_document_diagnostics_response = 351;
374 PullWorkspaceDiagnostics pull_workspace_diagnostics = 352;
375
376 GetDocumentColor get_document_color = 353;
377 GetDocumentColorResponse get_document_color_response = 354;
378 GetColorPresentation get_color_presentation = 355;
379 GetColorPresentationResponse get_color_presentation_response = 356;
380
381 Stash stash = 357;
382 StashPop stash_pop = 358;
383
384 GetDefaultBranch get_default_branch = 359;
385 GetDefaultBranchResponse get_default_branch_response = 360;
386
387 GetCrashFiles get_crash_files = 361;
388 GetCrashFilesResponse get_crash_files_response = 362;
389
390 GitClone git_clone = 363;
391 GitCloneResponse git_clone_response = 364;
392
393 LspQuery lsp_query = 365;
394 LspQueryResponse lsp_query_response = 366;
395 ToggleLspLogs toggle_lsp_logs = 367;
396
397 UpdateUserSettings update_user_settings = 368;
398
399 GetProcesses get_processes = 369;
400 GetProcessesResponse get_processes_response = 370;
401
402 ResolveToolchain resolve_toolchain = 371;
403 ResolveToolchainResponse resolve_toolchain_response = 372;
404
405 GetAgentServerCommand get_agent_server_command = 373;
406 AgentServerCommand agent_server_command = 374;
407
408 ExternalAgentsUpdated external_agents_updated = 375;
409 ExternalAgentLoadingStatusUpdated external_agent_loading_status_updated = 376;
410 NewExternalAgentVersionAvailable new_external_agent_version_available = 377;
411
412 StashDrop stash_drop = 378;
413 StashApply stash_apply = 379;
414
415 GitRenameBranch git_rename_branch = 380;
416
417 RemoteStarted remote_started = 381;
418
419 GetDirectoryEnvironment get_directory_environment = 382;
420 DirectoryEnvironment directory_environment = 383;
421
422 GetTreeDiff get_tree_diff = 384;
423 GetTreeDiffResponse get_tree_diff_response = 385;
424
425 GetBlobContent get_blob_content = 386;
426 GetBlobContentResponse get_blob_content_response = 387;
427
428 GitWorktreesResponse git_worktrees_response = 388;
429 GitGetWorktrees git_get_worktrees = 389;
430 GitCreateWorktree git_create_worktree = 390;
431
432 OpenImageByPath open_image_by_path = 391;
433 OpenImageResponse open_image_response = 392;
434 CreateImageForPeer create_image_for_peer = 393;
435
436
437 GitFileHistory git_file_history = 397;
438 GitFileHistoryResponse git_file_history_response = 398;
439
440 RunGitHook run_git_hook = 399;
441
442 GitDeleteBranch git_delete_branch = 400;
443
444 ExternalExtensionAgentsUpdated external_extension_agents_updated = 401;
445
446 GitCreateRemote git_create_remote = 402;
447 GitRemoveRemote git_remove_remote = 403;
448
449 TrustWorktrees trust_worktrees = 404;
450 RestrictWorktrees restrict_worktrees = 405;
451
452 ShareAgentThread share_agent_thread = 406;
453 GetSharedAgentThread get_shared_agent_thread = 407;
454 GetSharedAgentThreadResponse get_shared_agent_thread_response = 408;
455
456 FindSearchCandidatesChunk find_search_candidates_chunk = 409;
457 FindSearchCandidatesCancelled find_search_candidates_cancelled = 410;
458 GetContextServerCommand get_context_server_command = 411;
459 ContextServerCommand context_server_command = 412;
460
461 AllocateWorktreeId allocate_worktree_id = 413;
462 AllocateWorktreeIdResponse allocate_worktree_id_response = 414;
463
464 DownloadFileByPath download_file_by_path = 415;
465 DownloadFileResponse download_file_response = 416;
466 CreateFileForPeer create_file_for_peer = 417;
467
468 SemanticTokens semantic_tokens = 418;
469 SemanticTokensResponse semantic_tokens_response = 419;
470 RefreshSemanticTokens refresh_semantic_tokens = 420;
471 GetFoldingRanges get_folding_ranges = 421;
472 GetFoldingRangesResponse get_folding_ranges_response = 422;
473
474 GetRemoteProfilingData get_remote_profiling_data = 423;
475 GetRemoteProfilingDataResponse get_remote_profiling_data_response = 424;
476
477 SpawnKernel spawn_kernel = 426;
478 SpawnKernelResponse spawn_kernel_response = 427;
479 KillKernel kill_kernel = 428; // current max
480 }
481
482 reserved 87 to 88;
483 reserved 90;
484 reserved 102 to 103;
485 reserved 158 to 161;
486 reserved 164;
487 reserved 166 to 169;
488 reserved 175 to 185;
489 reserved 188 to 195;
490 reserved 197;
491 reserved 198 to 202;
492 reserved 205 to 206;
493 reserved 221;
494 reserved 224 to 231;
495 reserved 234 to 236;
496 reserved 239 to 240;
497 reserved 244;
498 reserved 246 to 256;
499 reserved 259;
500 reserved 270;
501 reserved 280 to 281;
502 reserved 332 to 333;
503 reserved 394 to 396;
504}
505
506message Hello {
507 PeerId peer_id = 1;
508}
509
510message Ping {}
511
512message Ack {}
513
514message Error {
515 string message = 1;
516 ErrorCode code = 2;
517 repeated string tags = 3;
518}
519
520enum ErrorCode {
521 Internal = 0;
522 NoSuchChannel = 1;
523 Disconnected = 2;
524 SignedOut = 3;
525 UpgradeRequired = 4;
526 Forbidden = 5;
527 NeedsCla = 7;
528 NotARootChannel = 8;
529 BadPublicNesting = 9;
530 CircularNesting = 10;
531 WrongMoveTarget = 11;
532 UnsharedItem = 12;
533 NoSuchProject = 13;
534 DevServerProjectPathDoesNotExist = 16;
535 RemoteUpgradeRequired = 17;
536 RateLimitExceeded = 18;
537 CommitFailed = 19;
538 reserved 6;
539 reserved 14 to 15;
540}
541
542message EndStream {}
543
544message Test {
545 uint64 id = 1;
546}
547
548message FlushBufferedMessages {}
549
550message FlushBufferedMessagesResponse {}
551
552message RemoteStarted {}
553
554message SpawnKernel {
555 string kernel_name = 1;
556 string working_directory = 2;
557 uint64 project_id = 3;
558 string command = 4;
559 repeated string args = 5;
560}
561
562message SpawnKernelResponse {
563 string kernel_id = 1;
564 string connection_file = 2;
565}
566
567message KillKernel {
568 string kernel_id = 1;
569 uint64 project_id = 2;
570}