pub struct NullExtensionRunner;Expand description
No-op extension runner used before pi-ext lands and in unit tests.
Trait Implementations§
Source§impl Clone for NullExtensionRunner
impl Clone for NullExtensionRunner
Source§fn clone(&self) -> NullExtensionRunner
fn clone(&self) -> NullExtensionRunner
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NullExtensionRunner
impl Debug for NullExtensionRunner
Source§impl Default for NullExtensionRunner
impl Default for NullExtensionRunner
Source§fn default() -> NullExtensionRunner
fn default() -> NullExtensionRunner
Returns the “default value” for a type. Read more
Source§impl ExtensionRunner for NullExtensionRunner
impl ExtensionRunner for NullExtensionRunner
Source§fn has_handlers(&self, _event: &str) -> bool
fn has_handlers(&self, _event: &str) -> bool
Returns true when at least one handler is registered for
event.Source§fn emit(
&self,
_event: AgentSessionEvent,
) -> BoxFuture<'_, Result<Option<CancelResult>, ExtensionRunnerError>>
fn emit( &self, _event: AgentSessionEvent, ) -> BoxFuture<'_, Result<Option<CancelResult>, ExtensionRunnerError>>
Emit a generic session lifecycle event (
agent_start, turn_, tool_, etc.).Source§fn emit_message_end(
&self,
_message: AgentMessage,
) -> BoxFuture<'_, Result<Option<AgentMessage>, ExtensionRunnerError>>
fn emit_message_end( &self, _message: AgentMessage, ) -> BoxFuture<'_, Result<Option<AgentMessage>, ExtensionRunnerError>>
Emit
message_end and optionally return a replacement message.Source§fn emit_tool_call(
&self,
_tool_name: &str,
_tool_call_id: &str,
_input: Map<String, Value>,
) -> BoxFuture<'_, Result<Option<BeforeToolCallResult>, ExtensionRunnerError>>
fn emit_tool_call( &self, _tool_name: &str, _tool_call_id: &str, _input: Map<String, Value>, ) -> BoxFuture<'_, Result<Option<BeforeToolCallResult>, ExtensionRunnerError>>
Emit
tool_call (before execution). Returns an optional block result.Source§fn emit_tool_result(
&self,
_tool_name: &str,
_tool_call_id: &str,
_input: Map<String, Value>,
_content: Vec<ToolResultContent>,
_details: Value,
_is_error: bool,
) -> BoxFuture<'_, Result<Option<AfterToolCallResult>, ExtensionRunnerError>>
fn emit_tool_result( &self, _tool_name: &str, _tool_call_id: &str, _input: Map<String, Value>, _content: Vec<ToolResultContent>, _details: Value, _is_error: bool, ) -> BoxFuture<'_, Result<Option<AfterToolCallResult>, ExtensionRunnerError>>
Emit
tool_result (after execution). Returns an optional override.Source§fn emit_input(
&self,
_text: &str,
_images: Option<Value>,
_source: &str,
_streaming_behavior: Option<&str>,
) -> BoxFuture<'_, Result<InputTransformResult, ExtensionRunnerError>>
fn emit_input( &self, _text: &str, _images: Option<Value>, _source: &str, _streaming_behavior: Option<&str>, ) -> BoxFuture<'_, Result<InputTransformResult, ExtensionRunnerError>>
Emit the
input transform event.Source§fn emit_before_agent_start(
&self,
_prompt: &str,
_images: Option<Value>,
) -> BoxFuture<'_, Result<Option<BeforeAgentStartResult>, ExtensionRunnerError>>
fn emit_before_agent_start( &self, _prompt: &str, _images: Option<Value>, ) -> BoxFuture<'_, Result<Option<BeforeAgentStartResult>, ExtensionRunnerError>>
Emit
before_agent_start and return optional message/system prompt injection.Source§fn emit_resources_discover(
&self,
_cwd: &str,
_reason: &str,
) -> BoxFuture<'_, Result<ResourceExtensionPaths, ExtensionRunnerError>>
fn emit_resources_discover( &self, _cwd: &str, _reason: &str, ) -> BoxFuture<'_, Result<ResourceExtensionPaths, ExtensionRunnerError>>
Discover additional resource paths from extensions.
Source§fn get_registered_commands(&self) -> Vec<String>
fn get_registered_commands(&self) -> Vec<String>
Registered slash-command names (extension source).
Source§fn execute_command(
&self,
_name: &str,
_args: &str,
) -> BoxFuture<'_, Result<bool, ExtensionRunnerError>>
fn execute_command( &self, _name: &str, _args: &str, ) -> BoxFuture<'_, Result<bool, ExtensionRunnerError>>
Execute an extension slash command by name. Read more
Source§fn get_all_registered_tools(&self) -> HashMap<String, Arc<dyn AgentTool>>
fn get_all_registered_tools(&self) -> HashMap<String, Arc<dyn AgentTool>>
Registered extension tools by name.
Source§fn invalidate(&self)
fn invalidate(&self)
Mark the runner invalid after session replacement.
Source§fn emit_error(&self, _message: String)
fn emit_error(&self, _message: String)
Report an extension error to the host error listener.
Source§fn emit_message_update_delta<'a>(
&'a self,
_event: &'a AssistantMessageEvent,
) -> BoxFuture<'a, Result<Option<CancelResult>, ExtensionRunnerError>>
fn emit_message_update_delta<'a>( &'a self, _event: &'a AssistantMessageEvent, ) -> BoxFuture<'a, Result<Option<CancelResult>, ExtensionRunnerError>>
Emit a compact streaming assistant delta. Read more
Source§fn has_command(&self, name: &str) -> bool
fn has_command(&self, name: &str) -> bool
Whether a slash command named
name is registered.Auto Trait Implementations§
impl Freeze for NullExtensionRunner
impl RefUnwindSafe for NullExtensionRunner
impl Send for NullExtensionRunner
impl Sync for NullExtensionRunner
impl Unpin for NullExtensionRunner
impl UnsafeUnpin for NullExtensionRunner
impl UnwindSafe for NullExtensionRunner
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§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 moreCreates a shared type from an unshared type.