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§
Sourcefn config(&self) -> &PluginConfig
fn config(&self) -> &PluginConfig
Get plugin configuration
Sourcefn handle_skill(&mut self, skill: &str, params: &Value) -> Result<String>
fn handle_skill(&mut self, skill: &str, params: &Value) -> Result<String>
Handle a skill invocation
Sourcefn handle_command(&mut self, cmd: &str, args: &[String]) -> Result<String>
fn handle_command(&mut self, cmd: &str, args: &[String]) -> Result<String>
Handle a command invocation
Sourcefn on_session_start(&mut self, ctx: &SessionContext) -> Result<()>
fn on_session_start(&mut self, ctx: &SessionContext) -> Result<()>
Session start hook
Sourcefn on_session_end(&mut self, ctx: &SessionContext) -> Result<()>
fn on_session_end(&mut self, ctx: &SessionContext) -> Result<()>
Session end hook