mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
### Summary * Added `mcpServer/refresh` command to inform app servers and active threads to refresh mcpServer on next turn event. * Added `pending_mcp_server_refresh_config` to codex core so that if the value is populated, we reinitialize the mcp server manager on the thread level. * The config is updated on `mcpServer/refresh` command which we iterate through threads and provide with the latest config value after last write.
34 lines
1.3 KiB
Rust
34 lines
1.3 KiB
Rust
use std::sync::Arc;
|
|
|
|
use crate::AuthManager;
|
|
use crate::RolloutRecorder;
|
|
use crate::agent::AgentControl;
|
|
use crate::exec_policy::ExecPolicyManager;
|
|
use crate::mcp_connection_manager::McpConnectionManager;
|
|
use crate::models_manager::manager::ModelsManager;
|
|
use crate::skills::SkillsManager;
|
|
use crate::tools::sandboxing::ApprovalStore;
|
|
use crate::unified_exec::UnifiedExecProcessManager;
|
|
use crate::user_notification::UserNotifier;
|
|
use codex_otel::OtelManager;
|
|
use tokio::sync::Mutex;
|
|
use tokio::sync::RwLock;
|
|
use tokio_util::sync::CancellationToken;
|
|
|
|
pub(crate) struct SessionServices {
|
|
pub(crate) mcp_connection_manager: Arc<RwLock<McpConnectionManager>>,
|
|
pub(crate) mcp_startup_cancellation_token: Mutex<CancellationToken>,
|
|
pub(crate) unified_exec_manager: UnifiedExecProcessManager,
|
|
pub(crate) notifier: UserNotifier,
|
|
pub(crate) rollout: Mutex<Option<RolloutRecorder>>,
|
|
pub(crate) user_shell: Arc<crate::shell::Shell>,
|
|
pub(crate) show_raw_agent_reasoning: bool,
|
|
pub(crate) exec_policy: ExecPolicyManager,
|
|
pub(crate) auth_manager: Arc<AuthManager>,
|
|
pub(crate) models_manager: Arc<ModelsManager>,
|
|
pub(crate) otel_manager: OtelManager,
|
|
pub(crate) tool_approvals: Mutex<ApprovalStore>,
|
|
pub(crate) skills_manager: Arc<SkillsManager>,
|
|
pub(crate) agent_control: AgentControl,
|
|
}
|