Skip to main content

Module runtime

Module runtime 

Source

Structs§

ApprovalPolicy
Which callers must get a human’s approval before a high-risk tool runs. Built from approval_channels in the configuration; control chats always need approval. This is the only place that decides it.
ToolAuthContext
ToolResult

Enums§

ToolConcurrencyClass
Classification for parallel tool execution within a single agent turn.
ToolExecutionPolicy
ToolRisk
Declaration order is the risk ordering (Low < Medium < High) — the derived Ord is relied on by the tool-policy max_risk comparison.

Constants§

HIGH_RISK_APPROVED_KEY
Input marker injected after explicit operator approval so a high-risk tool (or an in-tool gate like bash dangerous patterns / sandboxed A2A peers) executes on retry. Shared across crates so a rename can’t silently desync the producers and consumers.

Traits§

Tool

Functions§

auth_context_from_input
authorize_chat_access
chat_working_dir
inject_auth_context
is_workspace_tool
Tools offered to an Agent Profile with ToolPolicy::WorkspaceWrite: everything read-only plus the tools that change files or run commands in the workspace, planning helpers and operator-configured MCP tools. Tools that reach outside the workspace (channel delivery, scheduling, A2A, media generation, skill and memory management) are excluded.
parse_concurrency_class
Parse a concurrency class from a config string.
require_high_risk_approval
require_high_risk_approval_with_policy
Like require_high_risk_approval_with_risk with an explicit policy.
require_high_risk_approval_with_risk
Like require_high_risk_approval but with the tool’s effective risk supplied by the caller — used when a registration-time override (e.g. an MCP server trust tier) replaces the name-derived risk.
resolve_tool_path
resolve_tool_working_dir
schema_object
tool_concurrency_class
Returns the concurrency class for a built-in tool. MCP tools (prefixed with mcp_) default to SideEffect. Callers may override via tool_concurrency_overrides config.
tool_execution_policy
tool_risk
validate_execution_policy
working_dir_for_context