Expand description
Tool policy management system
This module manages user preferences for tool usage, storing choices in
the canonical user config directory’s tool-policy.json to minimize repeated prompts while maintaining
user control overwhich tools the agent can use.
Structs§
- Alternative
Args Policy - Arguments policy in alternative format
- Alternative
Default Policy - Default policy in alternative format
- Alternative
Tool Policy - Tool policy in alternative format
- Alternative
Tool Policy Config - Alternative tool policy configuration format (user’s format)
- Approval
Cache Config - Persisted approval cache stored alongside tool policies
- McpPolicy
Store - Stored MCP policy state, persisted alongside standard tool policies
- McpProvider
Policy - MCP provider policy entry containing per-tool permissions
- Tool
Constraints - Scoped, optional constraints for a tool to align with safe defaults
- Tool
Policy Config - Tool policy configuration stored in the canonical user config directory.
- Tool
Policy Manager - Tool policy manager
Enums§
- Tool
Execution Decision - Decision result for tool execution
- Tool
Policy - Tool execution policy
Constants§
- APPROVAL_
CACHE_ MAX_ ENTRIES - Maximum remembered approval entries per cache collection. Unbounded growth
turned
tool-policy.jsoninto a multi-hundred-kilobyte file after a few long sessions (see session-vtcode-20260925T234343Z: 294 KB). Oldest insertions are dropped first so recent approvals survive.
Traits§
- Permission
Prompt Handler - Handler for tool permission prompts