mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Honor thread-level plugin exclusions across runtime capabilities (#44655)
## What changed - Apply `disabled_plugin_ids` to plugin skills, recommendations, hooks, and MCP servers without modifying shared plugin state. - Activate selection changes when the next task starts, keeping pending settings from changing the active runtime. - Hide app tools contributed only by disabled plugins from model tool catalogs and search. Preserve connectors shared with enabled plugins and existing direct Apps RPC behavior. - Include plugin identity in MCP approval keys and use that identity when persisting plugin tool approvals. ## Testing Add regression coverage for disabling and re-enabling plugin skills and tools, deferred activation of settings, shared connector ownership, selected plugin servers, executor hooks, and plugin-specific approval keys and persistence. GitOrigin-RevId: 1153ff6aa7ab6953d50e838da05203904ecd2956
This commit is contained in:
1 parent
5c94936b56
commit
8570091e14
27 files changed
+565
-171
No files matched your search
@@ -28,6 +28,7 @@ pub(super) struct McpDesiredState {
|
||||
pub(super) session_source: SessionSource,
|
||||
pub(super) environments: TurnEnvironmentSnapshot,
|
||||
pub(super) local_process_cwd: PathBuf,
|
||||
pub(super) disabled_plugin_ids: Vec<String>,
|
||||
}
|
||||
|
||||
impl Session {
|
||||
@@ -75,9 +76,12 @@ impl Session {
|
||||
&self,
|
||||
auth: Option<CodexAuth>,
|
||||
) -> McpDesiredState {
|
||||
let session_configuration = {
|
||||
let (session_configuration, disabled_plugin_ids) = {
|
||||
let state = self.state.lock().await;
|
||||
state.session_configuration.clone()
|
||||
(
|
||||
state.session_configuration.clone(),
|
||||
state.active_disabled_plugin_ids.clone(),
|
||||
)
|
||||
};
|
||||
let environments = self.services.turn_environments.snapshot().await;
|
||||
let cwd = environments
|
||||
@@ -98,6 +102,7 @@ impl Session {
|
||||
session_source: session_configuration.session_source.clone(),
|
||||
environments,
|
||||
local_process_cwd,
|
||||
disabled_plugin_ids,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,6 +129,7 @@ impl Session {
|
||||
session_source: session_configuration.session_source.clone(),
|
||||
environments: resolved_environments.clone(),
|
||||
local_process_cwd,
|
||||
disabled_plugin_ids: session_configuration.disabled_plugin_ids.clone(),
|
||||
};
|
||||
self.publish_mcp_runtime(
|
||||
&desired,
|
||||
|
||||
Reference in new issue
Block a user