2021-06-09 19:15:25 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package zed.messages;
|
|
|
|
|
2021-06-15 20:06:50 +00:00
|
|
|
message Envelope {
|
|
|
|
uint32 id = 1;
|
|
|
|
optional uint32 responding_to = 2;
|
2021-06-18 23:26:12 +00:00
|
|
|
optional uint32 original_sender_id = 3;
|
2021-06-15 20:06:50 +00:00
|
|
|
oneof payload {
|
2021-09-09 18:24:16 +00:00
|
|
|
Ack ack = 4;
|
|
|
|
Error error = 5;
|
|
|
|
Ping ping = 6;
|
2021-12-18 06:00:39 +00:00
|
|
|
|
|
|
|
RegisterProject register_project = 7;
|
|
|
|
RegisterProjectResponse register_project_response = 8;
|
|
|
|
UnregisterProject unregister_project = 9;
|
|
|
|
ShareProject share_project = 10;
|
|
|
|
UnshareProject unshare_project = 11;
|
|
|
|
JoinProject join_project = 12;
|
|
|
|
JoinProjectResponse join_project_response = 13;
|
|
|
|
LeaveProject leave_project = 14;
|
|
|
|
AddProjectCollaborator add_project_collaborator = 15;
|
|
|
|
RemoveProjectCollaborator remove_project_collaborator = 16;
|
2022-01-24 11:27:13 +00:00
|
|
|
GetDefinition get_definition = 17;
|
|
|
|
GetDefinitionResponse get_definition_response = 18;
|
|
|
|
|
|
|
|
RegisterWorktree register_worktree = 19;
|
|
|
|
UnregisterWorktree unregister_worktree = 20;
|
|
|
|
ShareWorktree share_worktree = 21;
|
|
|
|
UpdateWorktree update_worktree = 22;
|
|
|
|
UpdateDiagnosticSummary update_diagnostic_summary = 23;
|
|
|
|
DiskBasedDiagnosticsUpdating disk_based_diagnostics_updating = 24;
|
|
|
|
DiskBasedDiagnosticsUpdated disk_based_diagnostics_updated = 25;
|
|
|
|
|
|
|
|
OpenBuffer open_buffer = 26;
|
|
|
|
OpenBufferResponse open_buffer_response = 27;
|
|
|
|
CloseBuffer close_buffer = 28;
|
|
|
|
UpdateBuffer update_buffer = 29;
|
|
|
|
UpdateBufferFile update_buffer_file = 30;
|
|
|
|
SaveBuffer save_buffer = 31;
|
|
|
|
BufferSaved buffer_saved = 32;
|
|
|
|
BufferReloaded buffer_reloaded = 33;
|
2022-02-11 10:05:25 +00:00
|
|
|
FormatBuffers format_buffers = 34;
|
|
|
|
FormatBuffersResponse format_buffers_response = 35;
|
|
|
|
GetCompletions get_completions = 36;
|
|
|
|
GetCompletionsResponse get_completions_response = 37;
|
|
|
|
ApplyCompletionAdditionalEdits apply_completion_additional_edits = 38;
|
|
|
|
ApplyCompletionAdditionalEditsResponse apply_completion_additional_edits_response = 39;
|
|
|
|
GetCodeActions get_code_actions = 40;
|
|
|
|
GetCodeActionsResponse get_code_actions_response = 41;
|
|
|
|
ApplyCodeAction apply_code_action = 42;
|
|
|
|
ApplyCodeActionResponse apply_code_action_response = 43;
|
|
|
|
|
|
|
|
GetChannels get_channels = 44;
|
|
|
|
GetChannelsResponse get_channels_response = 45;
|
|
|
|
JoinChannel join_channel = 46;
|
|
|
|
JoinChannelResponse join_channel_response = 47;
|
|
|
|
LeaveChannel leave_channel = 48;
|
|
|
|
SendChannelMessage send_channel_message = 49;
|
|
|
|
SendChannelMessageResponse send_channel_message_response = 50;
|
|
|
|
ChannelMessageSent channel_message_sent = 51;
|
|
|
|
GetChannelMessages get_channel_messages = 52;
|
|
|
|
GetChannelMessagesResponse get_channel_messages_response = 53;
|
|
|
|
|
|
|
|
UpdateContacts update_contacts = 54;
|
|
|
|
|
|
|
|
GetUsers get_users = 55;
|
|
|
|
GetUsersResponse get_users_response = 56;
|
2021-06-09 19:15:25 +00:00
|
|
|
}
|
2021-06-15 20:06:50 +00:00
|
|
|
}
|
2021-06-09 19:15:25 +00:00
|
|
|
|
2021-08-06 02:05:58 +00:00
|
|
|
// Messages
|
|
|
|
|
2021-09-09 18:24:16 +00:00
|
|
|
message Ping {}
|
2021-08-19 03:59:13 +00:00
|
|
|
|
2021-09-09 18:24:16 +00:00
|
|
|
message Ack {}
|
2021-08-19 03:59:13 +00:00
|
|
|
|
2021-08-27 23:53:23 +00:00
|
|
|
message Error {
|
|
|
|
string message = 1;
|
|
|
|
}
|
|
|
|
|
2021-12-18 06:00:39 +00:00
|
|
|
message RegisterProject {}
|
|
|
|
|
|
|
|
message RegisterProjectResponse {
|
|
|
|
uint64 project_id = 1;
|
2021-09-17 01:39:29 +00:00
|
|
|
}
|
|
|
|
|
2021-12-18 06:00:39 +00:00
|
|
|
message UnregisterProject {
|
|
|
|
uint64 project_id = 1;
|
2021-09-17 01:39:29 +00:00
|
|
|
}
|
|
|
|
|
2021-12-18 06:00:39 +00:00
|
|
|
message ShareProject {
|
|
|
|
uint64 project_id = 1;
|
2021-06-15 20:06:50 +00:00
|
|
|
}
|
2021-06-10 01:14:30 +00:00
|
|
|
|
2021-12-18 06:00:39 +00:00
|
|
|
message UnshareProject {
|
|
|
|
uint64 project_id = 1;
|
|
|
|
}
|
2021-09-17 01:39:29 +00:00
|
|
|
|
2021-12-18 06:00:39 +00:00
|
|
|
message JoinProject {
|
|
|
|
uint64 project_id = 1;
|
2021-06-15 20:06:50 +00:00
|
|
|
}
|
2021-06-10 01:14:30 +00:00
|
|
|
|
2021-12-18 06:00:39 +00:00
|
|
|
message JoinProjectResponse {
|
2022-01-23 05:19:04 +00:00
|
|
|
uint32 replica_id = 1;
|
|
|
|
repeated Worktree worktrees = 2;
|
|
|
|
repeated Collaborator collaborators = 3;
|
2021-06-15 20:06:50 +00:00
|
|
|
}
|
2021-06-15 08:42:06 +00:00
|
|
|
|
2021-12-18 06:00:39 +00:00
|
|
|
message LeaveProject {
|
|
|
|
uint64 project_id = 1;
|
2021-09-21 01:05:46 +00:00
|
|
|
}
|
|
|
|
|
2021-12-18 06:00:39 +00:00
|
|
|
message RegisterWorktree {
|
|
|
|
uint64 project_id = 1;
|
2021-12-21 00:30:29 +00:00
|
|
|
uint64 worktree_id = 2;
|
|
|
|
string root_name = 3;
|
|
|
|
repeated string authorized_logins = 4;
|
2021-06-09 19:15:25 +00:00
|
|
|
}
|
|
|
|
|
2021-12-18 06:00:39 +00:00
|
|
|
message UnregisterWorktree {
|
|
|
|
uint64 project_id = 1;
|
|
|
|
uint64 worktree_id = 2;
|
2021-07-05 15:20:26 +00:00
|
|
|
}
|
|
|
|
|
2021-12-18 06:00:39 +00:00
|
|
|
message ShareWorktree {
|
|
|
|
uint64 project_id = 1;
|
|
|
|
Worktree worktree = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UpdateWorktree {
|
|
|
|
uint64 project_id = 1;
|
|
|
|
uint64 worktree_id = 2;
|
2021-12-20 19:36:59 +00:00
|
|
|
string root_name = 3;
|
|
|
|
repeated Entry updated_entries = 4;
|
|
|
|
repeated uint64 removed_entries = 5;
|
2021-06-30 14:59:02 +00:00
|
|
|
}
|
|
|
|
|
2021-12-18 06:00:39 +00:00
|
|
|
message AddProjectCollaborator {
|
|
|
|
uint64 project_id = 1;
|
2021-11-27 03:35:50 +00:00
|
|
|
Collaborator collaborator = 2;
|
2021-06-18 23:26:12 +00:00
|
|
|
}
|
|
|
|
|
2021-12-18 06:00:39 +00:00
|
|
|
message RemoveProjectCollaborator {
|
|
|
|
uint64 project_id = 1;
|
2021-06-28 13:35:36 +00:00
|
|
|
uint32 peer_id = 2;
|
2021-06-18 23:26:12 +00:00
|
|
|
}
|
|
|
|
|
2022-01-24 11:27:13 +00:00
|
|
|
message GetDefinition {
|
|
|
|
uint64 project_id = 1;
|
|
|
|
uint64 buffer_id = 2;
|
|
|
|
Anchor position = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetDefinitionResponse {
|
|
|
|
repeated Definition definitions = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Definition {
|
2022-01-24 17:47:41 +00:00
|
|
|
Buffer buffer = 1;
|
|
|
|
Anchor target_start = 2;
|
|
|
|
Anchor target_end = 3;
|
2022-01-24 11:27:13 +00:00
|
|
|
}
|
|
|
|
|
2021-06-23 14:20:02 +00:00
|
|
|
message OpenBuffer {
|
2021-12-18 06:00:39 +00:00
|
|
|
uint64 project_id = 1;
|
|
|
|
uint64 worktree_id = 2;
|
|
|
|
string path = 3;
|
2021-06-18 17:28:39 +00:00
|
|
|
}
|
|
|
|
|
2021-06-23 14:20:02 +00:00
|
|
|
message OpenBufferResponse {
|
2021-06-25 17:20:53 +00:00
|
|
|
Buffer buffer = 1;
|
2021-06-15 20:06:50 +00:00
|
|
|
}
|
2021-06-09 19:15:25 +00:00
|
|
|
|
2021-06-23 14:20:02 +00:00
|
|
|
message CloseBuffer {
|
2021-12-18 06:00:39 +00:00
|
|
|
uint64 project_id = 1;
|
2022-01-22 00:23:39 +00:00
|
|
|
uint64 buffer_id = 2;
|
2021-06-15 20:06:50 +00:00
|
|
|
}
|
2021-06-10 01:14:30 +00:00
|
|
|
|
2021-06-25 23:26:35 +00:00
|
|
|
message UpdateBuffer {
|
2021-12-18 06:00:39 +00:00
|
|
|
uint64 project_id = 1;
|
2022-01-22 00:23:39 +00:00
|
|
|
uint64 buffer_id = 2;
|
2022-01-23 05:19:04 +00:00
|
|
|
repeated Operation operations = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UpdateBufferFile {
|
|
|
|
uint64 project_id = 1;
|
|
|
|
uint64 buffer_id = 2;
|
|
|
|
File file = 3;
|
2021-06-25 20:46:36 +00:00
|
|
|
}
|
|
|
|
|
2021-07-02 15:02:17 +00:00
|
|
|
message SaveBuffer {
|
2021-12-18 06:00:39 +00:00
|
|
|
uint64 project_id = 1;
|
2022-01-22 00:23:39 +00:00
|
|
|
uint64 buffer_id = 2;
|
2021-07-02 15:02:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message BufferSaved {
|
2021-12-18 06:00:39 +00:00
|
|
|
uint64 project_id = 1;
|
2022-01-22 00:23:39 +00:00
|
|
|
uint64 buffer_id = 2;
|
|
|
|
repeated VectorClockEntry version = 3;
|
|
|
|
Timestamp mtime = 4;
|
2021-07-02 15:02:17 +00:00
|
|
|
}
|
|
|
|
|
2022-01-24 09:17:36 +00:00
|
|
|
message BufferReloaded {
|
|
|
|
uint64 project_id = 1;
|
|
|
|
uint64 buffer_id = 2;
|
|
|
|
repeated VectorClockEntry version = 3;
|
|
|
|
Timestamp mtime = 4;
|
|
|
|
}
|
|
|
|
|
2022-02-11 10:05:25 +00:00
|
|
|
message FormatBuffers {
|
2022-01-12 17:01:20 +00:00
|
|
|
uint64 project_id = 1;
|
2022-02-11 10:05:25 +00:00
|
|
|
repeated uint64 buffer_ids = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message FormatBuffersResponse {
|
|
|
|
ProjectTransaction transaction = 1;
|
2022-01-12 17:01:20 +00:00
|
|
|
}
|
|
|
|
|
2022-02-02 11:22:47 +00:00
|
|
|
message GetCompletions {
|
|
|
|
uint64 project_id = 1;
|
|
|
|
uint64 buffer_id = 2;
|
|
|
|
Anchor position = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetCompletionsResponse {
|
|
|
|
repeated Completion completions = 1;
|
|
|
|
}
|
|
|
|
|
2022-02-02 15:22:38 +00:00
|
|
|
message ApplyCompletionAdditionalEdits {
|
|
|
|
uint64 project_id = 1;
|
|
|
|
uint64 buffer_id = 2;
|
|
|
|
Completion completion = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ApplyCompletionAdditionalEditsResponse {
|
2022-02-08 18:46:12 +00:00
|
|
|
Transaction transaction = 1;
|
2022-02-02 15:22:38 +00:00
|
|
|
}
|
|
|
|
|
2022-02-02 11:22:47 +00:00
|
|
|
message Completion {
|
|
|
|
Anchor old_start = 1;
|
|
|
|
Anchor old_end = 2;
|
|
|
|
string new_text = 3;
|
|
|
|
bytes lsp_completion = 4;
|
|
|
|
}
|
|
|
|
|
2022-02-08 11:18:14 +00:00
|
|
|
message GetCodeActions {
|
|
|
|
uint64 project_id = 1;
|
|
|
|
uint64 buffer_id = 2;
|
|
|
|
Anchor position = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetCodeActionsResponse {
|
|
|
|
repeated CodeAction actions = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ApplyCodeAction {
|
|
|
|
uint64 project_id = 1;
|
|
|
|
uint64 buffer_id = 2;
|
|
|
|
CodeAction action = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ApplyCodeActionResponse {
|
2022-02-08 18:46:12 +00:00
|
|
|
ProjectTransaction transaction = 1;
|
2022-02-08 11:18:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message CodeAction {
|
|
|
|
Anchor position = 1;
|
|
|
|
bytes lsp_action = 2;
|
|
|
|
}
|
|
|
|
|
2022-02-08 18:46:12 +00:00
|
|
|
message ProjectTransaction {
|
|
|
|
repeated Buffer buffers = 1;
|
|
|
|
repeated Transaction transactions = 2;
|
2022-02-08 11:18:14 +00:00
|
|
|
}
|
|
|
|
|
2022-02-08 18:46:12 +00:00
|
|
|
message Transaction {
|
|
|
|
LocalTimestamp id = 1;
|
|
|
|
repeated LocalTimestamp edit_ids = 2;
|
|
|
|
repeated VectorClockEntry start = 3;
|
|
|
|
repeated VectorClockEntry end = 4;
|
|
|
|
repeated Range ranges = 5;
|
2022-02-08 11:18:14 +00:00
|
|
|
}
|
|
|
|
|
2022-02-08 18:46:12 +00:00
|
|
|
message LocalTimestamp {
|
2022-02-08 11:18:14 +00:00
|
|
|
uint32 replica_id = 1;
|
2022-02-08 18:46:12 +00:00
|
|
|
uint32 value = 2;
|
2022-02-08 11:18:14 +00:00
|
|
|
}
|
|
|
|
|
2021-12-13 19:15:03 +00:00
|
|
|
message UpdateDiagnosticSummary {
|
2021-12-18 06:00:39 +00:00
|
|
|
uint64 project_id = 1;
|
|
|
|
uint64 worktree_id = 2;
|
2022-01-06 19:11:06 +00:00
|
|
|
DiagnosticSummary summary = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DiagnosticSummary {
|
2022-01-23 05:19:04 +00:00
|
|
|
string path = 1;
|
|
|
|
uint32 error_count = 2;
|
|
|
|
uint32 warning_count = 3;
|
|
|
|
uint32 info_count = 4;
|
|
|
|
uint32 hint_count = 5;
|
2022-01-04 22:29:22 +00:00
|
|
|
}
|
|
|
|
|
2022-01-07 14:03:19 +00:00
|
|
|
message DiskBasedDiagnosticsUpdating {
|
|
|
|
uint64 project_id = 1;
|
|
|
|
}
|
|
|
|
|
2022-01-04 22:29:22 +00:00
|
|
|
message DiskBasedDiagnosticsUpdated {
|
|
|
|
uint64 project_id = 1;
|
2021-12-13 19:15:03 +00:00
|
|
|
}
|
|
|
|
|
2021-08-06 02:05:58 +00:00
|
|
|
message GetChannels {}
|
|
|
|
|
|
|
|
message GetChannelsResponse {
|
|
|
|
repeated Channel channels = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message JoinChannel {
|
|
|
|
uint64 channel_id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message JoinChannelResponse {
|
|
|
|
repeated ChannelMessage messages = 1;
|
2021-08-27 21:58:28 +00:00
|
|
|
bool done = 2;
|
2021-08-06 02:05:58 +00:00
|
|
|
}
|
|
|
|
|
2021-08-19 21:25:20 +00:00
|
|
|
message LeaveChannel {
|
|
|
|
uint64 channel_id = 1;
|
|
|
|
}
|
|
|
|
|
2021-08-06 02:05:58 +00:00
|
|
|
message GetUsers {
|
|
|
|
repeated uint64 user_ids = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetUsersResponse {
|
|
|
|
repeated User users = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SendChannelMessage {
|
|
|
|
uint64 channel_id = 1;
|
|
|
|
string body = 2;
|
2021-09-16 14:23:20 +00:00
|
|
|
Nonce nonce = 3;
|
2021-08-06 02:05:58 +00:00
|
|
|
}
|
|
|
|
|
2021-08-20 01:04:49 +00:00
|
|
|
message SendChannelMessageResponse {
|
2021-09-02 16:31:24 +00:00
|
|
|
ChannelMessage message = 1;
|
2021-08-20 01:04:49 +00:00
|
|
|
}
|
|
|
|
|
2021-08-06 02:05:58 +00:00
|
|
|
message ChannelMessageSent {
|
|
|
|
uint64 channel_id = 1;
|
|
|
|
ChannelMessage message = 2;
|
|
|
|
}
|
|
|
|
|
2021-08-27 21:58:28 +00:00
|
|
|
message GetChannelMessages {
|
|
|
|
uint64 channel_id = 1;
|
|
|
|
uint64 before_message_id = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetChannelMessagesResponse {
|
|
|
|
repeated ChannelMessage messages = 1;
|
|
|
|
bool done = 2;
|
|
|
|
}
|
|
|
|
|
2021-11-26 17:59:41 +00:00
|
|
|
message UpdateContacts {
|
|
|
|
repeated Contact contacts = 1;
|
2021-09-17 12:36:50 +00:00
|
|
|
}
|
|
|
|
|
2021-08-06 02:05:58 +00:00
|
|
|
// Entities
|
|
|
|
|
2021-11-27 03:35:50 +00:00
|
|
|
message Collaborator {
|
2021-08-06 02:05:58 +00:00
|
|
|
uint32 peer_id = 1;
|
|
|
|
uint32 replica_id = 2;
|
2021-11-26 17:22:34 +00:00
|
|
|
uint64 user_id = 3;
|
2021-08-06 02:05:58 +00:00
|
|
|
}
|
|
|
|
|
2021-06-18 23:26:12 +00:00
|
|
|
message User {
|
2021-06-25 17:20:53 +00:00
|
|
|
uint64 id = 1;
|
|
|
|
string github_login = 2;
|
|
|
|
string avatar_url = 3;
|
2021-06-18 23:26:12 +00:00
|
|
|
}
|
|
|
|
|
2021-06-15 20:06:50 +00:00
|
|
|
message Worktree {
|
2021-09-17 01:39:29 +00:00
|
|
|
uint64 id = 1;
|
|
|
|
string root_name = 2;
|
|
|
|
repeated Entry entries = 3;
|
2022-01-06 19:11:06 +00:00
|
|
|
repeated DiagnosticSummary diagnostic_summaries = 4;
|
2022-01-21 12:37:52 +00:00
|
|
|
bool weak = 5;
|
2021-06-18 12:52:38 +00:00
|
|
|
}
|
|
|
|
|
2022-01-22 21:29:36 +00:00
|
|
|
message File {
|
|
|
|
uint64 worktree_id = 1;
|
2022-01-23 05:19:04 +00:00
|
|
|
optional uint64 entry_id = 2;
|
2022-01-22 21:29:36 +00:00
|
|
|
string path = 3;
|
|
|
|
Timestamp mtime = 4;
|
|
|
|
}
|
|
|
|
|
2021-06-18 12:52:38 +00:00
|
|
|
message Entry {
|
2021-06-28 17:41:33 +00:00
|
|
|
uint64 id = 1;
|
|
|
|
bool is_dir = 2;
|
|
|
|
string path = 3;
|
|
|
|
uint64 inode = 4;
|
|
|
|
Timestamp mtime = 5;
|
|
|
|
bool is_symlink = 6;
|
|
|
|
bool is_ignored = 7;
|
2021-06-15 20:06:50 +00:00
|
|
|
}
|
2021-06-10 01:14:30 +00:00
|
|
|
|
2021-06-15 20:06:50 +00:00
|
|
|
message Buffer {
|
2022-01-24 17:47:41 +00:00
|
|
|
oneof variant {
|
|
|
|
uint64 id = 1;
|
|
|
|
BufferState state = 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message BufferState {
|
2021-06-25 17:20:53 +00:00
|
|
|
uint64 id = 1;
|
2022-01-23 05:19:04 +00:00
|
|
|
optional File file = 2;
|
2022-02-08 13:50:47 +00:00
|
|
|
string base_text = 3;
|
|
|
|
repeated Operation operations = 4;
|
|
|
|
repeated SelectionSet selections = 5;
|
|
|
|
repeated Diagnostic diagnostics = 6;
|
|
|
|
repeated string completion_triggers = 7;
|
2022-01-05 02:06:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message BufferFragment {
|
|
|
|
uint32 replica_id = 1;
|
|
|
|
uint32 local_timestamp = 2;
|
|
|
|
uint32 lamport_timestamp = 3;
|
|
|
|
uint32 insertion_offset = 4;
|
|
|
|
uint32 len = 5;
|
2022-01-23 05:19:04 +00:00
|
|
|
bool visible = 6;
|
2022-01-05 02:06:16 +00:00
|
|
|
repeated VectorClockEntry deletions = 7;
|
|
|
|
repeated VectorClockEntry max_undos = 8;
|
2021-07-02 09:29:36 +00:00
|
|
|
}
|
|
|
|
|
2021-10-22 18:35:29 +00:00
|
|
|
message SelectionSet {
|
2021-07-02 09:29:36 +00:00
|
|
|
uint32 replica_id = 1;
|
2021-12-13 10:38:38 +00:00
|
|
|
repeated Selection selections = 2;
|
2022-01-05 14:43:26 +00:00
|
|
|
uint32 lamport_timestamp = 3;
|
2021-06-25 23:26:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message Selection {
|
|
|
|
uint64 id = 1;
|
2021-12-09 15:38:46 +00:00
|
|
|
Anchor start = 2;
|
|
|
|
Anchor end = 3;
|
2021-06-25 23:26:35 +00:00
|
|
|
bool reversed = 4;
|
|
|
|
}
|
|
|
|
|
2021-12-09 15:38:46 +00:00
|
|
|
message Anchor {
|
|
|
|
uint32 replica_id = 1;
|
|
|
|
uint32 local_timestamp = 2;
|
|
|
|
uint64 offset = 3;
|
|
|
|
Bias bias = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum Bias {
|
|
|
|
Left = 0;
|
|
|
|
Right = 1;
|
|
|
|
}
|
|
|
|
|
2022-01-04 15:11:29 +00:00
|
|
|
message UpdateDiagnostics {
|
2021-12-09 15:38:46 +00:00
|
|
|
uint32 replica_id = 1;
|
|
|
|
uint32 lamport_timestamp = 2;
|
2022-01-04 15:11:29 +00:00
|
|
|
repeated Diagnostic diagnostics = 3;
|
2021-11-01 22:28:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message Diagnostic {
|
2021-12-09 15:38:46 +00:00
|
|
|
Anchor start = 1;
|
|
|
|
Anchor end = 2;
|
2021-11-01 22:28:37 +00:00
|
|
|
Severity severity = 3;
|
|
|
|
string message = 4;
|
2021-12-22 20:52:41 +00:00
|
|
|
optional string code = 5;
|
2021-12-23 15:47:54 +00:00
|
|
|
uint64 group_id = 6;
|
|
|
|
bool is_primary = 7;
|
|
|
|
bool is_valid = 8;
|
|
|
|
bool is_disk_based = 9;
|
2021-12-22 20:52:41 +00:00
|
|
|
|
2021-11-01 22:28:37 +00:00
|
|
|
enum Severity {
|
|
|
|
None = 0;
|
|
|
|
Error = 1;
|
|
|
|
Warning = 2;
|
|
|
|
Information = 3;
|
|
|
|
Hint = 4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-15 20:06:50 +00:00
|
|
|
message Operation {
|
|
|
|
oneof variant {
|
|
|
|
Edit edit = 1;
|
2021-06-25 20:46:36 +00:00
|
|
|
Undo undo = 2;
|
2021-06-25 23:26:35 +00:00
|
|
|
UpdateSelections update_selections = 3;
|
2022-01-05 18:53:18 +00:00
|
|
|
UpdateDiagnostics update_diagnostics = 4;
|
2022-02-02 13:07:41 +00:00
|
|
|
UpdateCompletionTriggers update_completion_triggers = 5;
|
2021-06-09 19:15:25 +00:00
|
|
|
}
|
|
|
|
|
2021-06-15 20:06:50 +00:00
|
|
|
message Edit {
|
|
|
|
uint32 replica_id = 1;
|
|
|
|
uint32 local_timestamp = 2;
|
|
|
|
uint32 lamport_timestamp = 3;
|
|
|
|
repeated VectorClockEntry version = 4;
|
2021-06-23 14:20:02 +00:00
|
|
|
repeated Range ranges = 5;
|
|
|
|
optional string new_text = 6;
|
2021-06-09 19:15:25 +00:00
|
|
|
}
|
2021-06-25 20:46:36 +00:00
|
|
|
|
|
|
|
message Undo {
|
|
|
|
uint32 replica_id = 1;
|
|
|
|
uint32 local_timestamp = 2;
|
|
|
|
uint32 lamport_timestamp = 3;
|
2021-06-29 08:25:42 +00:00
|
|
|
repeated Range ranges = 4;
|
|
|
|
repeated VectorClockEntry version = 5;
|
|
|
|
repeated UndoCount counts = 6;
|
|
|
|
}
|
|
|
|
|
2021-06-25 23:26:35 +00:00
|
|
|
message UpdateSelections {
|
|
|
|
uint32 replica_id = 1;
|
2022-01-23 05:19:04 +00:00
|
|
|
uint32 lamport_timestamp = 2;
|
|
|
|
repeated Selection selections = 3;
|
2021-10-22 18:35:29 +00:00
|
|
|
}
|
2022-02-02 13:07:41 +00:00
|
|
|
|
|
|
|
message UpdateCompletionTriggers {
|
2022-02-08 13:50:47 +00:00
|
|
|
uint32 replica_id = 1;
|
|
|
|
uint32 lamport_timestamp = 2;
|
|
|
|
repeated string triggers = 3;
|
2022-02-02 13:07:41 +00:00
|
|
|
}
|
2021-06-23 14:20:02 +00:00
|
|
|
}
|
2021-10-22 18:35:29 +00:00
|
|
|
|
2022-01-05 02:06:16 +00:00
|
|
|
message UndoMapEntry {
|
|
|
|
uint32 replica_id = 1;
|
|
|
|
uint32 local_timestamp = 2;
|
|
|
|
repeated UndoCount counts = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UndoCount {
|
|
|
|
uint32 replica_id = 1;
|
|
|
|
uint32 local_timestamp = 2;
|
|
|
|
uint32 count = 3;
|
2021-06-23 14:20:02 +00:00
|
|
|
}
|
2021-06-15 08:42:06 +00:00
|
|
|
|
2021-06-23 14:20:02 +00:00
|
|
|
message VectorClockEntry {
|
|
|
|
uint32 replica_id = 1;
|
|
|
|
uint32 timestamp = 2;
|
2021-06-15 08:42:06 +00:00
|
|
|
}
|
2021-06-22 00:07:56 +00:00
|
|
|
|
|
|
|
message Timestamp {
|
|
|
|
uint64 seconds = 1;
|
|
|
|
uint32 nanos = 2;
|
2021-06-23 14:20:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message Range {
|
|
|
|
uint64 start = 1;
|
|
|
|
uint64 end = 2;
|
|
|
|
}
|
2021-08-06 02:05:58 +00:00
|
|
|
|
2021-09-16 14:23:20 +00:00
|
|
|
message Nonce {
|
|
|
|
uint64 upper_half = 1;
|
|
|
|
uint64 lower_half = 2;
|
|
|
|
}
|
|
|
|
|
2021-08-06 02:05:58 +00:00
|
|
|
message Channel {
|
|
|
|
uint64 id = 1;
|
|
|
|
string name = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ChannelMessage {
|
|
|
|
uint64 id = 1;
|
|
|
|
string body = 2;
|
|
|
|
uint64 timestamp = 3;
|
|
|
|
uint64 sender_id = 4;
|
2021-09-16 14:23:20 +00:00
|
|
|
Nonce nonce = 5;
|
2021-09-02 16:31:24 +00:00
|
|
|
}
|
2021-09-17 12:36:50 +00:00
|
|
|
|
2021-11-26 17:59:41 +00:00
|
|
|
message Contact {
|
2021-09-17 12:36:50 +00:00
|
|
|
uint64 user_id = 1;
|
2021-12-18 06:00:39 +00:00
|
|
|
repeated ProjectMetadata projects = 2;
|
2021-09-17 12:36:50 +00:00
|
|
|
}
|
|
|
|
|
2021-12-18 06:00:39 +00:00
|
|
|
message ProjectMetadata {
|
2021-09-21 19:21:03 +00:00
|
|
|
uint64 id = 1;
|
2021-12-18 06:00:39 +00:00
|
|
|
bool is_shared = 2;
|
|
|
|
repeated string worktree_root_names = 3;
|
2021-09-21 19:21:03 +00:00
|
|
|
repeated uint64 guests = 4;
|
2021-09-17 12:36:50 +00:00
|
|
|
}
|