Skip to main content

CapabilityBundle

Trait CapabilityBundle 

Source
pub trait CapabilityBundle: Send + Sync {
    // Required method
    fn name(&self) -> &str;

    // Provided methods
    fn spec(&self) -> CapabilitySpec { ... }
    fn hooks(&self) -> Vec<Arc<dyn AgentCapability>> { ... }
    fn stream_observers(&self) -> Vec<Arc<dyn AgentCapability>> { ... }
    fn get_instructions(&self) -> Vec<String> { ... }
    fn dynamic_instructions(&self) -> Vec<DynDynamicInstruction>  { ... }
    fn get_tools(&self) -> Option<ToolRegistry> { ... }
    fn model_settings(&self) -> Option<ModelSettings> { ... }
    fn request_params(&self) -> Option<ModelRequestParameters> { ... }
    fn output_functions(&self) -> Vec<DynOutputFunction>  { ... }
    fn output_validators(&self) -> Vec<Arc<dyn OutputValidator>> { ... }
    fn usage_limits(&self) -> Option<UsageLimits> { ... }
}
Expand description

Composable agent extension that contributes hooks, tools, instructions, and settings.

Required Methods§

Source

fn name(&self) -> &str

Bundle name for diagnostics and registry surfaces.

Provided Methods§

Source

fn spec(&self) -> CapabilitySpec

Stable capability spec for bundle-level reconstruction evidence.

Source

fn hooks(&self) -> Vec<Arc<dyn AgentCapability>>

Capability hooks contributed by this bundle.

Source

fn stream_observers(&self) -> Vec<Arc<dyn AgentCapability>>

Stream observer hooks contributed by this bundle.

Source

fn get_instructions(&self) -> Vec<String>

Static instructions contributed by this bundle.

Source

fn dynamic_instructions(&self) -> Vec<DynDynamicInstruction>

Dynamic instructions contributed by this bundle.

Source

fn get_tools(&self) -> Option<ToolRegistry>

Runtime tools and tool instructions contributed by this bundle.

Source

fn model_settings(&self) -> Option<ModelSettings>

Model settings overlay contributed by this bundle.

Source

fn request_params(&self) -> Option<ModelRequestParameters>

Request parameter overlay contributed by this bundle.

Source

fn output_functions(&self) -> Vec<DynOutputFunction>

Output functions contributed by this bundle.

Source

fn output_validators(&self) -> Vec<Arc<dyn OutputValidator>>

Output validators contributed by this bundle.

Source

fn usage_limits(&self) -> Option<UsageLimits>

Usage limits contributed by this bundle.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§