pub struct CollectedCapabilities {
pub system_prompt_parts: Vec<String>,
pub system_prompt_attributions: Vec<SystemPromptAttribution>,
pub tools: Vec<Box<dyn Tool>>,
pub tool_definitions: Vec<ToolDefinition>,
pub mounts: Vec<MountPoint>,
pub message_filter_providers: Vec<(Arc<dyn MessageFilterProvider>, Value)>,
pub applied_ids: Vec<String>,
pub tool_search: Option<ToolSearchConfig>,
pub prompt_cache: Option<PromptCacheConfig>,
pub tool_definition_hooks: Vec<Arc<dyn ToolDefinitionHook>>,
pub tool_call_hooks: Vec<Arc<dyn ToolCallHook>>,
pub mcp_servers: ScopedMcpServers,
}Expand description
Collected data from capabilities before applying to config.
This intermediate struct allows sharing the capability collection logic
between apply_capabilities and apply_capabilities_to_builder.
Fields§
§system_prompt_parts: Vec<String>System prompt additions (in order)
system_prompt_attributions: Vec<SystemPromptAttribution>Source attribution for each system prompt addition.
tools: Vec<Box<dyn Tool>>Tool implementations for the registry
tool_definitions: Vec<ToolDefinition>Tool definitions for config
mounts: Vec<MountPoint>Mount points from capabilities
message_filter_providers: Vec<(Arc<dyn MessageFilterProvider>, Value)>Message filter providers with their configs (in priority order)
applied_ids: Vec<String>IDs of capabilities that were collected
tool_search: Option<ToolSearchConfig>Tool search configuration (set when openai_tool_search capability is present)
prompt_cache: Option<PromptCacheConfig>Prompt caching configuration (set when prompt_caching capability is present)
tool_definition_hooks: Vec<Arc<dyn ToolDefinitionHook>>Hooks that transform the final runtime tool definition list.
tool_call_hooks: Vec<Arc<dyn ToolCallHook>>Hooks that inspect or transform model-produced tool calls.
mcp_servers: ScopedMcpServersScoped remote MCP servers contributed by capabilities.
Implementations§
Source§impl CollectedCapabilities
impl CollectedCapabilities
Sourcepub fn system_prompt_prefix(&self) -> Option<String>
pub fn system_prompt_prefix(&self) -> Option<String>
Returns the combined system prompt prefix from all capabilities. Returns None if no capabilities contributed system prompt additions.
Sourcepub fn apply_message_filters(&self, query: &mut MessageQuery)
pub fn apply_message_filters(&self, query: &mut MessageQuery)
Apply all collected message filter providers to a query.
Providers are applied in priority order (lower priority first).
Sourcepub fn apply_post_load_filters(&self, messages: &mut Vec<Message>)
pub fn apply_post_load_filters(&self, messages: &mut Vec<Message>)
Apply post-load transforms from all message filter providers. Called after messages are loaded, filtered, and injected.
Sourcepub fn has_message_filters(&self) -> bool
pub fn has_message_filters(&self) -> bool
Check if any capabilities contribute message filters.
Auto Trait Implementations§
impl !RefUnwindSafe for CollectedCapabilities
impl !UnwindSafe for CollectedCapabilities
impl Freeze for CollectedCapabilities
impl Send for CollectedCapabilities
impl Sync for CollectedCapabilities
impl Unpin for CollectedCapabilities
impl UnsafeUnpin for CollectedCapabilities
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
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>
T in a tonic::Request