feat(daemon): EventLog ring model with read-flags

Add event_log.rs with EventLog (capped VecDeque, monotonic ids, mark_read,
snapshot/restore) and EventLogState. Register mod in main.rs. Stub
Cmd::EventLog and Cmd::MarkRead arms in server.rs to keep the exhaustive
match compiling; full wiring follows in Task 4.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 07:17:29 +07:00
parent 5a8596dd0b
commit 56ba1723b9
3 changed files with 224 additions and 0 deletions
+12
View File
@@ -526,6 +526,18 @@ async fn handle_request(
let _ = out.send(ok(id, serde_json::json!({ "groups": groups, "workspaces": workspaces }))).await;
}
Cmd::EventLog { limit } => {
// TODO(SP2-T4): wire to EventLog once the shared state is plumbed in.
let _ = limit;
let _ = out.send(err(id, "NOT_IMPLEMENTED", "event log not yet wired")).await;
}
Cmd::MarkRead { target } => {
// TODO(SP2-T4): wire to EventLog once the shared state is plumbed in.
let _ = target;
let _ = out.send(err(id, "NOT_IMPLEMENTED", "mark_read not yet wired")).await;
}
Cmd::Shutdown => {
let _ = out.send(ok(id, serde_json::Value::Null)).await;
std::process::exit(0);