runtime
runtime
¶
Shared helpers for securing agent and direct tool execution paths.
Functions¶
agent_security_kwargs
¶
agent_security_kwargs(agent_cls: Any, *, capability_policy: Any = None, rate_limiter: Any = None, agent_id: str = '') -> Dict[str, Any]
Build supported tool-security kwargs for an agent constructor.
Plain agents do not own a ToolExecutor, so passing tool-only security
kwargs to them is both ineffective and constructor-breaking. Tool-capable
agents receive only the kwargs their constructor explicitly supports (or
accepts via **kwargs); :func:wire_agent_security is the final backstop
for custom tool agents that construct an executor without exposing those
parameters.
Source code in src/openjarvis/security/runtime.py
wire_agent_security
¶
wire_agent_security(agent: Any, *, bus: Any = None, capability_policy: Any = None, rate_limiter: Any = None, agent_id: str = '', overwrite: bool = True, synchronize_runtime_cache: bool = False) -> None
Wire runtime security into an already-created agent and executor.
Source code in src/openjarvis/security/runtime.py
execute_secured_tool
¶
execute_secured_tool(tool: Any, params: Dict[str, Any], *, bus: Any = None, capability_policy: Any = None, rate_limiter: Any = None, agent_id: str)
Run one direct operation through the canonical ToolExecutor gates.
Source code in src/openjarvis/security/runtime.py
authorize_secured_operation
¶
authorize_secured_operation(operation: str, required_capabilities: Iterable[str], *, bus: Any = None, capability_policy: Any = None, rate_limiter: Any = None, agent_id: str)
Authorize one non-BaseTool operation through standard gates.