Skip to main content

http_addr_path

Function http_addr_path 

Source
pub fn http_addr_path() -> Option<PathBuf>
Expand description

Path to the canonical address-discovery file for the trusty-memory daemon.

Why: clients (CLI, MCP tools, dashboards) need to find the running daemon without configuration when the port was selected dynamically. Using trusty_common::resolve_data_dir aligns this path with the location that trusty_common::read_daemon_addr("trusty-memory") reads from, so prompt-context, doctor, and start’s probe all find the running daemon. The old ~/.trusty-memory/http_addr path and the new ~/Library/Application Support/trusty-memory/http_addr (macOS) path were divergent — the daemon wrote one; readers expected the other. What: returns {resolve_data_dir("trusty-memory")}/http_addr, or None if the data dir cannot be resolved (locked-down container, no passwd entry). Test: http_addr_path_uses_resolve_data_dir.