Files
codex/codex-rs/protocol/src/lib.rs
T
andrewgu-oai 7a5860da35 Add hook configuration to environment attachments (#56302)
## What changed

- Add `environment_hooks` to `EnvironmentConfig` for hooks from an environment's effective managed requirements. Initialize it empty for inferred thread configurations and report the handler count in debug output.
- Move `HookEventsToml`, `MatcherGroup`, and `HookHandlerConfig` into `codex_protocol::hooks`, with re-exports from `codex_config::hook_config`.
- Validate MCP hook input recursively to reject nulls and integers outside the signed 64-bit range without converting through `toml::Value`.

GitOrigin-RevId: 410506c8e2b89c9519c81d86b44ccd760d751693
2026-10-23 00:02:29 +00:00

60 lines
1.5 KiB
Rust

pub mod account;
mod agent_path;
pub mod auth;
mod response_item_id;
mod response_usage;
mod sanitized_git_url;
mod session_id;
mod thread_id;
mod tool_name;
pub use agent_path::AgentPath;
pub use permission_profile_intersection::PermissionIntersectionError;
pub use permission_profile_intersection::intersect_effective_permission_profiles;
pub use response_item_id::ResponseItemId;
pub use response_usage::ResponseUsageMetadata;
pub use sanitized_git_url::SanitizedGitUrl;
pub use session_id::SessionId;
pub use thread_id::RolloutId;
pub use thread_id::ThreadId;
pub use tool_name::DEFAULT_FUNCTION_NAMESPACE;
pub use tool_name::ToolName;
pub mod approvals;
pub mod capabilities;
mod codex_error_info;
pub mod config_types;
mod guardian_transcript;
pub use guardian_transcript::TranscriptFormat;
pub mod dynamic_tools;
mod environment;
pub mod error;
pub mod exec_output;
pub mod hooks;
pub mod items;
mod legacy_events;
pub mod local_media;
pub mod mcp;
pub mod mcp_approval_meta;
pub mod mcp_policy;
pub mod memory_citation;
mod memory_version;
pub use memory_version::MemoryVersion;
pub mod models;
pub mod network_policy;
pub mod num_format;
pub mod openai_models;
pub mod parse_command;
mod permission_profile_intersection;
mod permission_profile_snapshot;
pub mod permissions;
pub mod plan_tool;
pub mod protocol;
pub mod realtime;
pub mod request_permissions;
pub mod request_user_input;
pub mod review_format;
pub mod sandbox;
pub mod security_risk;
pub mod shell_environment;
pub mod turn_input;
pub mod user_input;