mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
add(core): arc_monitor (#13936)
## Summary - add ARC monitor support for MCP tool calls by serializing MCP approval requests into the ARC action shape and sending the relevant conversation/policy context to the `/api/codex/safety/arc` endpoint - route ARC outcomes back into MCP approval flow so `ask-user` falls back to a user prompt and `steer-model` blocks the tool call, with guardian/ARC tests covering the new request shape - update the TUI approval copy from “Approve Once” to “Allow” / “Allow for this session” and refresh the related snapshots --------- Co-authored-by: Fouad Matin <fouad@openai.com> Co-authored-by: Fouad Matin <169186268+fouad-openai@users.noreply.github.com>
This commit is contained in:
committed by
Michael Bolin
co-authored by
Fouad Matin
Fouad Matin
parent
b7f8e9195a
commit
f2d66fadd8
@@ -190,7 +190,7 @@ impl McpServerElicitationFormRequest {
|
||||
|| (is_tool_approval && is_empty_object_schema)
|
||||
{
|
||||
let mut options = vec![McpServerElicitationOption {
|
||||
label: "Approve Once".to_string(),
|
||||
label: "Allow".to_string(),
|
||||
description: Some("Run the tool and continue.".to_string()),
|
||||
value: Value::String(APPROVAL_ACCEPT_ONCE_VALUE.to_string()),
|
||||
}];
|
||||
@@ -201,7 +201,7 @@ impl McpServerElicitationFormRequest {
|
||||
)
|
||||
{
|
||||
options.push(McpServerElicitationOption {
|
||||
label: "Approve this session".to_string(),
|
||||
label: "Allow for this session".to_string(),
|
||||
description: Some(
|
||||
"Run the tool and remember this choice for this session.".to_string(),
|
||||
),
|
||||
@@ -1601,7 +1601,7 @@ mod tests {
|
||||
input: McpServerElicitationFieldInput::Select {
|
||||
options: vec![
|
||||
McpServerElicitationOption {
|
||||
label: "Approve Once".to_string(),
|
||||
label: "Allow".to_string(),
|
||||
description: Some("Run the tool and continue.".to_string()),
|
||||
value: Value::String(APPROVAL_ACCEPT_ONCE_VALUE.to_string()),
|
||||
},
|
||||
@@ -1654,7 +1654,7 @@ mod tests {
|
||||
input: McpServerElicitationFieldInput::Select {
|
||||
options: vec![
|
||||
McpServerElicitationOption {
|
||||
label: "Approve Once".to_string(),
|
||||
label: "Allow".to_string(),
|
||||
description: Some("Run the tool and continue.".to_string()),
|
||||
value: Value::String(APPROVAL_ACCEPT_ONCE_VALUE.to_string()),
|
||||
},
|
||||
|
||||
+4
-4
@@ -5,10 +5,10 @@ expression: "render_snapshot(&overlay, Rect::new(0, 0, 120, 16))"
|
||||
|
||||
Field 1/1
|
||||
Allow this request?
|
||||
› 1. Approve Once Run the tool and continue.
|
||||
2. Approve this session Run the tool and remember this choice for this session.
|
||||
3. Always allow Run the tool and remember this choice for future tool calls.
|
||||
4. Cancel Cancel this tool call
|
||||
› 1. Allow Run the tool and continue.
|
||||
2. Allow for this session Run the tool and remember this choice for this session.
|
||||
3. Always allow Run the tool and remember this choice for future tool calls.
|
||||
4. Cancel Cancel this tool call
|
||||
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@ expression: "render_snapshot(&overlay, Rect::new(0, 0, 120, 16))"
|
||||
|
||||
Field 1/1
|
||||
Allow this request?
|
||||
› 1. Approve Once Run the tool and continue.
|
||||
2. Cancel Cancel this tool call
|
||||
› 1. Allow Run the tool and continue.
|
||||
2. Cancel Cancel this tool call
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user