Skip to main content

StaticCapabilityBundle

Struct StaticCapabilityBundle 

Source
pub struct StaticCapabilityBundle { /* private fields */ }
Expand description

Static capability bundle for reusable runtime composition.

Implementations§

Source§

impl StaticCapabilityBundle

Source

pub fn new(name: impl Into<String>) -> Self

Create an empty static capability bundle.

Source

pub fn with_spec(self, spec: CapabilitySpec) -> Self

Set the bundle capability spec.

Source

pub fn with_hook(self, hook: Arc<dyn AgentCapability>) -> Self

Add a capability hook.

Source

pub fn with_stream_observer(self, observer: Arc<dyn AgentCapability>) -> Self

Add a stream observer hook.

Source

pub fn with_instruction(self, instruction: impl Into<String>) -> Self

Add a static instruction.

Source

pub fn with_dynamic_instruction( self, instruction: DynDynamicInstruction, ) -> Self

Add a dynamic instruction.

Source

pub fn with_tool(self, tool: DynTool) -> Self

Add one tool.

Source

pub fn with_toolset(self, toolset: &DynToolset) -> Self

Add one toolset.

Source

pub fn with_model_settings(self, settings: ModelSettings) -> Self

Set model settings overlay.

Source

pub fn with_request_params(self, params: ModelRequestParameters) -> Self

Set request parameter overlay.

Source

pub fn with_output_function(self, function: DynOutputFunction) -> Self

Add an output function.

Source

pub fn with_output_validator(self, validator: Arc<dyn OutputValidator>) -> Self

Add an output validator.

Source

pub const fn with_usage_limits(self, limits: UsageLimits) -> Self

Set usage limits overlay.

Trait Implementations§

Source§

impl CapabilityBundle for StaticCapabilityBundle

Source§

fn name(&self) -> &str

Bundle name for diagnostics and registry surfaces.
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.
Source§

impl Clone for StaticCapabilityBundle

Source§

fn clone(&self) -> StaticCapabilityBundle

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for StaticCapabilityBundle

Source§

fn default() -> StaticCapabilityBundle

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more