Skip to main content

Module daemon

Module daemon 

Source
Expand description

Daemon runtime (axum + tonic + rmcp + SSE). Pulled in transitively by depending on this crate; reach individual pieces under post_cortex::daemon::*. The pcx CLI binary is shipped by post-cortex-daemon directly via its [[bin]] entry — depend on that crate (not this facade) if you only want to run the daemon. HTTP daemon server for multi-client access to Post-Cortex

Provides lock-free HTTP/SSE transport for MCP JSON-RPC, enabling multiple Claude Code instances to share a single RocksDB instance.

Modules§

coerce
Type coercion and validation for MCP tool parameters.
config
Daemon configuration file support
format_helpers
Formatting helpers for MCP tool results
grpc_service
gRPC service for Post-Cortex.
mcp_service
Post-Cortex MCP Service — consolidated 9-tool API.
observability
Observability — tracing layer stack + (feature-gated) OpenTelemetry OTLP exporter wiring.
rmcp_server
RMCP-based SSE Server for Post-Cortex daemon
server
Lock-free HTTP daemon server.
sse
Lock-free Server-Sent Events (SSE) broadcaster
stdio_proxy
stdio-to-daemon proxy with auto-start capability
validate
Custom validation layer for MCP tool parameters.

Structs§

DaemonConfig
Daemon configuration loaded from file and environment
DaemonServer
Lock-free daemon server
PostCortexService
Post-Cortex MCP Service
SSEBroadcaster
Lock-free SSE broadcaster using DashMap

Enums§

TracingInitError
Errors raised by init.

Functions§

ensure_daemon_running
Ensure daemon is running, starting it if necessary
init_observability
Initialise the global tracing subscriber.
is_daemon_running
Check if daemon is running by attempting TCP connection
run_stdio_proxy
Run stdio proxy mode - bridges stdin/stdout to daemon via Streamable HTTP
shutdown_observability
Flush pending spans + metrics, then shut down the OTel SDK.
start_grpc_server
Start the gRPC server on the given port. Returns a future that runs until cancelled.
start_rmcp_daemon
Start RMCP-based SSE server