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