Extract plugin loading and marketplace logic into codex-core-plugins (#18070)

Split plugin loading, marketplace, and related infrastructure out of
core into codex-core-plugins, while keeping the core-facing
configuration and orchestration flow in codex-core.

---------

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
xl-openai
2026-04-15 23:13:17 -07:00
committed by GitHub
Unverified
parent 224dad41ac
commit 48cf3ed7b0
24 changed files with 1025 additions and 892 deletions
+8 -14
View File
@@ -6,7 +6,6 @@ use crate::config_loader::ConfigLayerStack;
use crate::config_loader::ConfigRequirements;
use crate::config_loader::ConfigRequirementsToml;
use crate::plugins::LoadedPlugin;
use crate::plugins::MarketplacePluginInstallPolicy;
use crate::plugins::PluginLoadOutcome;
use crate::plugins::marketplace_install_root;
use crate::plugins::test_support::TEST_CURATED_PLUGIN_SHA;
@@ -14,12 +13,15 @@ use crate::plugins::test_support::write_curated_plugin_sha_with as write_curated
use crate::plugins::test_support::write_file;
use crate::plugins::test_support::write_openai_curated_marketplace;
use codex_app_server_protocol::ConfigLayerSource;
use codex_config::McpServerConfig;
use codex_config::types::McpServerTransportConfig;
use codex_core_plugins::marketplace::MarketplacePluginInstallPolicy;
use codex_login::CodexAuth;
use codex_protocol::protocol::Product;
use codex_utils_absolute_path::test_support::PathBufExt;
use pretty_assertions::assert_eq;
use std::fs;
use std::path::Path;
use tempfile::TempDir;
use toml::Value;
use wiremock::Mock;
@@ -2477,14 +2479,10 @@ enabled = true
);
assert_eq!(
curated_plugin_ids_from_config_keys(configured_plugins_from_codex_home(
tmp.path(),
"failed to read user config while refreshing curated plugin cache",
"failed to parse user config while refreshing curated plugin cache",
))
.into_iter()
.map(|plugin_id| plugin_id.as_key())
.collect::<Vec<_>>(),
configured_curated_plugin_ids_from_codex_home(tmp.path())
.into_iter()
.map(|plugin_id| plugin_id.as_key())
.collect::<Vec<_>>(),
vec!["slack@openai-curated".to_string()]
);
@@ -2496,11 +2494,7 @@ plugins = true
);
assert_eq!(
curated_plugin_ids_from_config_keys(configured_plugins_from_codex_home(
tmp.path(),
"failed to read user config while refreshing curated plugin cache",
"failed to parse user config while refreshing curated plugin cache",
)),
configured_curated_plugin_ids_from_codex_home(tmp.path()),
Vec::<PluginId>::new()
);
}