Skip to main content

Module session

Module session 

Source
Expand description

Named MCP session daemons over Unix-domain sockets (Unix only).

One session name → one long-lived crate::mcp::McpClient. Ephemeral CLI processes speak NDJSON over AF_UNIX (list_tools, call_tool, resources, prompts). See crate README for layout, idle timeout, and security model.

Structs§

DaemonConfig
SessionMeta
SessionRequest
SessionResponse

Enums§

SessionMethod

Constants§

DEFAULT_IDLE_SECS

Functions§

clear_stale_session
If meta exists but PID is dead, clear leftovers. Returns true if cleaned.
is_process_alive
resolve_idle_secs
run_session_daemon
Entry point for __session_daemon <config-path>.
session_is_alive
session_list
List known sessions (from meta files).
session_log_path
session_meta_path
session_request
Send one NDJSON request to a named session daemon and return the result.
session_sock_path
session_start
Start a session daemon. Blocks until the socket appears (≤15s).
session_stop
Stop a session daemon (SIGTERM, then SIGKILL).
sessions_dir