diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-07-20 14:18:36 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-07-20 14:18:36 +0200 |
| commit | 63a0ec3901a863fb07d18f4b814a98a813644382 (patch) | |
| tree | c94b7b501601b5df05cf654e9f9c9b5bc66a239e /crates/daemon/proto/control.proto | |
| parent | chore: Commit (diff) | |
| download | atuin-63a0ec3901a863fb07d18f4b814a98a813644382.zip | |
chore: Commit
Diffstat (limited to 'crates/daemon/proto/control.proto')
| -rw-r--r-- | crates/daemon/proto/control.proto | 65 |
1 files changed, 13 insertions, 52 deletions
diff --git a/crates/daemon/proto/control.proto b/crates/daemon/proto/control.proto index 06347902..47a7b8b2 100644 --- a/crates/daemon/proto/control.proto +++ b/crates/daemon/proto/control.proto @@ -1,62 +1,23 @@ 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 - -message HistoryPrunedEvent { - // No fields needed - just signals that pruning happened -} - -message HistoryRebuiltEvent { - // No fields needed - just signals that rebuilding happened -} - -message HistoryDeletedEvent { - // IDs of deleted history items (UUIDs as strings) - repeated string ids = 1; -} + // Tell the daemon to perform a sync operation. + rpc ForceSync(ForceSyncRequest) returns (ForceSyncReply); -message ForceSyncEvent { - // No fields needed - just triggers sync + // Query the daemon for it's status. + rpc Status(StatusRequest) returns (StatusReply); } -message SettingsReloadedEvent { - // No fields needed - components should re-read settings +message ForceSyncRequest {} +message ForceSyncReply { + bool accepted = 1; } -message ShutdownEvent { - // No fields needed - triggers graceful shutdown +message StatusRequest {} +message StatusReply { + bool healthy = 1; + string version = 2; + uint32 pid = 3; + uint32 protocol = 4; } |
