mirror of
https://github.com/openai/codex.git
synced 2026-05-15 08:42:34 +00:00
# Motivation Browser Use origin-access prompts are MCP elicitations, not direct tool-call approval prompts, so they were bypassing the Guardian approval path. We need a generic opt-in that lets eligible MCP elicitations use Guardian when the current turn already routes approvals there. # Description Add a generic elicitation reviewer hook in codex-mcp and wire codex-core to pass a Guardian reviewer callback when creating the MCP connection manager. The reviewer validates explicit mcp_tool_call opt-in metadata, builds a Guardian MCP tool-call review request from server/tool/connector metadata and tool params, and maps Guardian approval, denial, timeout, and cancellation decisions back to MCP elicitation responses. The new option to trigger this in the `_meta` object is: ``` "codex_request_type": "approval_request", ``` # Testing - RUST_MIN_STACK=8388608 NEXTEST_STATUS_LEVEL=leak cargo nextest run --no-fail-fast --cargo-profile ci-test --test-threads 2 - cargo clippy --tests -- -D warnings - cargo fmt -- --config imports_granularity=Item --check - cargo shear - pnpm run format - python3 .github/scripts/verify_cargo_workspace_manifests.py - python3 .github/scripts/verify_tui_core_boundary.py - python3 .github/scripts/verify_bazel_clippy_lints.py - git diff --check
32 lines
661 B
Rust
32 lines
661 B
Rust
pub mod account;
|
|
mod agent_path;
|
|
pub mod auth;
|
|
mod session_id;
|
|
mod thread_id;
|
|
mod tool_name;
|
|
pub use agent_path::AgentPath;
|
|
pub use session_id::SessionId;
|
|
pub use thread_id::ThreadId;
|
|
pub use tool_name::ToolName;
|
|
pub mod approvals;
|
|
pub mod config_types;
|
|
pub mod dynamic_tools;
|
|
pub mod error;
|
|
pub mod exec_output;
|
|
pub mod items;
|
|
pub mod mcp;
|
|
pub mod mcp_approval_meta;
|
|
pub mod memory_citation;
|
|
pub mod models;
|
|
pub mod network_policy;
|
|
pub mod num_format;
|
|
pub mod openai_models;
|
|
pub mod parse_command;
|
|
pub mod permissions;
|
|
pub mod plan_tool;
|
|
pub mod protocol;
|
|
pub mod request_permissions;
|
|
pub mod request_user_input;
|
|
pub mod shell_environment;
|
|
pub mod user_input;
|