mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Support cua_repl as a Node REPL-backed MCP server (#40257)
## What changed - Recognize `cua_repl` alongside `node_repl` when collecting Guardian review evidence, applying computer-use policy, and capturing transcript images. - Render `cua_repl.js` results with the compact REPL history and transcript views. - Preserve failed MCP call status and result content when replaying app-server history. ## Testing - Cover both REPL server names across Guardian policy, evidence, image capture, history rendering, and failed-call replay tests. GitOrigin-RevId: 8c13a721f718add403b07e727c1634b59203c51a
This commit is contained in:
1 parent
c9b19deb09
commit
2161ec272a
16 files changed
+260
-82
No files matched your search
@@ -23,6 +23,7 @@ use crate::tools::registry::PreToolUsePayload;
|
||||
use crate::tools::registry::ToolExecutor;
|
||||
use crate::tools::registry::ToolTelemetryTags;
|
||||
use codex_mcp::ToolInfo;
|
||||
use codex_protocol::mcp::is_node_repl_backed_server;
|
||||
use codex_protocol::user_input::UserInput;
|
||||
use codex_tools::ResponsesApiNamespace;
|
||||
use codex_tools::ResponsesApiNamespaceTool;
|
||||
@@ -258,7 +259,7 @@ impl CoreToolRuntime for McpHandler {
|
||||
.thread_extension_data
|
||||
.get::<NodeReplReviewEvidence>()
|
||||
.is_some_and(|evidence| evidence.image_capture_enabled());
|
||||
if self.tool_info.server_name != "node_repl"
|
||||
if !is_node_repl_backed_server(&self.tool_info.server_name)
|
||||
|| !result.success_for_logging()
|
||||
|| evidence_mode == NodeReplReviewEvidenceMode::Disabled && !image_capture_enabled
|
||||
{
|
||||
@@ -349,7 +350,10 @@ impl CoreToolRuntime for McpHandler {
|
||||
.thread_extension_data
|
||||
.get_or_init(NodeReplReviewEvidence::default)
|
||||
.record(
|
||||
self.tool_info.tool.name.as_ref(),
|
||||
&format!(
|
||||
"{}.{}",
|
||||
self.tool_info.server_name, self.tool_info.tool.name
|
||||
),
|
||||
cell_id,
|
||||
&invocation.call_id,
|
||||
items,
|
||||
|
||||
Reference in new issue
Block a user