pub struct Tools { /* private fields */ }Expand description
Middleware that contributes an explicit list of tools.
Implementations§
Trait Implementations§
Source§impl Middleware for Tools
impl Middleware for Tools
Source§fn register(
&self,
catalog: &mut Catalog,
_runtime: &RuntimeContext,
) -> Result<()>
fn register( &self, catalog: &mut Catalog, _runtime: &RuntimeContext, ) -> Result<()>
Adds tools to the catalog while the agent is created.
Source§fn prompt_section(
&self,
_runtime: &RuntimeContext,
) -> Result<Option<PromptSection>>
fn prompt_section( &self, _runtime: &RuntimeContext, ) -> Result<Option<PromptSection>>
Contributes one immutable system-prompt section while the agent is created.
Source§fn frontend(&self) -> FrontendContribution
fn frontend(&self) -> FrontendContribution
Declares commands and status data that any frontend may render.
Source§fn render(&self, event: &EventMsg, _session_id: &str) -> Option<FrontendBlock>
fn render(&self, event: &EventMsg, _session_id: &str) -> Option<FrontendBlock>
Renders an event owned by this capability for the destination session. Read more
Source§fn command<'a>(
&'a self,
context: MiddlewareCommandContext<'a>,
) -> BoxFuture<'a, Result<MiddlewareCommandOutput>>
fn command<'a>( &'a self, context: MiddlewareCommandContext<'a>, ) -> BoxFuture<'a, Result<MiddlewareCommandOutput>>
Handles a command declared by this middleware’s frontend contribution.
Source§fn initialize<'a>(
&'a self,
_context: RuntimeContext,
) -> BoxFuture<'a, Result<()>>
fn initialize<'a>( &'a self, _context: RuntimeContext, ) -> BoxFuture<'a, Result<()>>
Restores middleware-owned durable state for this agent tree.
Source§fn active_operations(&self) -> &'static [&'static str]
fn active_operations(&self) -> &'static [&'static str]
Declares active-turn operations owned by this middleware.
Source§fn active_submission(
&self,
_context: &mut ActiveSubmissionContext<'_>,
) -> Result<ActiveSubmissionResult>
fn active_submission( &self, _context: &mut ActiveSubmissionContext<'_>, ) -> Result<ActiveSubmissionResult>
Handles one declared active-turn operation.
Source§fn active_command<'a>(
&'a self,
_context: &'a mut ActiveCommandContext<'_>,
) -> BoxFuture<'a, Result<Option<ActiveSubmissionResult>>>
fn active_command<'a>( &'a self, _context: &'a mut ActiveCommandContext<'_>, ) -> BoxFuture<'a, Result<Option<ActiveSubmissionResult>>>
Handles a capability command while a turn is active. Read more
Source§fn turn_ended(&self, _context: &mut TurnEndContext<'_>) -> Result<()>
fn turn_ended(&self, _context: &mut TurnEndContext<'_>) -> Result<()>
Observes a turn ending and may clear capability-owned transient UI.
Source§fn before_model<'a>(
&'a self,
_context: &'a mut ModelContext<'_>,
) -> BoxFuture<'a, Result<()>>
fn before_model<'a>( &'a self, _context: &'a mut ModelContext<'_>, ) -> BoxFuture<'a, Result<()>>
Mutates durable context before the next model request is assembled.
Source§fn decorate_model_request<'a>(
&'a self,
_context: &'a mut ModelContext<'_>,
) -> BoxFuture<'a, Result<()>>
fn decorate_model_request<'a>( &'a self, _context: &'a mut ModelContext<'_>, ) -> BoxFuture<'a, Result<()>>
Applies request-only context after every durable transform has completed.
Source§fn after_model<'a>(
&'a self,
_context: &'a mut AfterModelContext<'_>,
) -> BoxFuture<'a, Result<()>>
fn after_model<'a>( &'a self, _context: &'a mut AfterModelContext<'_>, ) -> BoxFuture<'a, Result<()>>
Observes one normalized response before it is checkpointed or dispatched. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for Tools
impl !UnwindSafe for Tools
impl Freeze for Tools
impl Send for Tools
impl Sync for Tools
impl Unpin for Tools
impl UnsafeUnpin for Tools
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