aboutsummaryrefslogtreecommitdiffstats
path: root/crates/turtle/proto/search.proto
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-06-11 00:54:30 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-06-11 00:54:30 +0200
commit5c39e7cf284a1f6e9a1657f2deb44e359fc47eb8 (patch)
treec64baa8d5866c8e339eaf660dd3f94f30a3f7d8a /crates/turtle/proto/search.proto
parentchore: Somewhat simplify sync code (diff)
downloadatuin-5c39e7cf284a1f6e9a1657f2deb44e359fc47eb8.zip
chore: Move everything into one big crate
That helps remove duplicated code and rustc/cargo will now also show dead code correctly.
Diffstat (limited to 'crates/turtle/proto/search.proto')
-rw-r--r--crates/turtle/proto/search.proto35
1 files changed, 35 insertions, 0 deletions
diff --git a/crates/turtle/proto/search.proto b/crates/turtle/proto/search.proto
new file mode 100644
index 00000000..6b84acbd
--- /dev/null
+++ b/crates/turtle/proto/search.proto
@@ -0,0 +1,35 @@
+syntax = "proto3";
+package search;
+
+enum FilterMode {
+ GLOBAL = 0;
+ HOST = 1;
+ SESSION = 2;
+ DIRECTORY = 3;
+ WORKSPACE = 4;
+ SESSION_PRELOAD = 5;
+}
+
+message SearchContext {
+ string session_id = 1;
+ string cwd = 2;
+ string hostname = 3;
+ string host_id = 4;
+ optional string git_root = 5;
+}
+
+message SearchRequest {
+ string query = 1;
+ uint64 query_id = 2; // Incrementing ID to match responses to queries
+ FilterMode filter_mode = 3;
+ SearchContext context = 4;
+}
+
+message SearchResponse {
+ uint64 query_id = 1; // Echo back the query ID
+ repeated bytes ids = 2;
+}
+
+service Search {
+ rpc Search(stream SearchRequest) returns (stream SearchResponse);
+}