feat(daemon): M2 command dispatch, layout events, cold-start restore, persistence wiring

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-09 21:25:35 +07:00
parent b72f4cb3a5
commit 62a65b691d
2 changed files with 367 additions and 84 deletions
+4 -1
View File
@@ -50,6 +50,9 @@ async fn run_daemon() -> Result<()> {
};
lifecycle::clear_stale_socket()?;
let sock = lifecycle::socket_path()?;
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));
eprintln!("spaceshd listening on {}", sock.display());
server::serve(&sock).await
server::serve(&sock, store).await
}