[codex] List marketplaces considered by plugin discovery

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Casey Chow
2026-05-20 19:17:46 -04:00
committed by GitHub
co-authored by Codex
parent 8253ae4e5c
commit 60b45d92d9
5 changed files with 388 additions and 79 deletions
+14 -1
View File
@@ -22,6 +22,7 @@ use crate::manifest::load_plugin_manifest;
use crate::marketplace::MarketplaceError;
use crate::marketplace::MarketplaceInterface;
use crate::marketplace::MarketplaceListError;
use crate::marketplace::MarketplaceListOutcome;
use crate::marketplace::MarketplacePluginAuthPolicy;
use crate::marketplace::MarketplacePluginPolicy;
use crate::marketplace::MarketplacePluginSource;
@@ -1208,7 +1209,7 @@ impl PluginsManager {
let (installed_plugins, enabled_plugins) = self.configured_plugin_states(config);
let marketplace_outcome =
list_marketplaces(&self.marketplace_roots(config, additional_roots))?;
self.discover_marketplaces_for_config(config, additional_roots)?;
let mut seen_plugin_keys = HashSet::new();
let marketplaces = marketplace_outcome
.marketplaces
@@ -1286,6 +1287,18 @@ impl PluginsManager {
})
}
pub fn discover_marketplaces_for_config(
&self,
config: &PluginsConfigInput,
additional_roots: &[AbsolutePathBuf],
) -> Result<MarketplaceListOutcome, MarketplaceError> {
if !config.plugins_enabled {
return Ok(MarketplaceListOutcome::default());
}
list_marketplaces(&self.marketplace_roots(config, additional_roots))
}
pub async fn read_plugin_for_config(
&self,
config: &PluginsConfigInput,
+2 -1
View File
@@ -698,7 +698,8 @@ pub fn plugin_interface_with_marketplace_category(
interface
}
fn marketplace_root_dir(
#[doc(hidden)]
pub fn marketplace_root_dir(
marketplace_path: &AbsolutePathBuf,
) -> Result<AbsolutePathBuf, MarketplaceError> {
for relative_path in MARKETPLACE_MANIFEST_RELATIVE_PATHS {