mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Route MCP tool calls through shared approval handling (#38108)
## What changed - Represent MCP tool calls as approval actions and route them through the session-level approval flow for permission hooks, reviewer selection, rejection handling, and resolution telemetry. - Preserve MCP-specific user prompts, session and persistent approval choices, and the approval policy and reviewer captured for the tool call. ## Testing - Add coverage for permission hooks resolving MCP calls before user or automatic review, persistence choices, captured policy routing, and MCP turn metadata with strict automatic review enabled. GitOrigin-RevId: 8e134b3d17a19dc62b3b56076d2cd05a54c9f638
This commit is contained in:
1 parent
eb9dceba1a
commit
2230d64464
7 files changed
+618
-130
No files matched your search
@@ -166,6 +166,7 @@ impl McpHandler {
|
||||
session,
|
||||
step_context,
|
||||
call_id,
|
||||
tool_name,
|
||||
payload,
|
||||
..
|
||||
} = invocation;
|
||||
@@ -185,9 +186,9 @@ impl McpHandler {
|
||||
Arc::clone(&session),
|
||||
&step_context,
|
||||
call_id.clone(),
|
||||
self.tool_info.server_name.clone(),
|
||||
self.tool_info.tool.name.to_string(),
|
||||
&self.tool_info,
|
||||
self.hook_tool_name(),
|
||||
tool_name,
|
||||
payload,
|
||||
)
|
||||
.await;
|
||||
|
||||
Reference in new issue
Block a user