Skip to main content

Module daemon_client

Module daemon_client 

Source

Functions§

daemon_health_check
Check if the daemon is reachable by hitting /health.
daemon_request
Send an HTTP request to the daemon over the IPC channel. Returns the response body as a string.
daemon_tool_call
Call a tool on the daemon’s REST API.
notify_cache_clear
Tell a running daemon to drop its in-memory read cache (SessionCache). Returns true if a daemon was reached. Never auto-starts a daemon — if none is running there is no cache to flush. Force-rebuild CLI commands call this so ctx_read map/signatures stop serving pre-rebuild output from the daemon’s long-lived cache, which CLI index rebuilds otherwise can’t reach (#420).
try_cache_check_blocking
Check the daemon’s generalized cross-agent cache (all DeliveryKinds). Returns the cached entry on hit, None on miss or daemon unreachable.
try_cache_record_blocking
Record a generalized cache entry via daemon IPC. Fire-and-forget.
try_daemon_request
Attempt to connect to the daemon. Returns None if not running.
try_daemon_tool_call_blocking
Blocking helper for CLI commands: routes a tool call through the daemon.
try_daemon_tool_call_blocking_text
Like try_daemon_tool_call_blocking, but unwraps MCP JSON responses to text for CLI output.
try_delivery_check_blocking
Check the daemon’s cross-agent delivery registry for a content hash. Returns None if daemon unreachable or no hit. Connect-only — never auto-starts a daemon (delivery is best-effort).
try_delivery_record_blocking
Record a delivery in the daemon’s cross-agent registry. Fire-and-forget: errors and slow daemon responses are intentionally dropped.