Skip to main content

Plugin

Trait Plugin 

Source
pub trait Plugin {
    // Required methods
    fn config(&self) -> &PluginConfig;
    fn handle_skill(&mut self, skill: &str, params: &Value) -> Result<String>;
    fn handle_command(&mut self, cmd: &str, args: &[String]) -> Result<String>;
    fn on_session_start(&mut self, ctx: &SessionContext) -> Result<()>;
    fn on_session_end(&mut self, ctx: &SessionContext) -> Result<()>;
}
Expand description

Plugin trait for Claude Code integration

Required Methods§

Source

fn config(&self) -> &PluginConfig

Get plugin configuration

Source

fn handle_skill(&mut self, skill: &str, params: &Value) -> Result<String>

Handle a skill invocation

Source

fn handle_command(&mut self, cmd: &str, args: &[String]) -> Result<String>

Handle a command invocation

Source

fn on_session_start(&mut self, ctx: &SessionContext) -> Result<()>

Session start hook

Source

fn on_session_end(&mut self, ctx: &SessionContext) -> Result<()>

Session end hook

Implementors§