From 5c9b5ee78db88fe16b32807a81444d158078cbe3 Mon Sep 17 00:00:00 2001 From: frelodev Date: Sun, 8 Dec 2024 15:56:06 +0100 Subject: [PATCH 01/22] feat: Change RPCs from workspace name to workspace id --- proto/session.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proto/session.proto b/proto/session.proto index 39996c1..3385df2 100644 --- a/proto/session.proto +++ b/proto/session.proto @@ -20,7 +20,7 @@ service Session { // A message representing a request for specific workspace. message WorkspaceRequest { - // The name of the workspace. + // The workspace's id required string workspace = 1; } @@ -36,6 +36,6 @@ message WorkspaceList { message InviteRequest { // The user the invitation is for. required string user = 1; - // the workspace the invitation is for + // the workspace's id the invitation is for required string workspace = 2; } From 51f6bb16e4f675bd7b4735eaae92a80e855fade0 Mon Sep 17 00:00:00 2001 From: frelodev Date: Sun, 8 Dec 2024 15:57:50 +0100 Subject: [PATCH 02/22] feat: Separate ListWorkspaces into FetchInvitedWorkspaces and FetchOwnedWorkspaces --- proto/session.proto | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/proto/session.proto b/proto/session.proto index 3385df2..7e3ff9d 100644 --- a/proto/session.proto +++ b/proto/session.proto @@ -12,8 +12,10 @@ service Session { rpc CreateWorkspace (WorkspaceRequest) returns (common.Empty); // Delete a workspace. rpc DeleteWorkspace (WorkspaceRequest) returns (common.Empty); - // List all available workspaces. - rpc ListWorkspaces (common.Empty) returns (WorkspaceList); + // List all workspaces the user has been invited to. + rpc FetchInvitedWorkspaces (common.Empty) returns (WorkspacesInvitedList); + //List all workspaces the user owns + rpc FetchOwnedWorkspaces (common.Empty) returns (WorkspacesOwnedList); // Handle a workspace invite request. rpc InviteToWorkspace (InviteRequest) returns (common.Empty); } @@ -25,11 +27,15 @@ message WorkspaceRequest { } // A message representing a list of workspaces. -message WorkspaceList { +message WorkspacesInvitedList { + // A vector of workspaces the user is invited to. + repeated string invited = 1; +} + +// A message representing a list of workspaces. +message WorkspacesOwnedList { // A vector of workspaces owned by the user. repeated string owned = 1; - // A vector of workspaces the user is invited to. - repeated string invited = 2; } // A message representing an invitation to a workspace. From 68efa1c86375d36ff472b8c4b4193756a8fda586 Mon Sep 17 00:00:00 2001 From: frelodev Date: Sat, 25 Jan 2025 16:52:27 +0100 Subject: [PATCH 03/22] chore: rename FetchBufferUsers (#1) --- proto/workspace.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proto/workspace.proto b/proto/workspace.proto index 712a3f5..efe234e 100644 --- a/proto/workspace.proto +++ b/proto/workspace.proto @@ -20,7 +20,7 @@ service Workspace { // List users in the workspace. rpc ListUsers (common.Empty) returns (UserList); // List users within a given buffer. - rpc ListBufferUsers (files.BufferNode) returns (UserList); + rpc FetchBufferUsers (files.BufferNode) returns (UserList); } // A message representing a list of users. @@ -67,4 +67,4 @@ message WorkspaceEvent { FileRename rename = 4; FileDelete delete = 5; } -} +} \ No newline at end of file From 7864ff74002b06d9df64e12b9e1c699d4e89ce1f Mon Sep 17 00:00:00 2001 From: zaaarf Date: Sat, 25 Jan 2025 16:58:44 +0100 Subject: [PATCH 04/22] feat: multi cursor support (#4) Co-authored-by: frelodev --- proto/cursor.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/cursor.proto b/proto/cursor.proto index 320de1d..6969ffb 100644 --- a/proto/cursor.proto +++ b/proto/cursor.proto @@ -33,5 +33,5 @@ message CursorEvent { // The user moving the cursor. required common.Identity user = 1; // The new cursor position. - required CursorPosition position = 2; + repeated CursorPosition position = 2; } From 71e4e56a118904a07079ba61efce675432aafaeb Mon Sep 17 00:00:00 2001 From: zaaarf Date: Sat, 25 Jan 2025 17:01:21 +0100 Subject: [PATCH 05/22] fix: renamed compile_protos in build.rs --- build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 0acca80..50c8855 100644 --- a/build.rs +++ b/build.rs @@ -19,7 +19,7 @@ fn main() -> Result<(), Box> { .build_server(server) .build_client(client) .build_transport(transport) - .compile_protos( + .compile( &[ "proto/common.proto", "proto/cursor.proto", From 88c7a7431544347b86b6eaf34aa52124d40f9681 Mon Sep 17 00:00:00 2001 From: zaaarf Date: Sat, 25 Jan 2025 17:28:15 +0100 Subject: [PATCH 06/22] feat: use uuids for workspace names also send owner info in the list, so the lib can easily compose "human friendly" namespaced names Co-authored-by: frelodev --- proto/buffer.proto | 2 +- proto/common.proto | 14 ++++++++++++-- proto/cursor.proto | 2 +- proto/session.proto | 25 +++++++++++++++---------- proto/workspace.proto | 2 +- src/lib.rs | 18 +++++++++--------- 6 files changed, 39 insertions(+), 24 deletions(-) diff --git a/proto/buffer.proto b/proto/buffer.proto index 6947e8b..d980986 100644 --- a/proto/buffer.proto +++ b/proto/buffer.proto @@ -21,5 +21,5 @@ message BufferEvent { // The operation that occurred. required Operation op = 1; // The user that sent this event. - required common.Identity user = 2; + required common.Identifier user = 2; } diff --git a/proto/common.proto b/proto/common.proto index 172fc7f..4419aee 100644 --- a/proto/common.proto +++ b/proto/common.proto @@ -8,7 +8,7 @@ message Token { } // Message representing a UUID. -message Identity { +message Identifier { // The most significant bits of the UUID. required uint64 hi = 1; // The least significant bits of the UUID. @@ -18,10 +18,20 @@ message Identity { // Message representing a user. message User { // The UUID of the user. - required Identity id = 1; + required Identifier id = 1; // The name of a user. required string name = 2; } +// Message representing a workspace. +message WorkspaceInfo { + // The UUID of the workspace. + required Identifier id = 1; + // The owner of the workspace, for easy namespacing. + required User owner = 2; + // Mnemonical name of the workspace. + required string name = 3; +} + // A generic empty message. message Empty { } diff --git a/proto/cursor.proto b/proto/cursor.proto index 6969ffb..a96996f 100644 --- a/proto/cursor.proto +++ b/proto/cursor.proto @@ -31,7 +31,7 @@ message CursorPosition { // A message representing a cursor event. message CursorEvent { // The user moving the cursor. - required common.Identity user = 1; + required common.Identifier user = 1; // The new cursor position. repeated CursorPosition position = 2; } diff --git a/proto/session.proto b/proto/session.proto index 7e3ff9d..839e8e1 100644 --- a/proto/session.proto +++ b/proto/session.proto @@ -9,39 +9,44 @@ service Session { // Handle a workspace access request and return a workspace token. rpc AccessWorkspace (WorkspaceRequest) returns (common.Token); // Create a workspace. - rpc CreateWorkspace (WorkspaceRequest) returns (common.Empty); + rpc CreateWorkspace (OwnedWorkspaceRequest) returns (common.WorkspaceInfo); // Delete a workspace. - rpc DeleteWorkspace (WorkspaceRequest) returns (common.Empty); + rpc DeleteWorkspace (OwnedWorkspaceRequest) returns (common.Empty); // List all workspaces the user has been invited to. rpc FetchInvitedWorkspaces (common.Empty) returns (WorkspacesInvitedList); - //List all workspaces the user owns + //List all workspaces the user owns. rpc FetchOwnedWorkspaces (common.Empty) returns (WorkspacesOwnedList); // Handle a workspace invite request. rpc InviteToWorkspace (InviteRequest) returns (common.Empty); } -// A message representing a request for specific workspace. +// A message representing a request for and owned workspace. +message OwnedWorkspaceRequest { + // The workspace's name. + required string name = 1; +} + +// A message representing a request for a specific workspace. message WorkspaceRequest { - // The workspace's id - required string workspace = 1; + required common.Identifier id = 1; } // A message representing a list of workspaces. message WorkspacesInvitedList { // A vector of workspaces the user is invited to. - repeated string invited = 1; + repeated common.WorkspaceInfo invited = 1; } // A message representing a list of workspaces. message WorkspacesOwnedList { // A vector of workspaces owned by the user. - repeated string owned = 1; + repeated common.WorkspaceInfo owned = 1; } // A message representing an invitation to a workspace. message InviteRequest { // The user the invitation is for. required string user = 1; - // the workspace's id the invitation is for - required string workspace = 2; + // the workspace the invitation is for + required common.Identifier workspace = 2; } diff --git a/proto/workspace.proto b/proto/workspace.proto index efe234e..518cd08 100644 --- a/proto/workspace.proto +++ b/proto/workspace.proto @@ -67,4 +67,4 @@ message WorkspaceEvent { FileRename rename = 4; FileDelete delete = 5; } -} \ No newline at end of file +} diff --git a/src/lib.rs b/src/lib.rs index 51a7040..c942760 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,33 +10,33 @@ pub mod common { tonic::include_proto!("common"); - impl From for Identity { + impl From for Identifier { fn from(id: uuid::Uuid) -> Self { let (hi, lo) = id.as_u64_pair(); - Identity { hi, lo } + Identifier { hi, lo } } } - impl From<&uuid::Uuid> for Identity { + impl From<&uuid::Uuid> for Identifier { fn from(id: &uuid::Uuid) -> Self { let (hi, lo) = id.as_u64_pair(); - Identity { hi, lo } + Identifier { hi, lo } } } - impl From for uuid::Uuid { - fn from(value: Identity) -> Self { + impl From for uuid::Uuid { + fn from(value: Identifier) -> Self { uuid::Uuid::from_u64_pair(value.hi, value.lo) } } - impl From<&Identity> for uuid::Uuid { - fn from(value: &Identity) -> Self { + impl From<&Identifier> for uuid::Uuid { + fn from(value: &Identifier) -> Self { uuid::Uuid::from_u64_pair(value.hi, value.lo) } } - impl Identity { + impl Identifier { pub fn uuid(&self) -> uuid::Uuid { uuid::Uuid::from(self) } From 1083c57c0ad47c7506eb81a3f4015dc8dd4c7ac1 Mon Sep 17 00:00:00 2001 From: zaaarf Date: Sat, 25 Jan 2025 18:02:07 +0100 Subject: [PATCH 07/22] feat: add kick all emergency rpc (#7) Co-authored-by: frelodev --- proto/buffer.proto | 2 ++ proto/workspace.proto | 2 ++ 2 files changed, 4 insertions(+) diff --git a/proto/buffer.proto b/proto/buffer.proto index d980986..475f0d2 100644 --- a/proto/buffer.proto +++ b/proto/buffer.proto @@ -8,6 +8,8 @@ package buffer; service Buffer { // Attach to a buffer and receive operations. rpc Attach (stream Operation) returns (stream BufferEvent); + // Kicks all active users from the buffer. + rpc KickAll (common.Empty) returns (common.Empty); } // Message representing an operation that has occurred. diff --git a/proto/workspace.proto b/proto/workspace.proto index 518cd08..b812b8f 100644 --- a/proto/workspace.proto +++ b/proto/workspace.proto @@ -21,6 +21,8 @@ service Workspace { rpc ListUsers (common.Empty) returns (UserList); // List users within a given buffer. rpc FetchBufferUsers (files.BufferNode) returns (UserList); + // Revokes all invites and kicks all active users. + rpc KickAll (common.Empty) returns (common.Empty); } // A message representing a list of users. From b203677ee09e4ffe1bae2613daefa9042d12d0f4 Mon Sep 17 00:00:00 2001 From: zaaarf Date: Sat, 25 Jan 2025 18:15:04 +0100 Subject: [PATCH 08/22] feat: ephemeral buffers (#8) Co-authored-by: frelodev --- proto/files.proto | 8 ++++++++ proto/workspace.proto | 6 ++++-- src/lib.rs | 20 -------------------- 3 files changed, 12 insertions(+), 22 deletions(-) diff --git a/proto/files.proto b/proto/files.proto index 055ea72..435dbf6 100644 --- a/proto/files.proto +++ b/proto/files.proto @@ -2,10 +2,18 @@ syntax = "proto2"; package files; +// A message representing a buffer request. +message BufferRequest { + // The path of a buffer. + required string path = 1; +} + // A message representing a node in the filetree. message BufferNode { // The path of a buffer. required string path = 1; + // Whether the buffer is ephemeral; + required bool ephemeral = 2; } // A message representing a filetree. diff --git a/proto/workspace.proto b/proto/workspace.proto index b812b8f..e1bee66 100644 --- a/proto/workspace.proto +++ b/proto/workspace.proto @@ -14,9 +14,9 @@ service Workspace { // Access a buffer within the workspace and returns a buffer token for it. rpc AccessBuffer (files.BufferNode) returns (common.Token); // Delete a buffer. - rpc DeleteBuffer (files.BufferNode) returns (common.Empty); + rpc DeleteBuffer (files.BufferRequest) returns (common.Empty); // List buffers in the workspace. - rpc ListBuffers (common.Empty) returns (files.BufferTree); + rpc ListBuffers (files.BufferRequest) returns (files.BufferTree); // List users in the workspace. rpc ListUsers (common.Empty) returns (UserList); // List users within a given buffer. @@ -47,6 +47,8 @@ message WorkspaceEvent { message FileCreate { // The path of the created file. required string path = 1; + // Whether the buffer is ephemeral. + required bool ephemeral = 2; } // Event that occurs when a file is renamed in a workspace. message FileRename { diff --git a/src/lib.rs b/src/lib.rs index c942760..2a6a51d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -46,26 +46,6 @@ pub mod common { /// filetree related types pub mod files { tonic::include_proto!("files"); - - impl From for BufferNode { - fn from(value: String) -> Self { - BufferNode { path: value } - } - } - - impl From<&str> for BufferNode { - fn from(value: &str) -> Self { - BufferNode { - path: value.to_string(), - } - } - } - - impl From for String { - fn from(value: BufferNode) -> Self { - value.path - } - } } /// buffer synchronisation protocol types and procedures From f12871fbb8cbf283a49a70bc8c9e64c1e558fae8 Mon Sep 17 00:00:00 2001 From: zaaarf Date: Sat, 25 Jan 2025 18:17:44 +0100 Subject: [PATCH 09/22] feat: added pin rpc (#9) Co-authored-by: frelodev --- proto/workspace.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/proto/workspace.proto b/proto/workspace.proto index e1bee66..d074312 100644 --- a/proto/workspace.proto +++ b/proto/workspace.proto @@ -13,6 +13,8 @@ service Workspace { rpc CreateBuffer (files.BufferNode) returns (common.Empty); // Access a buffer within the workspace and returns a buffer token for it. rpc AccessBuffer (files.BufferNode) returns (common.Token); + // Transforms an ephemeral buffer in a persistent one. + rpc PinBuffer (files.BufferRequest) returns (common.Empty); // Delete a buffer. rpc DeleteBuffer (files.BufferRequest) returns (common.Empty); // List buffers in the workspace. From 1f441fef601f1c6ada2b69ff1051857c809c2a17 Mon Sep 17 00:00:00 2001 From: frelodev Date: Tue, 18 Feb 2025 18:49:32 +0100 Subject: [PATCH 10/22] feat: list all current CursorEvents --- proto/cursor.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/proto/cursor.proto b/proto/cursor.proto index a96996f..4596679 100644 --- a/proto/cursor.proto +++ b/proto/cursor.proto @@ -6,6 +6,8 @@ import "files.proto"; // Handles cursor events and broadcasts them to all users. service Cursor { + + rpc List(common.Empty) returns (CursorEventList); // Subscribe to a workspace's cursor events. rpc Attach (stream cursor.CursorPosition) returns (stream cursor.CursorEvent); } From 552fcb8467aa4a242900de386170ab0de3782830 Mon Sep 17 00:00:00 2001 From: frelodev Date: Tue, 18 Feb 2025 18:50:38 +0100 Subject: [PATCH 11/22] feat: real time updates/notifications in real time --- proto/session.proto | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/proto/session.proto b/proto/session.proto index 839e8e1..968122f 100644 --- a/proto/session.proto +++ b/proto/session.proto @@ -6,6 +6,8 @@ import "common.proto"; // Manages user workspaces and refreshes tokens. service Session { + + rpc getEvents (common.Empty) returns (stream SessionEvent); // Handle a workspace access request and return a workspace token. rpc AccessWorkspace (WorkspaceRequest) returns (common.Token); // Create a workspace. @@ -50,3 +52,27 @@ message InviteRequest { // the workspace the invitation is for required common.Identifier workspace = 2; } + +// A message representing a session event. +message SessionEvent { + // Event that occurs when you get invited to a workspace + message InvitationEvent { + // The user that invited you. + required common.User user = 1; + } + // Event that occurs when a user leaves a workspace. + message LeaveEvent { + // The user that left. + required common.User user = 1; + } + // Event that occurs when an user joins in a workspace you are in + message JoinEvent { + // The user that joined. + required common.User user = 1; + } + oneof event { + InvitationEvent invite = 1; + LeaveEvent leave = 2; + JoinEvent join = 3; + } +} \ No newline at end of file From cf80c14a8ed0f967b2c03b96abd74976a1b4ca30 Mon Sep 17 00:00:00 2001 From: frelodev Date: Tue, 18 Feb 2025 18:54:18 +0100 Subject: [PATCH 12/22] chore: compile is deprecated, replaced with compile_protos --- build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 50c8855..0acca80 100644 --- a/build.rs +++ b/build.rs @@ -19,7 +19,7 @@ fn main() -> Result<(), Box> { .build_server(server) .build_client(client) .build_transport(transport) - .compile( + .compile_protos( &[ "proto/common.proto", "proto/cursor.proto", From 760eb8ca2a87d26ac01ae50d4851a1969fe59d86 Mon Sep 17 00:00:00 2001 From: zaaarf Date: Thu, 31 Jul 2025 10:01:53 +0200 Subject: [PATCH 13/22] docs: missing docstrings --- proto/cursor.proto | 2 +- proto/session.proto | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/proto/cursor.proto b/proto/cursor.proto index 4596679..738104b 100644 --- a/proto/cursor.proto +++ b/proto/cursor.proto @@ -6,7 +6,7 @@ import "files.proto"; // Handles cursor events and broadcasts them to all users. service Cursor { - + // Retrieves all current cursor positions. rpc List(common.Empty) returns (CursorEventList); // Subscribe to a workspace's cursor events. rpc Attach (stream cursor.CursorPosition) returns (stream cursor.CursorEvent); diff --git a/proto/session.proto b/proto/session.proto index 968122f..fd3a1eb 100644 --- a/proto/session.proto +++ b/proto/session.proto @@ -6,7 +6,7 @@ import "common.proto"; // Manages user workspaces and refreshes tokens. service Session { - + // Get the stream for session events. rpc getEvents (common.Empty) returns (stream SessionEvent); // Handle a workspace access request and return a workspace token. rpc AccessWorkspace (WorkspaceRequest) returns (common.Token); @@ -22,7 +22,7 @@ service Session { rpc InviteToWorkspace (InviteRequest) returns (common.Empty); } -// A message representing a request for and owned workspace. +// A message representing a request for an owned workspace. message OwnedWorkspaceRequest { // The workspace's name. required string name = 1; @@ -75,4 +75,4 @@ message SessionEvent { LeaveEvent leave = 2; JoinEvent join = 3; } -} \ No newline at end of file +} From 87a9add8a39777853dd3ad2e4db5743c75eeb24d Mon Sep 17 00:00:00 2001 From: alemi Date: Wed, 30 Jul 2025 20:39:51 +0200 Subject: [PATCH 14/22] chore: bump dependencies also bump version since tonic broke everything... --- Cargo.toml | 13 +++++++------ build.rs | 7 ++++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f515264..9da5fa8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,19 +10,20 @@ authors = [ "cschen " ] license = "GPL-3.0-only" -version = "0.7.1" -edition = "2021" +version = "0.7.2" +edition = "2024" [lib] name = "codemp_proto" [dependencies] -prost = "0.13" -uuid = "1.10" -tonic = { version = "0.12", default-features = false, features = ["codegen", "prost"] } +prost = "0.14" +uuid = "1.17" +tonic = { version = "0.14", default-features = false, features = ["codegen"] } +tonic-prost = "0.14" [build-dependencies] -tonic-build = "0.12" +tonic-prost-build = "0.14" [features] default = ["client"] diff --git a/build.rs b/build.rs index 0acca80..6c67ae0 100644 --- a/build.rs +++ b/build.rs @@ -14,8 +14,8 @@ fn main() -> Result<(), Box> { #[cfg(not(any(feature = "server", feature = "client")))] { false } }; - Ok - (tonic_build::configure() + Ok( + tonic_prost_build::configure() .build_server(server) .build_client(client) .build_transport(transport) @@ -30,5 +30,6 @@ fn main() -> Result<(), Box> { "proto/buffer.proto", ], &["proto"], - )?) + )? + ) } From b2c6d7c20ebd6f780e68de29e09c64f4326abc78 Mon Sep 17 00:00:00 2001 From: alemi Date: Wed, 30 Jul 2025 20:40:08 +0200 Subject: [PATCH 15/22] chore: cargo fmt --- build.rs | 64 +++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/build.rs b/build.rs index 6c67ae0..ab13dac 100644 --- a/build.rs +++ b/build.rs @@ -1,35 +1,51 @@ fn main() -> Result<(), Box> { let server = { - #[cfg(feature = "server")] { true } - #[cfg(not(feature = "server"))] { false } + #[cfg(feature = "server")] + { + true + } + #[cfg(not(feature = "server"))] + { + false + } }; let client = { - #[cfg(feature = "client")] { true } - #[cfg(not(feature = "client"))] { false } + #[cfg(feature = "client")] + { + true + } + #[cfg(not(feature = "client"))] + { + false + } }; let transport = { - #[cfg(any(feature = "server", feature = "client"))] { true } - #[cfg(not(any(feature = "server", feature = "client")))] { false } + #[cfg(any(feature = "server", feature = "client"))] + { + true + } + #[cfg(not(any(feature = "server", feature = "client")))] + { + false + } }; - Ok( - tonic_prost_build::configure() - .build_server(server) - .build_client(client) - .build_transport(transport) - .compile_protos( - &[ - "proto/common.proto", - "proto/cursor.proto", - "proto/files.proto", - "proto/auth.proto", - "proto/session.proto", - "proto/workspace.proto", - "proto/buffer.proto", - ], - &["proto"], - )? - ) + Ok(tonic_prost_build::configure() + .build_server(server) + .build_client(client) + .build_transport(transport) + .compile_protos( + &[ + "proto/common.proto", + "proto/cursor.proto", + "proto/files.proto", + "proto/auth.proto", + "proto/session.proto", + "proto/workspace.proto", + "proto/buffer.proto", + ], + &["proto"], + )?) } From ce57d574bd79cb3a689a6fd8c95ae57ac6d9bbd9 Mon Sep 17 00:00:00 2001 From: alemi Date: Wed, 30 Jul 2025 20:49:23 +0200 Subject: [PATCH 16/22] chore: add lockfile --- .gitignore | 1 - Cargo.lock | 1082 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1082 insertions(+), 1 deletion(-) create mode 100644 Cargo.lock diff --git a/.gitignore b/.gitignore index 869df07..ea8c4bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ /target -Cargo.lock \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..24d7fab --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,1082 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "anyhow" +version = "1.0.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" + +[[package]] +name = "async-trait" +version = "0.1.88" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "backtrace" +version = "0.3.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" + +[[package]] +name = "bumpalo" +version = "3.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" + +[[package]] +name = "bytes" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" + +[[package]] +name = "cfg-if" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" + +[[package]] +name = "codemp-proto" +version = "0.7.2" +dependencies = [ + "prost", + "tonic", + "tonic-prost", + "tonic-prost-build", + "uuid", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "fixedbitset" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "pin-utils", +] + +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", +] + +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "h2" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17da50a276f1e01e0ba6c029e47b7100754904ee8a278f886546e98575380785" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "http" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-timeout" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" +dependencies = [ + "hyper", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http", + "http-body", + "hyper", + "libc", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "indexmap" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "io-uring" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" +dependencies = [ + "bitflags", + "cfg-if", + "libc", +] + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "js-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "libc" +version = "0.2.174" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" + +[[package]] +name = "linux-raw-sys" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" + +[[package]] +name = "log" +version = "0.4.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" + +[[package]] +name = "memchr" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +dependencies = [ + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys", +] + +[[package]] +name = "multimap" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" + +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "petgraph" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" +dependencies = [ + "fixedbitset", + "indexmap", +] + +[[package]] +name = "pin-project" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "prettyplease" +version = "0.2.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff24dfcda44452b9816fff4cd4227e1bb73ff5a2f1bc1105aa92fb8565ce44d2" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prost" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7231bd9b3d3d33c86b58adbac74b5ec0ad9f496b19d22801d773636feaa95f3d" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac6c3320f9abac597dcbc668774ef006702672474aad53c6d596b62e487b40b1" +dependencies = [ + "heck", + "itertools", + "log", + "multimap", + "once_cell", + "petgraph", + "prettyplease", + "prost", + "prost-types", + "pulldown-cmark", + "pulldown-cmark-to-cmark", + "regex", + "syn", + "tempfile", +] + +[[package]] +name = "prost-derive" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9120690fafc389a67ba3803df527d0ec9cbbc9cc45e4cc20b332996dfb672425" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "prost-types" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9b4db3d6da204ed77bb26ba83b6122a73aeb2e87e25fbf7ad2e84c4ccbf8f72" +dependencies = [ + "prost", +] + +[[package]] +name = "pulldown-cmark" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e8bbe1a966bd2f362681a44f6edce3c2310ac21e4d5067a6e7ec396297a6ea0" +dependencies = [ + "bitflags", + "memchr", + "unicase", +] + +[[package]] +name = "pulldown-cmark-to-cmark" +version = "21.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5b6a0769a491a08b31ea5c62494a8f144ee0987d86d670a8af4df1e1b7cde75" +dependencies = [ + "pulldown-cmark", +] + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "rustc-demangle" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" + +[[package]] +name = "rustix" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "rustversion" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" + +[[package]] +name = "slab" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "syn" +version = "2.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" + +[[package]] +name = "tempfile" +version = "3.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" +dependencies = [ + "fastrand", + "getrandom", + "once_cell", + "rustix", + "windows-sys", +] + +[[package]] +name = "tokio" +version = "1.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43864ed400b6043a4757a25c7a64a8efde741aed79a056a2fb348a406701bb35" +dependencies = [ + "backtrace", + "bytes", + "io-uring", + "libc", + "mio", + "pin-project-lite", + "slab", + "socket2", + "tokio-macros", + "windows-sys", +] + +[[package]] +name = "tokio-macros" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-stream" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tonic" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "308e1db96abdccdf0a9150fb69112bf6ea72640e0bd834ef0c4a618ccc8c8ddc" +dependencies = [ + "async-trait", + "base64", + "bytes", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-timeout", + "hyper-util", + "percent-encoding", + "pin-project", + "socket2", + "sync_wrapper", + "tokio", + "tokio-stream", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tonic-build" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18262cdd13dec66e8e3f2e3fe535e4b2cc706fab444a7d3678d75d8ac2557329" +dependencies = [ + "prettyplease", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tonic-prost" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d8b5b7a44512c59f5ad45e0c40e53263cbbf4426d74fe6b569e04f1d4206e9c" +dependencies = [ + "bytes", + "prost", + "tonic", +] + +[[package]] +name = "tonic-prost-build" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "114cca66d757d72422ef8cccf8be3065321860ac9fa4be73aab37a8a20a9a805" +dependencies = [ + "prettyplease", + "proc-macro2", + "prost-build", + "prost-types", + "quote", + "syn", + "tempfile", + "tonic-build", +] + +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "indexmap", + "pin-project-lite", + "slab", + "sync_wrapper", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "unicase" +version = "2.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" + +[[package]] +name = "unicode-ident" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" + +[[package]] +name = "uuid" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags", +] From b7ba95de85c7af5aa3c57b4b04b2f730ad5fbf3f Mon Sep 17 00:00:00 2001 From: alemi Date: Thu, 31 Jul 2025 10:07:37 +0200 Subject: [PATCH 17/22] ci: run on all branches --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b073372..592258d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,8 +2,6 @@ name: build+test on: push: - branches: - - dev env: CARGO_TERM_COLOR: always From 643688b30a7b9969b34108048de73e4b41c6e8ce Mon Sep 17 00:00:00 2001 From: alemi Date: Thu, 31 Jul 2025 10:07:45 +0200 Subject: [PATCH 18/22] chore: 0.8.0 --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 24d7fab..9980fab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -96,7 +96,7 @@ checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" [[package]] name = "codemp-proto" -version = "0.7.2" +version = "0.8.0" dependencies = [ "prost", "tonic", diff --git a/Cargo.toml b/Cargo.toml index 9da5fa8..aa33c85 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ authors = [ "cschen " ] license = "GPL-3.0-only" -version = "0.7.2" +version = "0.8.0" edition = "2024" [lib] From 9d15418c7fd51e72fd8c0040315a6396d10c3496 Mon Sep 17 00:00:00 2001 From: zaaarf Date: Thu, 31 Jul 2025 10:27:14 +0200 Subject: [PATCH 19/22] feat: rewritten session events --- proto/session.proto | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/proto/session.proto b/proto/session.proto index fd3a1eb..b841712 100644 --- a/proto/session.proto +++ b/proto/session.proto @@ -49,30 +49,44 @@ message WorkspacesOwnedList { message InviteRequest { // The user the invitation is for. required string user = 1; - // the workspace the invitation is for + // The workspace the invitation is for. required common.Identifier workspace = 2; } // A message representing a session event. message SessionEvent { - // Event that occurs when you get invited to a workspace + // Event that occurs when you get invited to a workspace. message InvitationEvent { // The user that invited you. required common.User user = 1; + // The workspace the invitation is for. + required common.WorkspaceInfo workspace = 2; } - // Event that occurs when a user leaves a workspace. - message LeaveEvent { - // The user that left. + // Event that occurs when a user quits a workspace. + message QuitEvent { + // The user that quits. required common.User user = 1; + // The workspace the user quit. + required common.WorkspaceInfo workspace = 2; } - // Event that occurs when an user joins in a workspace you are in - message JoinEvent { - // The user that joined. + // Event that occurs when an user accepts an invite to a workspace you are in. + message AcceptEvent { + // The user that accepted the invite. required common.User user = 1; + // The workspace the user accepted the invite for. + required common.WorkspaceInfo workspace = 2; + } + // Event that occurs when an user rejects an invite. + message RejectEvent { + // The user that rejected the invite. + required common.User user = 1; + // The workspace the invitation was for. + required common.WorkspaceInfo workspace = 2; } oneof event { InvitationEvent invite = 1; - LeaveEvent leave = 2; - JoinEvent join = 3; + QuitEvent leave = 2; + AcceptEvent join = 3; + RejectEvent reject = 4; } } From f70173856eb906d9d8a20a9af8c090dae9085433 Mon Sep 17 00:00:00 2001 From: zaaarf Date: Thu, 31 Jul 2025 10:37:32 +0200 Subject: [PATCH 20/22] chore: rename for consistency --- proto/session.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proto/session.proto b/proto/session.proto index b841712..2f97fcf 100644 --- a/proto/session.proto +++ b/proto/session.proto @@ -6,8 +6,8 @@ import "common.proto"; // Manages user workspaces and refreshes tokens. service Session { - // Get the stream for session events. - rpc getEvents (common.Empty) returns (stream SessionEvent); + // Attach to a session and receive events. + rpc Attach (common.Empty) returns (stream SessionEvent); // Handle a workspace access request and return a workspace token. rpc AccessWorkspace (WorkspaceRequest) returns (common.Token); // Create a workspace. From 9262d7ff9ee1249eaad0516c69a94fe4da4d75f1 Mon Sep 17 00:00:00 2001 From: zaaarf Date: Thu, 31 Jul 2025 10:44:55 +0200 Subject: [PATCH 21/22] fix: correct input for workspace rpcs --- proto/workspace.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proto/workspace.proto b/proto/workspace.proto index d074312..33e3fd4 100644 --- a/proto/workspace.proto +++ b/proto/workspace.proto @@ -17,12 +17,12 @@ service Workspace { rpc PinBuffer (files.BufferRequest) returns (common.Empty); // Delete a buffer. rpc DeleteBuffer (files.BufferRequest) returns (common.Empty); - // List buffers in the workspace. + // List buffers in the workspace that are children of the given path. rpc ListBuffers (files.BufferRequest) returns (files.BufferTree); // List users in the workspace. rpc ListUsers (common.Empty) returns (UserList); // List users within a given buffer. - rpc FetchBufferUsers (files.BufferNode) returns (UserList); + rpc ListBufferUsers (files.BufferRequest) returns (UserList); // Revokes all invites and kicks all active users. rpc KickAll (common.Empty) returns (common.Empty); } From c73b8c088d0cdf5f1d8d791ae12afa9e37cc4f9a Mon Sep 17 00:00:00 2001 From: zaaarf Date: Thu, 31 Jul 2025 10:46:21 +0200 Subject: [PATCH 22/22] feat: add CursorEventList --- proto/cursor.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/proto/cursor.proto b/proto/cursor.proto index 738104b..a9c72a7 100644 --- a/proto/cursor.proto +++ b/proto/cursor.proto @@ -12,6 +12,12 @@ service Cursor { rpc Attach (stream cursor.CursorPosition) returns (stream cursor.CursorEvent); } +// A message representing a list of cursor events. +message CursorEventList { + // A vector of cursor events. + repeated CursorEvent cursors = 1; +} + // A message representing a position in a buffer. message RowCol { // The row.