pub struct TestWeatherCapability;Expand description
TestWeather capability - mock weather tools for testing tool calling
Trait Implementations§
Source§impl Capability for TestWeatherCapability
impl Capability for TestWeatherCapability
Source§fn description(&self) -> &str
fn description(&self) -> &str
Returns a description of what this capability provides
Source§fn status(&self) -> CapabilityStatus
fn status(&self) -> CapabilityStatus
Returns the current status of this capability
Source§fn tools(&self) -> Vec<Box<dyn Tool>>
fn tools(&self) -> Vec<Box<dyn Tool>>
Returns tool implementations provided by this capability
Source§fn resolve_for_model(&self, _model: Option<&str>) -> Option<&dyn Capability>
fn resolve_for_model(&self, _model: Option<&str>) -> Option<&dyn Capability>
Model-adaptive dispatch: delegate this capability’s contributions to a
different underlying capability based on the agent’s model. Read more
Source§fn system_prompt_addition(&self) -> Option<&str>
fn system_prompt_addition(&self) -> Option<&str>
Returns static text to prepend to the agent’s system prompt (optional). Read more
Source§fn system_prompt_contribution<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 SystemPromptContext,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn system_prompt_contribution<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 SystemPromptContext,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns the system prompt contribution for this capability, with access
to session context (filesystem, etc.). Read more
Source§fn system_prompt_preview(&self) -> Option<String>
fn system_prompt_preview(&self) -> Option<String>
Returns a preview of the system prompt addition for UI display. Read more
Source§fn tools_with_config(&self, _config: &Value) -> Vec<Box<dyn Tool>>
fn tools_with_config(&self, _config: &Value) -> Vec<Box<dyn Tool>>
Returns tool implementations configured by per-capability config. Read more
Source§fn system_prompt_contribution_with_config<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 SystemPromptContext,
_config: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn system_prompt_contribution_with_config<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 SystemPromptContext,
_config: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Returns system prompt contribution adapted to per-capability config. Read more
Source§fn tool_definitions(&self) -> Vec<ToolDefinition>
fn tool_definitions(&self) -> Vec<ToolDefinition>
Returns tool definitions for the agent config
By default, converts tools() to definitions
Source§fn mounts(&self) -> Vec<MountPoint>
fn mounts(&self) -> Vec<MountPoint>
Returns mount points to populate in the session filesystem Read more
Source§fn dependencies(&self) -> Vec<&'static str>
fn dependencies(&self) -> Vec<&'static str>
Returns capability IDs that this capability depends on. Read more
Source§fn features(&self) -> Vec<&'static str>
fn features(&self) -> Vec<&'static str>
Returns UI feature strings that this capability contributes to. Read more
Source§fn config_schema(&self) -> Option<Value>
fn config_schema(&self) -> Option<Value>
Returns the JSON Schema for this capability’s per-agent config. Read more
Source§fn config_ui_schema(&self) -> Option<Value>
fn config_ui_schema(&self) -> Option<Value>
Returns UI hints for rendering
config_schema. Read moreSource§fn validate_config(&self, _config: &Value) -> Result<(), String>
fn validate_config(&self, _config: &Value) -> Result<(), String>
Validates per-capability config before it is persisted. Read more
Source§fn mcp_servers(&self) -> ScopedMcpServers
fn mcp_servers(&self) -> ScopedMcpServers
Returns remote MCP servers contributed by this capability. Read more
Source§fn mcp_servers_with_config(&self, _config: &Value) -> ScopedMcpServers
fn mcp_servers_with_config(&self, _config: &Value) -> ScopedMcpServers
Returns config-aware remote MCP server contributions.
Source§fn message_filter_provider(&self) -> Option<Arc<dyn MessageFilterProvider>>
fn message_filter_provider(&self) -> Option<Arc<dyn MessageFilterProvider>>
Returns a message filter provider if this capability modifies message retrieval. Read more
Source§fn model_view_provider(&self) -> Option<Arc<dyn ModelViewProvider>>
fn model_view_provider(&self) -> Option<Arc<dyn ModelViewProvider>>
Returns a provider that can build a prompt-facing model view from
lossless stored messages before provider serialization. Read more
Source§fn pre_tool_use_hooks(&self) -> Vec<Arc<dyn PreToolUseHook>>
fn pre_tool_use_hooks(&self) -> Vec<Arc<dyn PreToolUseHook>>
Returns pre-tool execution hooks provided by this capability. Read more
Source§fn post_tool_exec_hooks(&self) -> Vec<Arc<dyn PostToolExecHook>>
fn post_tool_exec_hooks(&self) -> Vec<Arc<dyn PostToolExecHook>>
Returns post-tool execution hooks provided by this capability. Read more
Source§fn tool_definition_hooks(&self) -> Vec<Arc<dyn ToolDefinitionHook>>
fn tool_definition_hooks(&self) -> Vec<Arc<dyn ToolDefinitionHook>>
Returns tool definition hooks provided by this capability. Read more
Source§fn tool_definition_hooks_with_config(
&self,
_config: &Value,
) -> Vec<Arc<dyn ToolDefinitionHook>>
fn tool_definition_hooks_with_config( &self, _config: &Value, ) -> Vec<Arc<dyn ToolDefinitionHook>>
Returns tool definition hooks adapted to per-capability config. Read more
Source§fn tool_call_hooks(&self) -> Vec<Arc<dyn ToolCallHook>>
fn tool_call_hooks(&self) -> Vec<Arc<dyn ToolCallHook>>
Returns tool call hooks provided by this capability. Read more
Source§fn user_hooks(&self) -> Vec<UserHookSpec>
fn user_hooks(&self) -> Vec<UserHookSpec>
Returns user-defined hook specifications contributed by this capability. Read more
Source§fn user_hooks_with_config(&self, _config: &Value) -> Vec<UserHookSpec>
fn user_hooks_with_config(&self, _config: &Value) -> Vec<UserHookSpec>
Returns user-defined hook specifications adapted to per-capability
config. Read more
Source§fn risk_level(&self) -> RiskLevel
fn risk_level(&self) -> RiskLevel
Returns the risk level of this capability. Read more
Source§fn commands(&self) -> Vec<CommandDescriptor>
fn commands(&self) -> Vec<CommandDescriptor>
Returns system commands this capability provides. Read more
Source§fn execute_command<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 ExecuteCommandRequest,
_ctx: &'life2 CommandExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<CommandResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute_command<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 ExecuteCommandRequest,
_ctx: &'life2 CommandExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<CommandResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute a system command declared by
Self::commands. Read moreSource§fn agent_blueprints(&self) -> Vec<AgentBlueprint>
fn agent_blueprints(&self) -> Vec<AgentBlueprint>
Returns agent blueprints contributed by this capability. Read more
Source§fn contribute_skills(&self) -> Vec<SkillContribution>
fn contribute_skills(&self) -> Vec<SkillContribution>
Returns skills contributed by this capability in code. Read more
Source§fn output_guardrails(&self) -> Vec<Arc<dyn OutputGuardrail>>
fn output_guardrails(&self) -> Vec<Arc<dyn OutputGuardrail>>
Returns streaming output guardrails contributed by this capability. Read more
Auto Trait Implementations§
impl Freeze for TestWeatherCapability
impl RefUnwindSafe for TestWeatherCapability
impl Send for TestWeatherCapability
impl Sync for TestWeatherCapability
impl Unpin for TestWeatherCapability
impl UnsafeUnpin for TestWeatherCapability
impl UnwindSafe for TestWeatherCapability
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request