pub struct NoopExtension;Expand description
pub.
Trait Implementations§
Source§impl Extension for NoopExtension
impl Extension for NoopExtension
Source§fn description(&self) -> &str
fn description(&self) -> &str
Returns a human-readable description of what this extension does.
Source§fn manifest(&self) -> ExtensionManifest
fn manifest(&self) -> ExtensionManifest
Returns the extension manifest containing metadata and permissions.
Default implementation constructs a minimal manifest from
name() and
description().Source§fn register_tools(&self) -> Vec<Arc<dyn AgentTool>>
fn register_tools(&self) -> Vec<Arc<dyn AgentTool>>
Registers custom tools exposed by this extension.
Each returned tool becomes available to the agent at runtime.
Default returns an empty vector (no custom tools).
Source§fn register_commands(&self) -> Vec<Command>
fn register_commands(&self) -> Vec<Command>
Registers slash commands exposed by this extension.
Each returned command becomes available as
/<name> in the input field.
Default returns an empty vector (no custom commands).Source§fn on_load(&self, _ctx: &ExtensionContext)
fn on_load(&self, _ctx: &ExtensionContext)
Called once when the extension is first loaded into a session.
Use this to initialize resources, read config, or register with external services.
Source§fn on_unload(&self)
fn on_unload(&self)
Called once when the extension is unloaded or the session ends.
Use this to clean up resources allocated in
on_load().Source§fn on_message_sent(&self, _msg: &str)
fn on_message_sent(&self, _msg: &str)
Called after the agent sends a message to the LLM.
_msg is the raw message content string.Source§fn on_message_received(&self, _msg: &str)
fn on_message_received(&self, _msg: &str)
Called after receiving a response from the LLM.
_msg is the raw response content string.Source§fn on_tool_call(&self, _tool: &str, _params: &Value)
fn on_tool_call(&self, _tool: &str, _params: &Value)
Called immediately before a tool is executed.
_tool is the tool name and _params are the JSON arguments.Source§fn on_tool_result(&self, _tool: &str, _result: &AgentToolResult)
fn on_tool_result(&self, _tool: &str, _result: &AgentToolResult)
Called immediately after a tool execution completes.
_tool is the tool name and _result contains the output or error.Source§fn on_session_start(&self, _session_id: &str)
fn on_session_start(&self, _session_id: &str)
Called when a new session starts.
_session_id uniquely identifies the session.Source§fn on_session_end(&self, _session_id: &str)
fn on_session_end(&self, _session_id: &str)
Called when a session ends.
_session_id uniquely identifies the session that ended.Source§fn on_settings_changed(&self, _settings: &Settings)
fn on_settings_changed(&self, _settings: &Settings)
Called whenever the user saves or updates settings.
Source§fn on_event(&self, _event: &AgentEvent)
fn on_event(&self, _event: &AgentEvent)
Catch-all hook for any agent event not covered by a specific method.
Source§fn on_before_tool_call(&self, _tool: &str, _args: &Value) -> Result<(), Error>
fn on_before_tool_call(&self, _tool: &str, _args: &Value) -> Result<(), Error>
Called before a tool is executed. Return
Err to block the tool call.Source§fn on_after_tool_call(
&self,
_tool: &str,
_result: &AgentToolResult,
) -> Result<(), Error>
fn on_after_tool_call( &self, _tool: &str, _result: &AgentToolResult, ) -> Result<(), Error>
Called after a tool completes. Return
Err to surface an error to the agent.Source§fn on_before_compaction(&self, _ctx: &CompactionContext) -> Result<(), Error>
fn on_before_compaction(&self, _ctx: &CompactionContext) -> Result<(), Error>
Called before the context window is compacted. Return
Err to abort compaction.Source§fn on_after_compaction(&self, _summary: &str) -> Result<(), Error>
fn on_after_compaction(&self, _summary: &str) -> Result<(), Error>
Called after the context window is compacted with the generated summary.
Source§fn on_error(&self, _error: &Error) -> Result<(), Error>
fn on_error(&self, _error: &Error) -> Result<(), Error>
Called when any error occurs in the agent loop.
Source§fn session_before_switch(
&self,
_event: &SessionBeforeSwitchEvent,
) -> Result<(), Error>
fn session_before_switch( &self, _event: &SessionBeforeSwitchEvent, ) -> Result<(), Error>
Called before the active session switches to a different branch or parent.
Source§fn session_before_fork(
&self,
_event: &SessionBeforeForkEvent,
) -> Result<(), Error>
fn session_before_fork( &self, _event: &SessionBeforeForkEvent, ) -> Result<(), Error>
Called before a session is forked (branched) into a new subtree.
Source§fn session_before_compact(
&self,
_event: &SessionBeforeCompactEvent,
) -> Result<(), Error>
fn session_before_compact( &self, _event: &SessionBeforeCompactEvent, ) -> Result<(), Error>
Called before the context window is compacted.
Source§fn session_compact(&self, _event: &SessionCompactEvent) -> Result<(), Error>
fn session_compact(&self, _event: &SessionCompactEvent) -> Result<(), Error>
Called when the context window is being compacted.
Source§fn session_shutdown(&self, _event: &SessionShutdownEvent)
fn session_shutdown(&self, _event: &SessionShutdownEvent)
Called when a session is shutting down.
Source§fn session_before_tree(
&self,
_event: &SessionBeforeTreeEvent,
) -> Result<(), Error>
fn session_before_tree( &self, _event: &SessionBeforeTreeEvent, ) -> Result<(), Error>
Called before a tree navigation action (branch listing, traversal, etc.).
Source§fn session_tree(&self, _event: &SessionTreeEvent)
fn session_tree(&self, _event: &SessionTreeEvent)
Called during a tree navigation action.
Source§fn context(&self, _event: &mut ContextEvent) -> Result<(), Error>
fn context(&self, _event: &mut ContextEvent) -> Result<(), Error>
Emits into the agent context. Return
Err to signal that the event was handled.Source§fn before_provider_request(
&self,
_event: &mut BeforeProviderRequestEvent,
) -> Result<(), Error>
fn before_provider_request( &self, _event: &mut BeforeProviderRequestEvent, ) -> Result<(), Error>
Called before every LLM provider request. Allows the extension to mutate
the request parameters (model, temperature, tools, etc.).
Source§fn after_provider_response(
&self,
_event: &AfterProviderResponseEvent,
) -> Result<(), Error>
fn after_provider_response( &self, _event: &AfterProviderResponseEvent, ) -> Result<(), Error>
Called after every LLM provider response. Allows the extension to read or
annotate the response before it is processed by the agent loop.
Source§fn model_select(&self, _event: &ModelSelectEvent)
fn model_select(&self, _event: &ModelSelectEvent)
Called when the user or agent selects a model (via
/model or auto-routing).Source§fn thinking_level_select(&self, _event: &ThinkingLevelSelectEvent)
fn thinking_level_select(&self, _event: &ThinkingLevelSelectEvent)
Called when the thinking level is changed.
Source§fn input(&self, _event: &InputEvent) -> InputEventResult
fn input(&self, _event: &InputEvent) -> InputEventResult
Called for every user input keystroke. Return
InputEventResult::Handled
to suppress the default input handling, or
InputEventResult::Transform { text }
to replace the input text.Source§fn register_shortcuts(&self) -> Vec<ExtensionShortcut>
fn register_shortcuts(&self) -> Vec<ExtensionShortcut>
Registers keyboard shortcuts exposed by this extension.
Default returns an empty vector (no shortcuts).
Auto Trait Implementations§
impl Freeze for NoopExtension
impl RefUnwindSafe for NoopExtension
impl Send for NoopExtension
impl Sync for NoopExtension
impl Unpin for NoopExtension
impl UnsafeUnpin for NoopExtension
impl UnwindSafe for NoopExtension
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
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more