mirror of
https://github.com/openai/codex.git
synced 2026-09-05 15:18:41 +00:00
## Why Managed marketplace source requirements only become effective when every local marketplace mutation path applies the same admission decision. This change centralizes that decision so CLI, app-server, and external-agent migration flows cannot add, install from, or refresh a disallowed source. ## What changed - Match exact normalized Git repository URLs with an optional exact `ref`. - Match Git hosts with managed regular expressions. - Match local marketplaces by exact absolute path. - Preserve the expected path/name boundary for managed OpenAI marketplaces. - Enforce source admission during marketplace add, plugin install, and configured Git marketplace upgrade. - Continue upgrading independent marketplaces when one source is rejected and return a per-marketplace error. - Load the effective requirements stack at CLI, app-server, and external-agent migration entry points. This PR does not filter already configured marketplaces at runtime; that remains in draft follow-up #29691. ## Stack This is PR 2 of 3 and is based on #29690, which introduces the requirements data shape and merge behavior. ## Test plan - Source matcher coverage for Git URL/ref, host-pattern, local-path, and managed marketplace cases. - Marketplace add and plugin install coverage for allowed and rejected sources. - Marketplace upgrade coverage for rejection and per-marketplace continuation.
64 lines
2.4 KiB
Rust
64 lines
2.4 KiB
Rust
mod app_mcp_routing;
|
|
mod discoverable;
|
|
pub mod installed_marketplaces;
|
|
pub mod loader;
|
|
mod manager;
|
|
pub mod manifest;
|
|
pub mod marketplace;
|
|
pub mod marketplace_add;
|
|
mod marketplace_policy;
|
|
pub mod marketplace_remove;
|
|
pub mod marketplace_upgrade;
|
|
mod plugin_bundle_archive;
|
|
mod provider;
|
|
pub mod remote;
|
|
pub mod remote_bundle;
|
|
pub mod remote_legacy;
|
|
pub mod startup_sync;
|
|
pub mod store;
|
|
#[cfg(test)]
|
|
mod test_support;
|
|
pub mod toggles;
|
|
mod tool_suggest_metadata;
|
|
|
|
pub const OPENAI_CURATED_MARKETPLACE_NAME: &str = "openai-curated";
|
|
pub const OPENAI_API_CURATED_MARKETPLACE_NAME: &str = "openai-api-curated";
|
|
pub const OPENAI_BUNDLED_MARKETPLACE_NAME: &str = "openai-bundled";
|
|
pub(crate) const OPENAI_BUNDLED_ALPHA_MARKETPLACE_NAME: &str = "openai-bundled-alpha";
|
|
pub(crate) const OPENAI_PRIMARY_RUNTIME_MARKETPLACE_NAME: &str = "openai-primary-runtime";
|
|
|
|
pub fn is_openai_curated_marketplace_name(marketplace_name: &str) -> bool {
|
|
marketplace_name == OPENAI_CURATED_MARKETPLACE_NAME
|
|
|| marketplace_name == OPENAI_API_CURATED_MARKETPLACE_NAME
|
|
}
|
|
|
|
pub type LoadedPlugin = codex_plugin::LoadedPlugin<codex_config::McpServerConfig>;
|
|
pub type PluginLoadOutcome = codex_plugin::PluginLoadOutcome<codex_config::McpServerConfig>;
|
|
|
|
pub use app_mcp_routing::apps_route_available;
|
|
pub use discoverable::ToolSuggestDiscoverablePlugin;
|
|
pub use discoverable::ToolSuggestPluginDiscoveryInput;
|
|
pub use loader::PluginHookLoadOutcome;
|
|
pub use manager::ConfiguredMarketplace;
|
|
pub use manager::ConfiguredMarketplaceListOutcome;
|
|
pub use manager::ConfiguredMarketplacePlugin;
|
|
pub use manager::PluginDetail;
|
|
pub use manager::PluginDetailsUnavailableReason;
|
|
pub use manager::PluginInstallError;
|
|
pub use manager::PluginInstallOutcome;
|
|
pub use manager::PluginInstallRequest;
|
|
pub use manager::PluginListBackgroundTaskOptions;
|
|
pub use manager::PluginReadOutcome;
|
|
pub use manager::PluginReadRequest;
|
|
pub use manager::PluginUninstallError;
|
|
pub use manager::PluginsConfigInput;
|
|
pub use manager::PluginsManager;
|
|
pub use manager::RecommendedPluginCandidatesInput;
|
|
pub use marketplace_upgrade::ConfiguredMarketplaceUpgradeError as PluginMarketplaceUpgradeError;
|
|
pub use marketplace_upgrade::ConfiguredMarketplaceUpgradeOutcome as PluginMarketplaceUpgradeOutcome;
|
|
pub use provider::ExecutorPluginProvider;
|
|
pub use provider::ExecutorPluginProviderError;
|
|
pub use provider::ResolvedExecutorPlugin;
|
|
pub use remote::RecommendedPlugin;
|
|
pub use remote::RecommendedPluginsMode;
|