pub struct AgentPlugin { /* private fields */ }Expand description
A validated Agent Plugins package and its discovered portable assets.
Implementations§
Source§impl AgentPlugin
impl AgentPlugin
Sourcepub fn load(root: impl Into<PathBuf>) -> Result<Self, PluginError>
pub fn load(root: impl Into<PathBuf>) -> Result<Self, PluginError>
Load an Agent Plugins package from a directory.
Manifest failures reject the package. Invalid component locations,
skills, MCP documents, and individual MCP entries are isolated and
reported through Self::diagnostics as required by the standard.
Sourcepub fn manifest(&self) -> &PluginManifest
pub fn manifest(&self) -> &PluginManifest
Validated portable manifest.
Sourcepub fn skills(&self) -> &[PluginSkill]
pub fn skills(&self) -> &[PluginSkill]
Valid Agent Skills discovered as immediate children of skills/.
Sourcepub fn skill_directories(&self) -> Vec<PathBuf>
pub fn skill_directories(&self) -> Vec<PathBuf>
Exact directories containing the discovered skills.
Pass these to agentkit_tool_skills::SkillRegistry::from_skill_dirs
to compose the package with agentkit’s existing skill runtime.
Sourcepub fn mcp_servers(&self) -> &[PluginMcpServer]
pub fn mcp_servers(&self) -> &[PluginMcpServer]
Valid portable MCP server declarations.
Sourcepub fn diagnostics(&self) -> &[PluginDiagnostic]
pub fn diagnostics(&self) -> &[PluginDiagnostic]
Non-fatal validation and discovery diagnostics.
Sourcepub fn extension_manifest(&self, namespace: &str) -> Option<&Value>
pub fn extension_manifest(&self, namespace: &str) -> Option<&Value>
Opaque manifest data for a client extension namespace.
The core loader intentionally does not validate namespace-owned data.
Sourcepub fn extension_dir(&self, namespace: &str) -> Option<PathBuf>
pub fn extension_dir(&self, namespace: &str) -> Option<PathBuf>
Resolve an existing extension directory while enforcing containment.
Trait Implementations§
Source§impl Clone for AgentPlugin
impl Clone for AgentPlugin
Source§fn clone(&self) -> AgentPlugin
fn clone(&self) -> AgentPlugin
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more