Skip to main content

Module mcp_health_meta

Module mcp_health_meta 

Source
Expand description

The agent MCP self-heal’s state on the pane’s block (agent:mcp_health), for the surfaces that show a row per agent without opening its pane: the Swarm (docs/specs/SPEC_AGENT_MCP_SELF_HEAL_2026_10_10.md §4.2). { "state": "healing" | "restarting" | "gave_up", "step", "at" } while the agent’s AgentMux tools are down or being repaired; the key is removed when they are back. The CLI’s error text is not stored here: it is untrusted and the pane row already shows it.

Constants§

META_KEY
The block meta key.

Functions§

clear
The tools are connected: remove the key if it is set. Called when a process reports the server connected, which for a process started fresh produces no notice (nothing was being repaired for it), so a key left by an earlier process, a stopped agent or an srv restart is not left to show.
meta_value
What notice puts under META_KEY: the state while the tools are down, Null (the key removed) once they are back. at is when this state began.
persist
Store notice’s state on block_id and tell the open windows. Nothing when it would change nothing (a retry of the same state, or ok with no key to remove).