LibreChat/client/src
Aron Gates 301ba801f4
feat: implement tool approval checks for agent tool calls
Ports the tool approval feature from aron/tool-approval branch onto the
latest codebase. Adds manual user approval flow for tool calls before
execution, configurable via librechat.yaml toolApproval config.

Key changes:
- Add TToolApproval schema to data-provider config (required/excluded patterns)
- Add approval.ts utilities (requiresApproval, matchesPattern, getToolServerName)
- Add MCPToolCallValidationHandler for flow-based approval via FlowStateManager
- Wrap non-MCP tools with approval in ToolService.loadAgentTools
- Add MCP tool validation in MCP.js createToolInstance
- Handle native Anthropic web search approval in callbacks.js
- Disable native web_search when approval required (OpenAI initialize)
- Add validation SSE delta handling in useStepHandler
- Add approve/reject UI in ToolCall.tsx with confirm/reject API calls
- Add validation routes: POST /api/mcp/validation/confirm|reject/:id
- Add i18n keys for approval UI
- Add toolApproval example config in librechat.example.yaml

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 11:22:27 +01:00
..
@types 🧩 feat: Redesign Tool Call UI with Contextual Icons, Smart Grouping, and Rich Output Rendering (#12163) 2026-03-25 12:31:39 -04:00
a11y ⚗️ feat: Agent Context Compaction/Summarization (#12287) 2026-03-21 14:28:56 -04:00
common 🪢 refactor: Eliminate Unnecessary Re-renders During Message Streaming (#12454) 2026-03-29 17:05:12 -04:00
components feat: implement tool approval checks for agent tool calls 2026-04-03 11:22:27 +01:00
constants 🔐 feat: Granular Role-based Permissions + Entra ID Group Discovery (#7804) 2025-08-13 16:24:17 -04:00
data-provider 🔑 fix: Auth-Aware Startup Config Caching for Fresh Sessions (#12505) 2026-04-01 17:20:39 -04:00
hooks feat: implement tool approval checks for agent tool calls 2026-04-03 11:22:27 +01:00
locales feat: implement tool approval checks for agent tool calls 2026-04-03 11:22:27 +01:00
Providers 🪝 fix: Safe Hook Fallbacks for Tool-Call Components in Search Route (#12423) 2026-03-26 16:40:37 -04:00
routes 📁 refactor: Prompts UI (#11570) 2026-03-22 16:56:22 -04:00
store 🧩 feat: Redesign Tool Call UI with Contextual Icons, Smart Grouping, and Rich Output Rendering (#12163) 2026-03-25 12:31:39 -04:00
utils 🏖️ fix: Sandpack ExternalResources for Static HTML Artifact Previews (#12509) 2026-04-01 22:06:42 -04:00
App.jsx 🛜 feat: Enable Network Requests in Offline Mode (#11107) 2025-12-26 09:01:27 -05:00
main.jsx 🎨 feat: add copy-tex to improve copying KaTeX (#7308) 2025-05-15 12:08:47 -04:00
mobile.css 🎨 refactor: Redesign Sidebar with Unified Icon Strip Layout (#12013) 2026-03-22 01:15:20 -04:00
style.css 🧩 feat: Redesign Tool Call UI with Contextual Icons, Smart Grouping, and Rich Output Rendering (#12163) 2026-03-25 12:31:39 -04:00
vite-env.d.ts 🖱️ fix: Message Scrolling UX; refactor: Frontend UX/DX Optimizations (#3733) 2024-08-21 18:18:45 -04:00