pub struct Plugin {
pub manifest: Manifest,
pub dir: PathBuf,
pub builtin: bool,
pub skills: Vec<Skill>,
pub agents: Vec<AgentDef>,
pub commands: Vec<Command>,
pub problems: Vec<String>,
pub embedded: Option<Arc<BTreeMap<String, String>>>,
}Expand description
A loaded plugin.
Fields§
§manifest: Manifest§dir: PathBuf§builtin: boolShips with the app (may use native tools).
skills: Vec<Skill>§agents: Vec<AgentDef>Subagent definitions from its agents/*.md (Claude Code format).
commands: Vec<Command>Slash commands from its commands/*.md (Claude Code format).
problems: Vec<String>Non-fatal problems for the plugin’s card (a bad skill, a missing script). The parts that work are still used.
embedded: Option<Arc<BTreeMap<String, String>>>Its files when they are in the binary (a bundled plugin), by path; None: on disk
in dir.
Implementations§
Source§impl Plugin
impl Plugin
pub fn id(&self) -> &str
Sourcepub fn read(&self, rel: &str) -> Result<String, String>
pub fn read(&self, rel: &str) -> Result<String, String>
The text of its file rel (a path inside the plugin, checked): from the binary for
a bundled plugin, else from its folder; capped at MAX_PLUGIN_FILE_BYTES.
Sourcepub fn supported_here(&self) -> bool
pub fn supported_here(&self) -> bool
The manifest’s platforms include this system (or it has none).
Sourcepub fn native_tools(&self) -> Vec<&str>
pub fn native_tools(&self) -> Vec<&str>
Names of the app’s own (in-tree) tools this plugin turns on.
Trait Implementations§
impl StructuralPartialEq for Plugin
Auto Trait Implementations§
impl Forget for Plugin
impl Freeze for Plugin
impl Move for Plugin
impl RefUnwindSafe for Plugin
impl Send for Plugin
impl Sync for Plugin
impl Unpin for Plugin
impl UnsafeUnpin for Plugin
impl UnwindSafe for Plugin
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more