wire(daemon): thread EventLog + EventPersister through serve/router

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-10 07:31:40 +07:00
parent ac2d5ca1db
commit f7bf9fc5c6
2 changed files with 42 additions and 11 deletions
+4 -1
View File
@@ -56,6 +56,9 @@ async fn run_daemon() -> Result<()> {
let state_path = lifecycle::spacesh_dir()?.join("state.json");
let store: std::sync::Arc<dyn state_store::StateStore> =
std::sync::Arc::new(state_store::JsonStateStore::new(state_path));
let events_path = lifecycle::spacesh_dir()?.join("events.json");
let event_store: std::sync::Arc<dyn event_store::EventStore> =
std::sync::Arc::new(event_store::JsonEventStore::new(events_path));
eprintln!("spaceshd listening on {}", sock.display());
server::serve(&sock, store).await
server::serve(&sock, store, event_store).await
}