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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
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: Sized + AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + 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 moreimpl<T> MaybeSendSync for T
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref() only in debug builds, and is erased in release
builds.