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§
Provided Methods§
Sourcefn spec(&self) -> CapabilitySpec
fn spec(&self) -> CapabilitySpec
Stable capability spec for bundle-level reconstruction evidence.
Sourcefn hooks(&self) -> Vec<Arc<dyn AgentCapability>>
fn hooks(&self) -> Vec<Arc<dyn AgentCapability>>
Capability hooks contributed by this bundle.
Sourcefn stream_observers(&self) -> Vec<Arc<dyn AgentCapability>>
fn stream_observers(&self) -> Vec<Arc<dyn AgentCapability>>
Stream observer hooks contributed by this bundle.
Sourcefn get_instructions(&self) -> Vec<String>
fn get_instructions(&self) -> Vec<String>
Static instructions contributed by this bundle.
Sourcefn dynamic_instructions(&self) -> Vec<DynDynamicInstruction> ⓘ
fn dynamic_instructions(&self) -> Vec<DynDynamicInstruction> ⓘ
Dynamic instructions contributed by this bundle.
Sourcefn get_tools(&self) -> Option<ToolRegistry>
fn get_tools(&self) -> Option<ToolRegistry>
Runtime tools and tool instructions contributed by this bundle.
Sourcefn model_settings(&self) -> Option<ModelSettings>
fn model_settings(&self) -> Option<ModelSettings>
Model settings overlay contributed by this bundle.
Sourcefn request_params(&self) -> Option<ModelRequestParameters>
fn request_params(&self) -> Option<ModelRequestParameters>
Request parameter overlay contributed by this bundle.
Sourcefn output_functions(&self) -> Vec<DynOutputFunction> ⓘ
fn output_functions(&self) -> Vec<DynOutputFunction> ⓘ
Output functions contributed by this bundle.
Sourcefn output_validators(&self) -> Vec<Arc<dyn OutputValidator>>
fn output_validators(&self) -> Vec<Arc<dyn OutputValidator>>
Output validators contributed by this bundle.
Sourcefn usage_limits(&self) -> Option<UsageLimits>
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".