Skip to main content

Module mcp_actor

Module mcp_actor 

Source
Expand description

Who may add, change, bind, unbind or probe an MCP server whose command would start on this computer.

A catalog (global) server is usually a host command, and a probe starts a stored server’s command on this computer whoever asked. A container agent starts only what runs in its container, so these commands refuse one. A container agent’s own private row (mcp.upsert, mcp.delete, mcp.bind, mcp.unbind: always its own, by check_s1) starts in its container and is not refused. Every call that asks is recorded with the actor it came from; a host agent, the window and a connection that proved nothing are not refused. A connection registered as an agent whose runtime can’t be told (the id doesn’t resolve, is ambiguous, has no definition, or the store can’t be read) is refused like a container agent’s.

Constants§

REFUSAL 🔒
What a container agent is told when one of these commands is refused it.
UNKNOWN_REFUSAL 🔒
What an agent whose runtime can’t be told is refused with.

Functions§

catalog_server_runs_only_in_containers 🔒
Whether a catalog server starts only in containers: it reaches container agents and no host agent by reach (McpServerReach), and every agent it is bound to runs in a container. A server bound to no one, to an agent whose runtime can’t be told, or that reaches every agent, is not.
refuse_container_agent 🔒
Err with REFUSAL when ctx is a connection of a container agent, and with UNKNOWN_REFUSAL when it is an agent’s whose runtime can’t be told; otherwise records the actor and goes on.
runs_in_a_container 🔒
Whether the agent connected as id runs in a container: None when that can’t be told.