zed.proto

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