mirror of
https://github.com/openai/codex.git
synced 2026-11-13 06:45:07 +00:00
Honor app link settings for MCP tool approvals (#42056)
## What changed - Pass the resolved app `link_id` into MCP tool approval policy evaluation. - Apply link-specific `default_tools_approval_mode` and `approvals_reviewer` settings before app and global defaults, while preserving per-tool and managed policy precedence. ## Testing - Cover link-specific approval prompts, selected account links, reviewer routing, fallback behavior, and managed-policy overrides. GitOrigin-RevId: caa07ec3e73c87aad9522bd69808cd1c0b1686f5
This commit is contained in:
1 parent
0e37d834d4
commit
3a04482645
11 files changed
+429
-39
No files matched your search
@@ -793,6 +793,7 @@ async fn review_guardian_mcp_elicitation(
|
||||
Some(turn_context.model_info().slug.as_str()),
|
||||
request.server_name.as_str(),
|
||||
connector_id,
|
||||
/*link_id*/ None,
|
||||
) != ApprovalsReviewer::AutoReview
|
||||
|| request
|
||||
.elicitation
|
||||
@@ -877,6 +878,7 @@ async fn review_guardian_mcp_elicitation(
|
||||
Some(turn_context.model_info().slug.as_str()),
|
||||
request.server_name.as_str(),
|
||||
elicitation_connector_id(&request.elicitation),
|
||||
/*link_id*/ None,
|
||||
);
|
||||
if !crate::guardian::routes_approval_policy_to_guardian(approval_policy, approvals_reviewer) {
|
||||
return Ok(None);
|
||||
|
||||
Reference in new issue
Block a user