Skip to main content

Module agent_only

Module agent_only 

Source
Expand description

Routes that act for an agent (its jobs and its work queue) are served only to a request that carries an agent’s token, and the agent a request names (agent_id, created_by, agent) has to be the one that token belongs to. The handlers used to take the acting agent from those body fields, or record the action as the operator’s when there was no token. The window reaches the same state over its RPC socket, not these routes.

Constants§

MAX_BODY 🔒
More than any task or job a route here takes; a bigger body is refused unread.

Functions§

named_actors 🔒
The agent names a JSON body gives as the one acting (agent is what claims and posts call it).
refuse 🔒
require_agent_token 🔒
Layered inside caller_middleware: refuses a request that isn’t Caller::Agent, or that names another agent than its token’s as the one acting.