Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codex-rs/app-server/src/skills_watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl SkillsWatcher {
.await
.into_iter()
.map(|root| WatchPath {
path: root.path.into_path_buf(),
path: root.path.path().to_path_buf(),
recursive: true,
})
.collect();
Expand Down
14 changes: 7 additions & 7 deletions codex-rs/core-plugins/src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use codex_core_skills::config_rules::resolve_disabled_skill_paths;
use codex_core_skills::config_rules::skill_config_rules_from_stack;
use codex_core_skills::loader::SkillRoot;
use codex_core_skills::loader::load_skills_from_roots;
use codex_exec_server::LOCAL_FS;
use codex_exec_server::EnvironmentPathRef;
use codex_plugin::AppConnectorId;
use codex_plugin::LoadedPlugin;
use codex_plugin::PluginCapabilitySummary;
Expand All @@ -40,7 +40,6 @@ use std::collections::HashSet;
use std::fs;
use std::path::Path;
use std::process::Command;
use std::sync::Arc;
use tempfile::TempDir;
use tracing::warn;

Expand Down Expand Up @@ -564,8 +563,10 @@ async fn load_plugin(
.or_else(|| Some(manifest.name.clone()));
loaded_plugin.manifest_description = manifest.description.clone();
loaded_plugin.skill_roots = plugin_skill_roots(&plugin_root, manifest_paths);
// TODO: Support multi-env plugin skill loading. Plugin discovery is local-only today, so bind
// plugin skill reads to the local environment instead of the selected turn environment.
let resolved_skills = load_plugin_skills(
&plugin_root,
EnvironmentPathRef::local(plugin_root.clone()),
&loaded_plugin_id,
manifest_paths,
restriction_product,
Expand Down Expand Up @@ -642,18 +643,17 @@ impl ResolvedPluginSkills {
}

pub async fn load_plugin_skills(
plugin_root: &AbsolutePathBuf,
plugin_root: EnvironmentPathRef,
plugin_id: &PluginId,
manifest_paths: &PluginManifestPaths,
restriction_product: Option<Product>,
skill_config_rules: &SkillConfigRules,
) -> ResolvedPluginSkills {
let roots = plugin_skill_roots(plugin_root, manifest_paths)
let roots = plugin_skill_roots(plugin_root.path(), manifest_paths)
.into_iter()
.map(|path| SkillRoot {
path,
path: plugin_root.with_path(path),
scope: SkillScope::User,
file_system: Arc::clone(&LOCAL_FS),
plugin_id: Some(plugin_id.as_key()),
plugin_root: Some(plugin_root.clone()),
})
Expand Down
4 changes: 3 additions & 1 deletion codex-rs/core-plugins/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1419,8 +1419,10 @@ impl PluginsManager {
manifest.interface.clone(),
marketplace_category,
);
// TODO: Support multi-env plugin skill loading. Marketplace plugins are installed and
// scanned locally today, so bind plugin skill reads to the local environment.
let resolved_skills = load_plugin_skills(
&source_path,
codex_exec_server::EnvironmentPathRef::local(source_path.clone()),
&plugin_id,
&manifest.paths,
self.restriction_product,
Expand Down
Loading
Loading