Skip to main content

Module http_health

Module http_health 

Source
Expand description

Health, diagnostics, LAN instances, discovery, WPS publish. Split out of server/mod.rs unchanged (SPEC_LARGE_FILE_MODULE_ANALYSIS_2026_09_30.md §4.1).

Functions§

handle_diag_sagas 🔒
Saga durability PR 2 — operator visibility into the durable saga log. Returns the most-recent 50 saga lifecycle rows + an in-flight count derived from unresolved_sagas.
handle_discovery 🔒
GET /agentmux/discovery — a unified, agent-facing view of what exists and what is reachable across the muxbus delivery tiers, so an agent can resolve a target before sending. Aggregates:
handle_lan_instances 🔒
handle_wps_publish 🔒
Auth-gated MPS publish endpoint (SPEC_STREAMING_BASH_RUNNER_2026_05_11.md §3.2). agentmux-bashwrap POSTs here while running a Bash command; we forward to the in-process MPS broker so subscribed frontends receive the event. A client event declared in mps_events (client_events!) must carry its payload type, or it is refused with 400; any other event mps_events declares is srv’s alone, and refused with 400.
health_handler 🔒
status is ok, or degraded when the messaging path is stuck or srv is panicking in bulk (messaging_health). The HTTP status stays 200 either way: agentmux’s health_ok reads anything else as “no server here”.
listed_name 🔒
The name a host agent is listed under: its row’s, else its definition’s.
stub_501 🔒
unreadable_records 🔒
The agent records on this host that this build cannot read (a newer AgentMux wrote them, or the file is damaged), each with why: they are on disk and kept exactly as they are, but they are not in agents, and an agent that does not appear is a question nobody can answer. kind says which record it is (definition or instance).