1syntax = "proto3";
2package zed.messages;
3
4message Envelope {
5 uint32 id = 1;
6 optional uint32 responding_to = 2;
7 optional uint32 original_sender_id = 3;
8 oneof payload {
9 Ack ack = 4;
10 Error error = 5;
11 Ping ping = 6;
12 Test test = 7;
13
14 RegisterProject register_project = 8;
15 RegisterProjectResponse register_project_response = 9;
16 UnregisterProject unregister_project = 10;
17 RequestJoinProject request_join_project = 11;
18 RespondToJoinProjectRequest respond_to_join_project_request = 12;
19 JoinProjectRequestCancelled join_project_request_cancelled = 13;
20 JoinProject join_project = 14;
21 JoinProjectResponse join_project_response = 15;
22 LeaveProject leave_project = 16;
23 AddProjectCollaborator add_project_collaborator = 17;
24 RemoveProjectCollaborator remove_project_collaborator = 18;
25 ProjectUnshared project_unshared = 19;
26
27 GetDefinition get_definition = 20;
28 GetDefinitionResponse get_definition_response = 21;
29 GetTypeDefinition get_type_definition = 22;
30 GetTypeDefinitionResponse get_type_definition_response = 23;
31 GetReferences get_references = 24;
32 GetReferencesResponse get_references_response = 25;
33 GetDocumentHighlights get_document_highlights = 26;
34 GetDocumentHighlightsResponse get_document_highlights_response = 27;
35 GetProjectSymbols get_project_symbols = 28;
36 GetProjectSymbolsResponse get_project_symbols_response = 29;
37 OpenBufferForSymbol open_buffer_for_symbol = 30;
38 OpenBufferForSymbolResponse open_buffer_for_symbol_response = 31;
39
40 UpdateProject update_project = 32;
41 RegisterProjectActivity register_project_activity = 33;
42 UpdateWorktree update_worktree = 34;
43 UpdateWorktreeExtensions update_worktree_extensions = 35;
44
45 CreateProjectEntry create_project_entry = 36;
46 RenameProjectEntry rename_project_entry = 37;
47 CopyProjectEntry copy_project_entry = 38;
48 DeleteProjectEntry delete_project_entry = 39;
49 ProjectEntryResponse project_entry_response = 40;
50
51 UpdateDiagnosticSummary update_diagnostic_summary = 41;
52 StartLanguageServer start_language_server = 42;
53 UpdateLanguageServer update_language_server = 43;
54
55 OpenBufferById open_buffer_by_id = 44;
56 OpenBufferByPath open_buffer_by_path = 45;
57 OpenBufferResponse open_buffer_response = 46;
58 CreateBufferForPeer create_buffer_for_peer = 47;
59 UpdateBuffer update_buffer = 48;
60 UpdateBufferFile update_buffer_file = 49;
61 SaveBuffer save_buffer = 50;
62 BufferSaved buffer_saved = 51;
63 BufferReloaded buffer_reloaded = 52;
64 ReloadBuffers reload_buffers = 53;
65 ReloadBuffersResponse reload_buffers_response = 54;
66 FormatBuffers format_buffers = 55;
67 FormatBuffersResponse format_buffers_response = 56;
68 GetCompletions get_completions = 57;
69 GetCompletionsResponse get_completions_response = 58;
70 ApplyCompletionAdditionalEdits apply_completion_additional_edits = 59;
71 ApplyCompletionAdditionalEditsResponse apply_completion_additional_edits_response = 60;
72 GetCodeActions get_code_actions = 61;
73 GetCodeActionsResponse get_code_actions_response = 62;
74 GetHover get_hover = 63;
75 GetHoverResponse get_hover_response = 64;
76 ApplyCodeAction apply_code_action = 65;
77 ApplyCodeActionResponse apply_code_action_response = 66;
78 PrepareRename prepare_rename = 67;
79 PrepareRenameResponse prepare_rename_response = 68;
80 PerformRename perform_rename = 69;
81 PerformRenameResponse perform_rename_response = 70;
82 SearchProject search_project = 71;
83 SearchProjectResponse search_project_response = 72;
84
85 GetChannels get_channels = 73;
86 GetChannelsResponse get_channels_response = 74;
87 JoinChannel join_channel = 75;
88 JoinChannelResponse join_channel_response = 76;
89 LeaveChannel leave_channel = 77;
90 SendChannelMessage send_channel_message = 78;
91 SendChannelMessageResponse send_channel_message_response = 79;
92 ChannelMessageSent channel_message_sent = 80;
93 GetChannelMessages get_channel_messages = 81;
94 GetChannelMessagesResponse get_channel_messages_response = 82;
95
96 UpdateContacts update_contacts = 83;
97 UpdateInviteInfo update_invite_info = 84;
98 ShowContacts show_contacts = 85;
99
100 GetUsers get_users = 86;
101 FuzzySearchUsers fuzzy_search_users = 87;
102 UsersResponse users_response = 88;
103 RequestContact request_contact = 89;
104 RespondToContactRequest respond_to_contact_request = 90;
105 RemoveContact remove_contact = 91;
106
107 Follow follow = 92;
108 FollowResponse follow_response = 93;
109 UpdateFollowers update_followers = 94;
110 Unfollow unfollow = 95;
111 }
112}
113
114// Messages
115
116message Ping {}
117
118message Ack {}
119
120message Error {
121 string message = 1;
122}
123
124message Test {
125 uint64 id = 1;
126}
127
128message RegisterProject {
129 bool online = 1;
130}
131
132message RegisterProjectResponse {
133 uint64 project_id = 1;
134}
135
136message UnregisterProject {
137 uint64 project_id = 1;
138}
139
140message UpdateProject {
141 uint64 project_id = 1;
142 repeated WorktreeMetadata worktrees = 2;
143 bool online = 3;
144}
145
146message RegisterProjectActivity {
147 uint64 project_id = 1;
148}
149
150message RequestJoinProject {
151 uint64 requester_id = 1;
152 uint64 project_id = 2;
153}
154
155message RespondToJoinProjectRequest {
156 uint64 requester_id = 1;
157 uint64 project_id = 2;
158 bool allow = 3;
159}
160
161message JoinProjectRequestCancelled {
162 uint64 requester_id = 1;
163 uint64 project_id = 2;
164}
165
166message JoinProject {
167 uint64 project_id = 1;
168}
169
170message JoinProjectResponse {
171 oneof variant {
172 Accept accept = 1;
173 Decline decline = 2;
174 }
175
176 message Accept {
177 uint32 replica_id = 1;
178 repeated WorktreeMetadata worktrees = 2;
179 repeated Collaborator collaborators = 3;
180 repeated LanguageServer language_servers = 4;
181 }
182
183 message Decline {
184 Reason reason = 1;
185
186 enum Reason {
187 Declined = 0;
188 Closed = 1;
189 WentOffline = 2;
190 }
191 }
192}
193
194message LeaveProject {
195 uint64 project_id = 1;
196}
197
198message UpdateWorktree {
199 uint64 project_id = 1;
200 uint64 worktree_id = 2;
201 string root_name = 3;
202 repeated Entry updated_entries = 4;
203 repeated uint64 removed_entries = 5;
204 uint64 scan_id = 6;
205 bool is_last_update = 7;
206}
207
208message UpdateWorktreeExtensions {
209 uint64 project_id = 1;
210 uint64 worktree_id = 2;
211 repeated string extensions = 3;
212 repeated uint32 counts = 4;
213}
214
215message CreateProjectEntry {
216 uint64 project_id = 1;
217 uint64 worktree_id = 2;
218 bytes path = 3;
219 bool is_directory = 4;
220}
221
222message RenameProjectEntry {
223 uint64 project_id = 1;
224 uint64 entry_id = 2;
225 bytes new_path = 3;
226}
227
228message CopyProjectEntry {
229 uint64 project_id = 1;
230 uint64 entry_id = 2;
231 bytes new_path = 3;
232}
233
234message DeleteProjectEntry {
235 uint64 project_id = 1;
236 uint64 entry_id = 2;
237}
238
239message ProjectEntryResponse {
240 Entry entry = 1;
241 uint64 worktree_scan_id = 2;
242}
243
244message AddProjectCollaborator {
245 uint64 project_id = 1;
246 Collaborator collaborator = 2;
247}
248
249message RemoveProjectCollaborator {
250 uint64 project_id = 1;
251 uint32 peer_id = 2;
252}
253
254message ProjectUnshared {
255 uint64 project_id = 1;
256}
257
258message GetDefinition {
259 uint64 project_id = 1;
260 uint64 buffer_id = 2;
261 Anchor position = 3;
262 repeated VectorClockEntry version = 4;
263 }
264
265message GetDefinitionResponse {
266 repeated LocationLink links = 1;
267}
268
269message GetTypeDefinition {
270 uint64 project_id = 1;
271 uint64 buffer_id = 2;
272 Anchor position = 3;
273 repeated VectorClockEntry version = 4;
274 }
275
276message GetTypeDefinitionResponse {
277 repeated LocationLink links = 1;
278}
279
280message GetReferences {
281 uint64 project_id = 1;
282 uint64 buffer_id = 2;
283 Anchor position = 3;
284 repeated VectorClockEntry version = 4;
285 }
286
287message GetReferencesResponse {
288 repeated Location locations = 1;
289}
290
291message GetDocumentHighlights {
292 uint64 project_id = 1;
293 uint64 buffer_id = 2;
294 Anchor position = 3;
295 repeated VectorClockEntry version = 4;
296 }
297
298message GetDocumentHighlightsResponse {
299 repeated DocumentHighlight highlights = 1;
300}
301
302message Location {
303 uint64 buffer_id = 1;
304 Anchor start = 2;
305 Anchor end = 3;
306}
307
308message LocationLink {
309 optional Location origin = 1;
310 Location target = 2;
311}
312
313message DocumentHighlight {
314 Kind kind = 1;
315 Anchor start = 2;
316 Anchor end = 3;
317
318 enum Kind {
319 Text = 0;
320 Read = 1;
321 Write = 2;
322 }
323}
324
325message GetProjectSymbols {
326 uint64 project_id = 1;
327 string query = 2;
328}
329
330message GetProjectSymbolsResponse {
331 repeated Symbol symbols = 4;
332}
333
334message Symbol {
335 uint64 source_worktree_id = 1;
336 uint64 worktree_id = 2;
337 string language_server_name = 3;
338 string name = 4;
339 int32 kind = 5;
340 string path = 6;
341 Point start = 7;
342 Point end = 8;
343 bytes signature = 9;
344}
345
346message OpenBufferForSymbol {
347 uint64 project_id = 1;
348 Symbol symbol = 2;
349}
350
351message OpenBufferForSymbolResponse {
352 uint64 buffer_id = 1;
353}
354
355message OpenBufferByPath {
356 uint64 project_id = 1;
357 uint64 worktree_id = 2;
358 string path = 3;
359}
360
361message OpenBufferById {
362 uint64 project_id = 1;
363 uint64 id = 2;
364}
365
366message OpenBufferResponse {
367 uint64 buffer_id = 1;
368}
369
370message CreateBufferForPeer {
371 uint64 project_id = 1;
372 uint32 peer_id = 2;
373 oneof variant {
374 BufferState state = 3;
375 BufferChunk chunk = 4;
376 }
377}
378
379message UpdateBuffer {
380 uint64 project_id = 1;
381 uint64 buffer_id = 2;
382 repeated Operation operations = 3;
383}
384
385message UpdateBufferFile {
386 uint64 project_id = 1;
387 uint64 buffer_id = 2;
388 File file = 3;
389}
390
391message SaveBuffer {
392 uint64 project_id = 1;
393 uint64 buffer_id = 2;
394 repeated VectorClockEntry version = 3;
395}
396
397message BufferSaved {
398 uint64 project_id = 1;
399 uint64 buffer_id = 2;
400 repeated VectorClockEntry version = 3;
401 Timestamp mtime = 4;
402 string fingerprint = 5;
403}
404
405message BufferReloaded {
406 uint64 project_id = 1;
407 uint64 buffer_id = 2;
408 repeated VectorClockEntry version = 3;
409 Timestamp mtime = 4;
410 string fingerprint = 5;
411 LineEnding line_ending = 6;
412}
413
414message ReloadBuffers {
415 uint64 project_id = 1;
416 repeated uint64 buffer_ids = 2;
417}
418
419message ReloadBuffersResponse {
420 ProjectTransaction transaction = 1;
421}
422
423enum FormatTrigger {
424 Save = 0;
425 Manual = 1;
426}
427
428message FormatBuffers {
429 uint64 project_id = 1;
430 FormatTrigger trigger = 2;
431 repeated uint64 buffer_ids = 3;
432}
433
434message FormatBuffersResponse {
435 ProjectTransaction transaction = 1;
436}
437
438message GetCompletions {
439 uint64 project_id = 1;
440 uint64 buffer_id = 2;
441 Anchor position = 3;
442 repeated VectorClockEntry version = 4;
443}
444
445message GetCompletionsResponse {
446 repeated Completion completions = 1;
447 repeated VectorClockEntry version = 2;
448}
449
450message ApplyCompletionAdditionalEdits {
451 uint64 project_id = 1;
452 uint64 buffer_id = 2;
453 Completion completion = 3;
454}
455
456message ApplyCompletionAdditionalEditsResponse {
457 Transaction transaction = 1;
458}
459
460message Completion {
461 Anchor old_start = 1;
462 Anchor old_end = 2;
463 string new_text = 3;
464 bytes lsp_completion = 4;
465}
466
467message GetCodeActions {
468 uint64 project_id = 1;
469 uint64 buffer_id = 2;
470 Anchor start = 3;
471 Anchor end = 4;
472 repeated VectorClockEntry version = 5;
473}
474
475message GetCodeActionsResponse {
476 repeated CodeAction actions = 1;
477 repeated VectorClockEntry version = 2;
478}
479
480message GetHover {
481 uint64 project_id = 1;
482 uint64 buffer_id = 2;
483 Anchor position = 3;
484 repeated VectorClockEntry version = 5;
485}
486
487message GetHoverResponse {
488 optional Anchor start = 1;
489 optional Anchor end = 2;
490 repeated HoverBlock contents = 3;
491}
492
493message HoverBlock {
494 string text = 1;
495 optional string language = 2;
496}
497
498message ApplyCodeAction {
499 uint64 project_id = 1;
500 uint64 buffer_id = 2;
501 CodeAction action = 3;
502}
503
504message ApplyCodeActionResponse {
505 ProjectTransaction transaction = 1;
506}
507
508message PrepareRename {
509 uint64 project_id = 1;
510 uint64 buffer_id = 2;
511 Anchor position = 3;
512 repeated VectorClockEntry version = 4;
513}
514
515message PrepareRenameResponse {
516 bool can_rename = 1;
517 Anchor start = 2;
518 Anchor end = 3;
519 repeated VectorClockEntry version = 4;
520}
521
522message PerformRename {
523 uint64 project_id = 1;
524 uint64 buffer_id = 2;
525 Anchor position = 3;
526 string new_name = 4;
527 repeated VectorClockEntry version = 5;
528}
529
530message PerformRenameResponse {
531 ProjectTransaction transaction = 2;
532}
533
534message SearchProject {
535 uint64 project_id = 1;
536 string query = 2;
537 bool regex = 3;
538 bool whole_word = 4;
539 bool case_sensitive = 5;
540}
541
542message SearchProjectResponse {
543 repeated Location locations = 1;
544}
545
546message CodeAction {
547 Anchor start = 1;
548 Anchor end = 2;
549 bytes lsp_action = 3;
550}
551
552message ProjectTransaction {
553 repeated uint64 buffer_ids = 1;
554 repeated Transaction transactions = 2;
555}
556
557message Transaction {
558 LocalTimestamp id = 1;
559 repeated LocalTimestamp edit_ids = 2;
560 repeated VectorClockEntry start = 3;
561}
562
563message LocalTimestamp {
564 uint32 replica_id = 1;
565 uint32 value = 2;
566}
567
568message LanguageServer {
569 uint64 id = 1;
570 string name = 2;
571}
572
573message StartLanguageServer {
574 uint64 project_id = 1;
575 LanguageServer server = 2;
576}
577
578message UpdateDiagnosticSummary {
579 uint64 project_id = 1;
580 uint64 worktree_id = 2;
581 DiagnosticSummary summary = 3;
582}
583
584message DiagnosticSummary {
585 string path = 1;
586 uint64 language_server_id = 2;
587 uint32 error_count = 3;
588 uint32 warning_count = 4;
589}
590
591message UpdateLanguageServer {
592 uint64 project_id = 1;
593 uint64 language_server_id = 2;
594 oneof variant {
595 LspWorkStart work_start = 3;
596 LspWorkProgress work_progress = 4;
597 LspWorkEnd work_end = 5;
598 LspDiskBasedDiagnosticsUpdating disk_based_diagnostics_updating = 6;
599 LspDiskBasedDiagnosticsUpdated disk_based_diagnostics_updated = 7;
600 }
601}
602
603message LspWorkStart {
604 string token = 1;
605 optional string message = 2;
606 optional uint32 percentage = 3;
607}
608
609message LspWorkProgress {
610 string token = 1;
611 optional string message = 2;
612 optional uint32 percentage = 3;
613}
614
615message LspWorkEnd {
616 string token = 1;
617}
618
619message LspDiskBasedDiagnosticsUpdating {}
620
621message LspDiskBasedDiagnosticsUpdated {}
622
623message GetChannels {}
624
625message GetChannelsResponse {
626 repeated Channel channels = 1;
627}
628
629message JoinChannel {
630 uint64 channel_id = 1;
631}
632
633message JoinChannelResponse {
634 repeated ChannelMessage messages = 1;
635 bool done = 2;
636}
637
638message LeaveChannel {
639 uint64 channel_id = 1;
640}
641
642message GetUsers {
643 repeated uint64 user_ids = 1;
644}
645
646message FuzzySearchUsers {
647 string query = 1;
648}
649
650message UsersResponse {
651 repeated User users = 1;
652}
653
654message RequestContact {
655 uint64 responder_id = 1;
656}
657
658message RemoveContact {
659 uint64 user_id = 1;
660}
661
662message RespondToContactRequest {
663 uint64 requester_id = 1;
664 ContactRequestResponse response = 2;
665}
666
667enum ContactRequestResponse {
668 Accept = 0;
669 Decline = 1;
670 Block = 2;
671 Dismiss = 3;
672}
673
674message SendChannelMessage {
675 uint64 channel_id = 1;
676 string body = 2;
677 Nonce nonce = 3;
678}
679
680message SendChannelMessageResponse {
681 ChannelMessage message = 1;
682}
683
684message ChannelMessageSent {
685 uint64 channel_id = 1;
686 ChannelMessage message = 2;
687}
688
689message GetChannelMessages {
690 uint64 channel_id = 1;
691 uint64 before_message_id = 2;
692}
693
694message GetChannelMessagesResponse {
695 repeated ChannelMessage messages = 1;
696 bool done = 2;
697}
698
699message UpdateContacts {
700 repeated Contact contacts = 1;
701 repeated uint64 remove_contacts = 2;
702 repeated IncomingContactRequest incoming_requests = 3;
703 repeated uint64 remove_incoming_requests = 4;
704 repeated uint64 outgoing_requests = 5;
705 repeated uint64 remove_outgoing_requests = 6;
706}
707
708message UpdateInviteInfo {
709 string url = 1;
710 uint32 count = 2;
711}
712
713message ShowContacts {}
714
715message IncomingContactRequest {
716 uint64 requester_id = 1;
717 bool should_notify = 2;
718}
719
720message UpdateDiagnostics {
721 uint32 replica_id = 1;
722 uint32 lamport_timestamp = 2;
723 repeated Diagnostic diagnostics = 3;
724}
725
726message Follow {
727 uint64 project_id = 1;
728 uint32 leader_id = 2;
729}
730
731message FollowResponse {
732 optional uint64 active_view_id = 1;
733 repeated View views = 2;
734}
735
736message UpdateFollowers {
737 uint64 project_id = 1;
738 repeated uint32 follower_ids = 2;
739 oneof variant {
740 UpdateActiveView update_active_view = 3;
741 View create_view = 4;
742 UpdateView update_view = 5;
743 }
744}
745
746message Unfollow {
747 uint64 project_id = 1;
748 uint32 leader_id = 2;
749}
750
751// Entities
752
753message UpdateActiveView {
754 optional uint64 id = 1;
755 optional uint32 leader_id = 2;
756}
757
758message UpdateView {
759 uint64 id = 1;
760 optional uint32 leader_id = 2;
761
762 oneof variant {
763 Editor editor = 3;
764 }
765
766 message Editor {
767 repeated Selection selections = 1;
768 Anchor scroll_top_anchor = 2;
769 float scroll_x = 3;
770 float scroll_y = 4;
771 }
772}
773
774message View {
775 uint64 id = 1;
776 optional uint32 leader_id = 2;
777
778 oneof variant {
779 Editor editor = 3;
780 }
781
782 message Editor {
783 uint64 buffer_id = 1;
784 repeated Selection selections = 2;
785 Anchor scroll_top_anchor = 3;
786 float scroll_x = 4;
787 float scroll_y = 5;
788 }
789}
790
791message Collaborator {
792 uint32 peer_id = 1;
793 uint32 replica_id = 2;
794 uint64 user_id = 3;
795}
796
797message User {
798 uint64 id = 1;
799 string github_login = 2;
800 string avatar_url = 3;
801}
802
803message File {
804 uint64 worktree_id = 1;
805 optional uint64 entry_id = 2;
806 string path = 3;
807 Timestamp mtime = 4;
808}
809
810message Entry {
811 uint64 id = 1;
812 bool is_dir = 2;
813 bytes path = 3;
814 uint64 inode = 4;
815 Timestamp mtime = 5;
816 bool is_symlink = 6;
817 bool is_ignored = 7;
818}
819
820message BufferState {
821 uint64 id = 1;
822 optional File file = 2;
823 string base_text = 3;
824 LineEnding line_ending = 4;
825}
826
827message BufferChunk {
828 uint64 buffer_id = 1;
829 repeated Operation operations = 2;
830 bool is_last = 3;
831}
832
833enum LineEnding {
834 Unix = 0;
835 Windows = 1;
836}
837
838message SelectionSet {
839 uint32 replica_id = 1;
840 repeated Selection selections = 2;
841 uint32 lamport_timestamp = 3;
842 bool line_mode = 4;
843}
844
845message Selection {
846 uint64 id = 1;
847 Anchor start = 2;
848 Anchor end = 3;
849 bool reversed = 4;
850}
851
852message Anchor {
853 uint32 replica_id = 1;
854 uint32 local_timestamp = 2;
855 uint64 offset = 3;
856 Bias bias = 4;
857 optional uint64 buffer_id = 5;
858}
859
860enum Bias {
861 Left = 0;
862 Right = 1;
863}
864
865message Diagnostic {
866 Anchor start = 1;
867 Anchor end = 2;
868 Severity severity = 3;
869 string message = 4;
870 optional string code = 5;
871 uint64 group_id = 6;
872 bool is_primary = 7;
873 bool is_valid = 8;
874 bool is_disk_based = 9;
875 bool is_unnecessary = 10;
876
877 enum Severity {
878 None = 0;
879 Error = 1;
880 Warning = 2;
881 Information = 3;
882 Hint = 4;
883 }
884}
885
886message Operation {
887 oneof variant {
888 Edit edit = 1;
889 Undo undo = 2;
890 UpdateSelections update_selections = 3;
891 UpdateDiagnostics update_diagnostics = 4;
892 UpdateCompletionTriggers update_completion_triggers = 5;
893 }
894
895 message Edit {
896 uint32 replica_id = 1;
897 uint32 local_timestamp = 2;
898 uint32 lamport_timestamp = 3;
899 repeated VectorClockEntry version = 4;
900 repeated Range ranges = 5;
901 repeated string new_text = 6;
902 }
903
904 message Undo {
905 uint32 replica_id = 1;
906 uint32 local_timestamp = 2;
907 uint32 lamport_timestamp = 3;
908 repeated VectorClockEntry version = 4;
909 repeated UndoCount counts = 5;
910 }
911
912 message UpdateSelections {
913 uint32 replica_id = 1;
914 uint32 lamport_timestamp = 2;
915 repeated Selection selections = 3;
916 bool line_mode = 4;
917 }
918
919 message UpdateCompletionTriggers {
920 uint32 replica_id = 1;
921 uint32 lamport_timestamp = 2;
922 repeated string triggers = 3;
923 }
924}
925
926message UndoMapEntry {
927 uint32 replica_id = 1;
928 uint32 local_timestamp = 2;
929 repeated UndoCount counts = 3;
930}
931
932message UndoCount {
933 uint32 replica_id = 1;
934 uint32 local_timestamp = 2;
935 uint32 count = 3;
936}
937
938message VectorClockEntry {
939 uint32 replica_id = 1;
940 uint32 timestamp = 2;
941}
942
943message Timestamp {
944 uint64 seconds = 1;
945 uint32 nanos = 2;
946}
947
948message Range {
949 uint64 start = 1;
950 uint64 end = 2;
951}
952
953message Point {
954 uint32 row = 1;
955 uint32 column = 2;
956}
957
958message Nonce {
959 uint64 upper_half = 1;
960 uint64 lower_half = 2;
961}
962
963message Channel {
964 uint64 id = 1;
965 string name = 2;
966}
967
968message ChannelMessage {
969 uint64 id = 1;
970 string body = 2;
971 uint64 timestamp = 3;
972 uint64 sender_id = 4;
973 Nonce nonce = 5;
974}
975
976message Contact {
977 uint64 user_id = 1;
978 repeated ProjectMetadata projects = 2;
979 bool online = 3;
980 bool should_notify = 4;
981}
982
983message ProjectMetadata {
984 uint64 id = 1;
985 repeated string visible_worktree_root_names = 3;
986 repeated uint64 guests = 4;
987}
988
989message WorktreeMetadata {
990 uint64 id = 1;
991 string root_name = 2;
992 bool visible = 3;
993}