Skip to main content

ToolCallRepairCapability

Struct ToolCallRepairCapability 

Source
pub struct ToolCallRepairCapability;
Expand description

Opt-in capability that repairs malformed tool calls. Disabled by default: it is registered in the global registry but contributes nothing unless an agent explicitly enables it, and the reason atom only runs repair when the capability is present in the resolved capability set.

Trait Implementations§

Source§

impl Capability for ToolCallRepairCapability

Source§

fn id(&self) -> &str

Returns the unique capability identifier as a string
Source§

fn name(&self) -> &str

Returns the display name
Source§

fn description(&self) -> &str

Returns a description of what this capability provides
Source§

fn is_guardrail(&self) -> bool

Whether this capability is a guardrail — a constraint on agent behavior (content checks, tool restrictions) rather than a grant of new abilities. Structural marker for UI sections and catalog filtering; carries no runtime semantics. See specs/guardrails.md.
Source§

fn config_schema(&self) -> Option<Value>

Returns the JSON Schema for this capability’s per-agent config. Read more
Source§

fn validate_config(&self, config: &Value) -> Result<(), String>

Validates per-capability config before it is persisted. Read more
Source§

fn localizations(&self) -> Vec<CapabilityLocalization>

Returns localization overlays for this capability’s display strings. Read more
Source§

fn aliases(&self) -> Vec<&'static str>

Returns legacy identifiers that resolve to this capability. Read more
Source§

fn localized_name(&self, locale: Option<&str>) -> String

Display name resolved for locale; None or unknown locales fall back to name().
Source§

fn localized_description(&self, locale: Option<&str>) -> String

Description resolved for locale; falls back to description().
Source§

fn describe_schema(&self, locale: Option<&str>) -> Option<String>

One-line human-readable summary of what this capability’s config controls, resolved for locale. None when the capability exposes no per-agent config.
Source§

fn status(&self) -> CapabilityStatus

Returns the current status of this capability
Source§

fn icon(&self) -> Option<&str>

Returns the icon name for UI rendering (optional)
Source§

fn category(&self) -> Option<&str>

Returns the category for grouping in UI (optional)
Source§

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>

Returns static text to include in 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,

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>

Returns a preview of the system prompt addition for UI display. Read more
Source§

fn tools(&self) -> Vec<Box<dyn Tool>>

Returns tool implementations provided by this capability
Source§

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,

Returns system prompt contribution adapted to per-capability config. Read more
Source§

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>

Returns mount points to populate in the session filesystem Read more
Source§

fn dependencies(&self) -> Vec<&'static str>

Returns capability IDs that this capability depends on. Read more
Source§

fn features(&self) -> Vec<&'static str>

Returns UI feature strings that this capability contributes to. Read more
Source§

fn config_ui_schema(&self) -> Option<Value>

Returns UI hints for rendering config_schema. Read more
Source§

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

Returns config-aware remote MCP server contributions.
Source§

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>>

Returns a provider that can build a prompt-facing model view from lossless stored messages before provider serialization. Read more
Source§

fn llm_error_hook(&self) -> Option<Arc<dyn LlmErrorHook>>

Returns an in-process hook invoked when a turn fails with a terminal LLM error (one that will not be retried), before the user-facing error message is emitted. The hook may perform a side effect (e.g. schedule a continuation) and/or return extra fields to augment the user-facing error copy. This is the platform seam for capability-owned error recovery — the same in-process hook family as Self::tool_call_hooks and Self::message_filter_provider; the reason atom invokes it generically and knows nothing about any specific capability’s behavior. See crate::llm_error_hook. Read more
Source§

fn facts(&self, _config: &Value, _ctx: &FactsContext) -> Vec<Fact>

Returns key/value Facts this capability contributes to the model. Read more
Source§

fn pre_tool_use_hooks(&self) -> Vec<Arc<dyn PreToolUseHook>>

Returns pre-tool execution hooks provided by this capability. Read more
Source§

fn pre_tool_use_hooks_with_config( &self, _config: &Value, ) -> Vec<Arc<dyn PreToolUseHook>>

Returns pre-tool execution hooks adapted to per-capability config. Read more
Source§

fn post_tool_exec_hooks(&self) -> Vec<Arc<dyn PostToolExecHook>>

Returns post-tool execution hooks provided by this capability. Read more
Source§

fn post_tool_exec_hooks_with_config( &self, _config: &Value, ) -> Vec<Arc<dyn PostToolExecHook>>

Returns post-tool execution hooks adapted to per-capability config. Read more
Source§

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>>

Returns tool definition hooks adapted to per-capability config. Read more
Source§

fn tool_definition_hooks_with_context( &self, _ctx: &SystemPromptContext, config: &Value, ) -> Vec<Arc<dyn ToolDefinitionHook>>

Returns tool definition hooks adapted to per-capability config and the collection context (session id, model, …). Read more
Source§

fn tool_call_hooks(&self) -> Vec<Arc<dyn ToolCallHook>>

Returns tool call hooks provided by this capability. Read more
Source§

fn narrate( &self, _tool_def: Option<&ToolDefinition>, tool_call: &ToolCall, phase: ToolNarrationPhase, locale: Option<&str>, ctx: ToolNarrationContext<'_>, ) -> Option<String>

Contribute human-readable narration for one of this capability’s tool calls (e.g. “Read AGENTS.md”, “Searched tools: router”). Read more
Source§

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>

Returns user-defined hook specifications adapted to per-capability config. Read more
Source§

fn risk_level(&self) -> RiskLevel

Returns the risk level of this capability. Read more
Source§

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,

Execute a system command declared by Self::commands. Read more
Source§

fn agent_blueprints(&self) -> Vec<AgentBlueprint>

Returns agent blueprints contributed by this capability. Read more
Source§

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>>

Returns streaming output guardrails contributed by this capability. Read more
Source§

fn post_output_guardrails_with_config( &self, _config: &Value, ) -> Vec<Arc<dyn PostGenerationOutputGuardrail>>

Async, end-of-message output guardrails (EVE-573). 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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> ParallelSend for T

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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