mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
c73296a0f0
## What changed - retain the parsed plugin manifest namespace on loaded plugins - carry that namespace through `PluginSkillRoot` and `SkillRoot` - use the provided namespace when qualifying plugin skill names - include the namespace in the skills cache key ## Why Plugin loading has already parsed `plugin.json`, but skill parsing currently walks every `SKILL.md` ancestor and probes/reads the manifest again to reconstruct the same namespace. Passing the parsed namespace removes those repeated filesystem calls, which are particularly costly on remote filesystems. Context: https://openai.slack.com/archives/C0ARA9GF5D4/p1781639496496439?thread_ts=1781202444.891669&cid=C0ARA9GF5D4 ## Impact Plugin skill names remain unchanged. A regression test uses a deliberately different on-disk manifest name to verify that plugin roots use the provided parsed namespace. ## Validation - `just test -p codex-core-skills -p codex-core-plugins -p codex-plugin -p codex-utils-plugins` (352 passed) - `just fix -p codex-core-skills -p codex-core-plugins -p codex-plugin -p codex-utils-plugins` - `just fmt`
21 lines
617 B
Rust
21 lines
617 B
Rust
//! Plugin path resolution, plaintext mention sigils, and MCP connector helpers shared across Codex
|
|
//! crates.
|
|
|
|
use codex_utils_absolute_path::AbsolutePathBuf;
|
|
|
|
pub mod mcp_connector;
|
|
pub mod mention_syntax;
|
|
pub mod plugin_namespace;
|
|
|
|
pub use plugin_namespace::DISCOVERABLE_PLUGIN_MANIFEST_PATHS;
|
|
pub use plugin_namespace::find_plugin_manifest_path;
|
|
pub use plugin_namespace::plugin_namespace_for_skill_path;
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
|
pub struct PluginSkillRoot {
|
|
pub path: AbsolutePathBuf,
|
|
pub plugin_id: String,
|
|
pub plugin_namespace: String,
|
|
pub plugin_root: AbsolutePathBuf,
|
|
}
|