Skip to main content

Module agent_config_guard

Module agent_config_guard 

Source
Expand description

Who writeagentconfig may write for. The AgentMux window, proven by its host, writes any agent’s launch files; a connection registered as an agent (bus:register) writes only its own, into its own workspace; any other connection writes nothing. The file lands where the caller says and the .mcp.json it carries signs as the named agent, so without this an agent could drop files into another agent’s workspace or into any folder it can name. That includes an agent that never registers: every agent holds the instance auth key, which opens a connection that is neither the window nor an agent. A leader’s edit of another agent’s definition goes through the definition API (which records who made it), not through this raw write.

Functions§

check_agent_config_write 🔒
Ok if ctx may write cmd_agent_id’s launch files into working_dir: the proven window anywhere, an agent only its own workspace, an unproven connection nowhere.
expand 🔒