winx_code_agent/daemon/
mod.rs1mod client;
4mod control;
5mod lifecycle;
6mod protocol;
7mod server;
8
9use std::path::PathBuf;
10
11pub use client::{DaemonClient, DaemonShellRuntime};
12pub use control::ControlServer;
13pub use protocol::{
14 HelloResult, JournalRead, PruneResult, SessionInfo, MAX_FRAME_BYTES, PROTOCOL_MAJOR,
15 PROTOCOL_MINOR,
16};
17pub use server::DaemonServer;
18
19pub fn default_socket_path() -> PathBuf {
21 if let Some(path) = std::env::var_os("WINX_SOCKET") {
22 return PathBuf::from(path);
23 }
24 if let Some(runtime_dir) = std::env::var_os("XDG_RUNTIME_DIR") {
25 return PathBuf::from(runtime_dir).join("winx/winxd.sock");
26 }
27 PathBuf::from(format!("/tmp/winx-{}/winxd.sock", crate::os::unix::effective_uid()))
28}