1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! # lspz Daemon
//!
//! Long-lived background process that manages LSP server sessions.
//!
//! ## Architecture
//!
//! The daemon listens on a Unix domain socket at
//! `~/.cache/lspz/<slug>-<hash>.sock`, where `<hash>` is derived from the
//! **canonicalized** workspace root (see [`socket_path_for_workspace`] /
//! [`resolve_workspace_root`]). Canonicalization is what makes the daemon
//! reusable: the same project reached via different path spellings lands on
//! the same socket.
//!
//! Clients (MCP server, CLI) connect to it transparently. When no daemon is
//! running, the client auto-spawns one in the background. A background reaper
//! reclaims idle LSP sessions and, once the daemon has had no sessions and no
//! connections for a while, shuts the daemon down so detached processes
//! (spawned via `setsid()`) do not pile up.
//!
//! ## Protocol
//!
//! JSON-RPC 2.0 over newline-delimited JSON on Unix socket.
//!
//! ### Methods
//!
//! | Method | Description |
//! |--------|-------------|
//! | `lsp/spawn` | Get or create an LSP session |
//! | `lsp/request` | Send an LSP request, await response |
//! | `lsp/notify` | Send an LSP notification |
//! | `lsp/wait_notify` | Wait for a notification from the server |
//! | `daemon/status` | Query daemon state (sessions, PIDs, stats) |
//! | `daemon/shutdown` | Graceful shutdown |
pub use DaemonClient;
pub use ;
pub use DaemonServer;
pub use ;
pub use DaemonStatus;