plugins.agent_sudo
Agent_Sudo plugin helpers.
This module exposes a simple function hook callable from tool_hooks:
function: agent_runtimes.plugins.agent_sudo:authorize_tool_call
authorize_tool_call
def authorize_tool_call(
request_payload: dict[str, Any],
*,
endpoint: str | None = None,
timeout_seconds: float = 5.0,
fallback_decision: str = "approval_required") -> dict[str, Any]
Authorize a tool call via Agent_Sudo-compatible endpoint.
Returns a dict with decision in:
- allow
- deny
- approval_required
- delegated_allow
authorize_tool_call_local
def authorize_tool_call_local(request_payload: dict[str, Any],
gateway: Any) -> dict[str, Any]
In-process tool authorization gateway for local Agent_Sudo policies.