aboutsummaryrefslogtreecommitdiffstats
path: root/crates/turtle/proto/control.proto
diff options
context:
space:
mode:
Diffstat (limited to 'crates/turtle/proto/control.proto')
-rw-r--r--crates/turtle/proto/control.proto71
1 files changed, 22 insertions, 49 deletions
diff --git a/crates/turtle/proto/control.proto b/crates/turtle/proto/control.proto
index 06347902..f1656d73 100644
--- a/crates/turtle/proto/control.proto
+++ b/crates/turtle/proto/control.proto
@@ -1,62 +1,35 @@
syntax = "proto3";
package control;
-// The Control service allows external processes (CLI commands, etc.)
-// to inject events into the running daemon.
service Control {
- // Send an event to the daemon's event bus
- rpc SendEvent(SendEventRequest) returns (SendEventResponse);
-}
-
-message SendEventRequest {
- oneof event {
- // History was pruned - search index needs full rebuild
- HistoryPrunedEvent history_pruned = 1;
-
- // Specific history items were deleted
- HistoryDeletedEvent history_deleted = 2;
-
- // Request immediate sync
- ForceSyncEvent force_sync = 3;
-
- // Settings have changed, reload if needed
- SettingsReloadedEvent settings_reloaded = 4;
-
- // Request graceful shutdown
- ShutdownEvent shutdown = 5;
-
- // History was rebuilt - search index needs full rebuild
- HistoryRebuiltEvent history_rebuilt = 6;
- }
-}
-
-message SendEventResponse {
- // Empty on success; errors come through gRPC status
-}
-
-// Individual event message types
+ // Tell the daemon to perform a sync operation.
+ rpc ForceSync(ForceSyncRequest) returns (ForceSyncReply);
-message HistoryPrunedEvent {
- // No fields needed - just signals that pruning happened
-}
-
-message HistoryRebuiltEvent {
- // No fields needed - just signals that rebuilding happened
-}
+ // Query the daemon for it's status.
+ rpc Status(StatusRequest) returns (StatusReply);
-message HistoryDeletedEvent {
- // IDs of deleted history items (UUIDs as strings)
- repeated string ids = 1;
+ // Query the daemon about used paths.
+ rpc Paths(PathsRequest) returns (PathsReply);
}
-message ForceSyncEvent {
- // No fields needed - just triggers sync
+message ForceSyncRequest {}
+message ForceSyncReply {
+ optional string error = 1;
+ uint32 uploaded = 2;
+ uint32 downloaded = 3;
}
-message SettingsReloadedEvent {
- // No fields needed - components should re-read settings
+message StatusRequest {}
+message StatusReply {
+ bool healthy = 1;
+ string version = 2;
+ uint32 pid = 3;
+ uint32 protocol = 4;
}
-message ShutdownEvent {
- // No fields needed - triggers graceful shutdown
+message PathsRequest {}
+message PathsReply {
+ string config = 1;
+ string db = 2;
+ string socket = 3;
}