Where the daemon keeps its socket, its log and its decisions. The mod
computes the same socket path from the same two variables (bridge.ts).
4use std::path::PathBuf;
$XDG_STATE_HOME/jevhooks, or ~/.local/state/jevhooks.
The one daemon's socket; every session's mod and MCP server talk to it.
Held for as long as a daemon runs, so two cannot serve at once.
The daemon's stderr, since nothing else is attached to it.
Every decision and what became of it, one JSON object per line.
Which build this process is: the executable's device, inode, size and modification time. A rebuilt binary is a different identity, which is how a new session's MCP server knows the running daemon is stale.
39pub fn identity() -> String { 40 use std::os::unix::fs::MetadataExt; 41 match std::env::current_exe().and_then(std::fs::metadata) { 42 Ok(meta) => format!("{}:{}:{}:{}", meta.dev(), meta.ino(), meta.len(), meta.mtime_nsec() as i128 + meta.mtime() as i128 * 1_000_000_000), 43 Err(_) => "unknown".to_owned(), 44 } 45}