Added
- Function-based auto-approval system for MCP tool calls (#173)
auto_approve
can now be a function that receives tool call parameters- Function receives
server_name
,tool_name
,arguments
,action
,uri
, andis_auto_approved_in_server
- Return
true
to approve,false
to prompt, orstring
to deny with custom error message - Enables sophisticated approval logic based on tool arguments and context
- Backward compatible with existing boolean and server-level configuration
Changed
- Breaking: Removed automatic
vim.g.codecompanion_auto_tool_mode
checking in CodeCompanion integration- Users can achieve the same behavior by checking this variable in their custom
auto_approve
function - Simplifies auto-approval logic and removes plugin-specific dependencies
- Users can achieve the same behavior by checking this variable in their custom
- Refactored extension system for better modularity and type safety
- Updated auto-approval priority: function-based → server config → user prompt
- Enhanced hub startup logic with better state management and restart handling
Documentation
- Added comprehensive function-based auto-approval examples and parameter documentation
- Updated integration guides for Avante and CodeCompanion with new auto-approval patterns
- Added real-world examples for GitHub access control and project-scoped operations