pub trait Capability: Send + Sync {
Show 50 methods
// Required methods
fn id(&self) -> &str;
fn name(&self) -> &str;
fn description(&self) -> &str;
// Provided methods
fn aliases(&self) -> Vec<&'static str> { ... }
fn localizations(&self) -> Vec<CapabilityLocalization> { ... }
fn localized_name(&self, locale: Option<&str>) -> String { ... }
fn localized_description(&self, locale: Option<&str>) -> String { ... }
fn describe_schema(&self, locale: Option<&str>) -> Option<String> { ... }
fn status(&self) -> CapabilityStatus { ... }
fn icon(&self) -> Option<&str> { ... }
fn category(&self) -> Option<&str> { ... }
fn is_guardrail(&self) -> bool { ... }
fn resolve_for_model(&self, _model: Option<&str>) -> Option<&dyn Capability> { ... }
fn system_prompt_addition(&self) -> Option<&str> { ... }
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 { ... }
fn system_prompt_preview(&self) -> Option<String> { ... }
fn tools(&self) -> Vec<Box<dyn Tool>> { ... }
fn tools_with_config(&self, _config: &Value) -> Vec<Box<dyn Tool>> { ... }
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 { ... }
fn tool_definitions(&self) -> Vec<ToolDefinition> { ... }
fn mounts(&self) -> Vec<MountPoint> { ... }
fn dependencies(&self) -> Vec<&'static str> { ... }
fn features(&self) -> Vec<&'static str> { ... }
fn config_schema(&self) -> Option<Value> { ... }
fn config_ui_schema(&self) -> Option<Value> { ... }
fn validate_config(&self, _config: &Value) -> Result<(), String> { ... }
fn mcp_servers(&self) -> ScopedMcpServers { ... }
fn mcp_servers_with_config(&self, _config: &Value) -> ScopedMcpServers { ... }
fn message_filter_provider(&self) -> Option<Arc<dyn MessageFilterProvider>> { ... }
fn model_view_provider(&self) -> Option<Arc<dyn ModelViewProvider>> { ... }
fn llm_error_hook(&self) -> Option<Arc<dyn LlmErrorHook>> { ... }
fn facts(&self, _config: &Value, _ctx: &FactsContext) -> Vec<Fact> { ... }
fn pre_tool_use_hooks(&self) -> Vec<Arc<dyn PreToolUseHook>> { ... }
fn pre_tool_use_hooks_with_config(
&self,
_config: &Value,
) -> Vec<Arc<dyn PreToolUseHook>> { ... }
fn post_tool_exec_hooks(&self) -> Vec<Arc<dyn PostToolExecHook>> { ... }
fn post_tool_exec_hooks_with_config(
&self,
_config: &Value,
) -> Vec<Arc<dyn PostToolExecHook>> { ... }
fn tool_definition_hooks(&self) -> Vec<Arc<dyn ToolDefinitionHook>> { ... }
fn tool_definition_hooks_with_config(
&self,
_config: &Value,
) -> Vec<Arc<dyn ToolDefinitionHook>> { ... }
fn tool_definition_hooks_with_context(
&self,
_ctx: &SystemPromptContext,
config: &Value,
) -> Vec<Arc<dyn ToolDefinitionHook>> { ... }
fn tool_call_hooks(&self) -> Vec<Arc<dyn ToolCallHook>> { ... }
fn narrate(
&self,
_tool_def: Option<&ToolDefinition>,
tool_call: &ToolCall,
phase: ToolNarrationPhase,
locale: Option<&str>,
ctx: ToolNarrationContext<'_>,
) -> Option<String> { ... }
fn user_hooks(&self) -> Vec<UserHookSpec> { ... }
fn user_hooks_with_config(&self, _config: &Value) -> Vec<UserHookSpec> { ... }
fn risk_level(&self) -> RiskLevel { ... }
fn commands(&self) -> Vec<CommandDescriptor> { ... }
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 { ... }
fn agent_blueprints(&self) -> Vec<AgentBlueprint> { ... }
fn contribute_skills(&self) -> Vec<SkillContribution> { ... }
fn output_guardrails(&self) -> Vec<Arc<dyn OutputGuardrail>> { ... }
fn post_output_guardrails_with_config(
&self,
_config: &Value,
) -> Vec<Arc<dyn PostGenerationOutputGuardrail>> { ... }
}Required Methods§
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Returns a description of what this capability provides
Provided Methods§
Sourcefn aliases(&self) -> Vec<&'static str>
fn aliases(&self) -> Vec<&'static str>
Returns legacy identifiers that resolve to this capability.
Aliases exist so a capability can be renamed without breaking persisted
agent configs: registry lookups (get, has) and dependency resolution
treat an alias exactly like the canonical id(). Resolution always
normalizes aliases to the canonical ID, so an alias and its canonical
ID never activate the capability twice. New code must use id();
aliases are a compatibility surface only.
Sourcefn localizations(&self) -> Vec<CapabilityLocalization>
fn localizations(&self) -> Vec<CapabilityLocalization>
Returns localization overlays for this capability’s display strings.
Include an "en" entry when providing config_description for the
base locale. Lookup follows resolve_localized_field fallback rules.
Sourcefn localized_name(&self, locale: Option<&str>) -> String
fn localized_name(&self, locale: Option<&str>) -> String
Display name resolved for locale; None or unknown locales fall
back to name().
Sourcefn localized_description(&self, locale: Option<&str>) -> String
fn localized_description(&self, locale: Option<&str>) -> String
Description resolved for locale; falls back to description().
Sourcefn describe_schema(&self, locale: Option<&str>) -> Option<String>
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.
Sourcefn status(&self) -> CapabilityStatus
fn status(&self) -> CapabilityStatus
Returns the current status of this capability
Sourcefn is_guardrail(&self) -> bool
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.
Sourcefn resolve_for_model(&self, _model: Option<&str>) -> Option<&dyn Capability>
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.
Capability collection (which knows the model via
SystemPromptContext::model) calls this and, when it returns Some,
collects the returned capability’s contributions in place of this one’s.
The default returns None (no delegation). auto_tool_search overrides
it to pick hosted vs client-side tool search. model is None when not
yet resolved; implementations should choose a safe provider-agnostic
default in that case.
Sourcefn system_prompt_addition(&self) -> Option<&str>
fn system_prompt_addition(&self) -> Option<&str>
Returns static text to include in the agent’s system prompt (optional).
This is the simple sync path for capabilities with static prompts.
For dynamic content that requires filesystem access, override
system_prompt_contribution() instead.
Contract: no duplication with tool definitions. System prompt additions must NOT repeat information already present in tool names, descriptions, or parameter schemas. Only include content that cannot be inferred from tool definitions alone:
- High-level semantics (when to use which tool, behavioral guidance)
- Constraints the model cannot discover from schemas (row limits, naming rules, workspace root paths, scheduling limits)
- Data layout (filesystem paths for state files)
- Cross-tool relationships or ordering not evident from descriptions
If every piece of information in the prompt is already covered by the
tool definitions, return None instead.
Sourcefn 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,
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.).
This is the primary method for contributing to the system prompt. The returned string is included as-is in the final prompt (the capability is responsible for its own XML wrapping).
The default implementation wraps system_prompt_addition() in
<capability id="..."> XML tags. Capabilities with dynamic content
(e.g., agent_instructions, skills) override this to read from the
session filesystem.
Sourcefn system_prompt_preview(&self) -> Option<String>
fn system_prompt_preview(&self) -> Option<String>
Returns a preview of the system prompt addition for UI display.
For most capabilities this is identical to system_prompt_addition().
Capabilities with dynamic content (e.g. agent_instructions which reads
AGENTS.md at runtime) override this to return a representative preview.
Sourcefn tools_with_config(&self, _config: &Value) -> Vec<Box<dyn Tool>>
fn tools_with_config(&self, _config: &Value) -> Vec<Box<dyn Tool>>
Returns tool implementations configured by per-capability config.
Called during capability collection with the per-agent config for this
capability (from AgentCapabilityConfig.config). Capabilities that adapt
their tools based on config override this method.
Default delegates to tools().
Sourcefn 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,
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.
Called during capability collection. Capabilities whose system prompt content depends on config override this method.
Default delegates to system_prompt_contribution(ctx).
Sourcefn tool_definitions(&self) -> Vec<ToolDefinition>
fn tool_definitions(&self) -> Vec<ToolDefinition>
Returns tool definitions for the agent config By default, converts tools() to definitions
Sourcefn mounts(&self) -> Vec<MountPoint>
fn mounts(&self) -> Vec<MountPoint>
Returns mount points to populate in the session filesystem
Mount points allow capabilities to provide files and directories that are automatically created when a session starts. This is useful for providing sample data, documentation, or configuration files.
By default, returns an empty vector (no mounts).
Sourcefn dependencies(&self) -> Vec<&'static str>
fn dependencies(&self) -> Vec<&'static str>
Returns capability IDs that this capability depends on.
Dependencies are automatically resolved at runtime when applying capabilities. If capability A depends on capability B, then B’s contributions (tools, system prompt, mounts) will be included when A is selected, even if B is not explicitly selected.
By default, returns an empty vector (no dependencies).
Sourcefn features(&self) -> Vec<&'static str>
fn features(&self) -> Vec<&'static str>
Returns UI feature strings that this capability contributes to.
Features are open-ended strings indicating what user-facing functionality
this capability enables. Multiple capabilities can contribute the same
feature (e.g., both session_schedule and a future signals capability
might contribute "schedules").
The UI uses the aggregated set of features from all active capabilities to decide which tabs/sections to render.
Known features: "file_system", "schedules", "secrets",
"key_value", "sql_database", "leased_resources".
By default, returns an empty vector (no features).
Sourcefn config_schema(&self) -> Option<Value>
fn config_schema(&self) -> Option<Value>
Returns the JSON Schema for this capability’s per-agent config.
The schema is exposed through CapabilityInfo so clients can render a
generic settings editor for capabilities without hard-coding capability
IDs. Capabilities without configurable settings return None.
Sourcefn config_ui_schema(&self) -> Option<Value>
fn config_ui_schema(&self) -> Option<Value>
Returns UI hints for rendering config_schema.
This follows the react-jsonschema-form uiSchema shape. The server owns
durable config semantics; clients own the generic component implementation.
Sourcefn validate_config(&self, _config: &Value) -> Result<(), String>
fn validate_config(&self, _config: &Value) -> Result<(), String>
Validates per-capability config before it is persisted.
Default accepts any config for backward compatibility. Capabilities with
a config_schema() should reject invalid values here so HTTP, CLI, and
MCP write paths share the same server-side guardrail.
Sourcefn mcp_servers(&self) -> ScopedMcpServers
fn mcp_servers(&self) -> ScopedMcpServers
Returns remote MCP servers contributed by this capability.
These are merged into harness/agent/session scoped MCP config at runtime. Explicit scoped MCP config overrides capability-contributed defaults by logical server name.
Sourcefn mcp_servers_with_config(&self, _config: &Value) -> ScopedMcpServers
fn mcp_servers_with_config(&self, _config: &Value) -> ScopedMcpServers
Returns config-aware remote MCP server contributions.
Sourcefn message_filter_provider(&self) -> Option<Arc<dyn MessageFilterProvider>>
fn message_filter_provider(&self) -> Option<Arc<dyn MessageFilterProvider>>
Returns a message filter provider if this capability modifies message retrieval.
Capabilities can contribute filters that modify how messages are loaded from the database. This enables features like:
- Time-based filtering (recent messages only)
- Event type filtering
- Tool result filtering by tool name
- Ephemeral message injection (summaries, reminders)
Filters are applied in capability priority order (by MessageFilterProvider::priority()).
By default, returns None (no message filtering).
Sourcefn model_view_provider(&self) -> Option<Arc<dyn ModelViewProvider>>
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.
This is for capability-owned context transformations such as compaction cost-control masking. Storage messages remain unchanged.
By default, returns None (no model-view transformation).
Sourcefn llm_error_hook(&self) -> Option<Arc<dyn LlmErrorHook>>
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.
By default, returns None (no error hook).
Sourcefn facts(&self, _config: &Value, _ctx: &FactsContext) -> Vec<Fact>
fn facts(&self, _config: &Value, _ctx: &FactsContext) -> Vec<Fact>
Returns key/value Facts this capability contributes to the model.
Facts are routed by their Volatility so prompt caching is preserved:
Volatility::Static facts fold into the cached system-prompt prefix at
build time; Volatility::Dynamic facts are appended at the
conversation tail on every turn (outside the cached prefix). This is the
generic seam for “changing facts” such as the current time — see
crate::capabilities::facts.
Called both at prompt-assembly time (to fold static facts and detect whether any dynamic facts exist) and per request (to render the live tail block), so implementations must be cheap and side-effect free.
By default, returns an empty vector (no facts).
Sourcefn pre_tool_use_hooks(&self) -> Vec<Arc<dyn PreToolUseHook>>
fn pre_tool_use_hooks(&self) -> Vec<Arc<dyn PreToolUseHook>>
Returns pre-tool execution hooks provided by this capability.
These hooks run before each individual tool is executed — for every
tool the agent calls (built-in, MCP, or client-side), not just this
capability’s own tools. A hook can mutate the tool call or block it
outright (returning crate::atoms::PreToolUseDecision::Block), which
makes this the seam for cross-cutting policy such as approval gating.
The first hook to block wins.
By default, returns an empty vector (no hooks).
Sourcefn pre_tool_use_hooks_with_config(
&self,
_config: &Value,
) -> Vec<Arc<dyn PreToolUseHook>>
fn pre_tool_use_hooks_with_config( &self, _config: &Value, ) -> Vec<Arc<dyn PreToolUseHook>>
Returns pre-tool execution hooks adapted to per-capability config.
Default delegates to pre_tool_use_hooks(). Capabilities whose hook
behavior depends on config (e.g. guardrails) override this.
Sourcefn post_tool_exec_hooks(&self) -> Vec<Arc<dyn PostToolExecHook>>
fn post_tool_exec_hooks(&self) -> Vec<Arc<dyn PostToolExecHook>>
Returns post-tool execution hooks provided by this capability.
These hooks run after each individual tool completes execution. They can persist output, inject metadata, or transform results. Capability-contributed hooks run before infrastructure (final) hooks.
By default, returns an empty vector (no hooks).
Sourcefn post_tool_exec_hooks_with_config(
&self,
_config: &Value,
) -> Vec<Arc<dyn PostToolExecHook>>
fn post_tool_exec_hooks_with_config( &self, _config: &Value, ) -> Vec<Arc<dyn PostToolExecHook>>
Returns post-tool execution hooks adapted to per-capability config.
Default delegates to post_tool_exec_hooks(). Capabilities whose hook
behavior depends on config (e.g. guardrails) override this.
Sourcefn tool_definition_hooks(&self) -> Vec<Arc<dyn ToolDefinitionHook>>
fn tool_definition_hooks(&self) -> Vec<Arc<dyn ToolDefinitionHook>>
Returns tool definition hooks provided by this capability.
These hooks run after the runtime agent has merged and deduplicated its final tool list, before the tool schemas are sent to the LLM. They let capabilities apply cross-cutting schema changes to all active tools, including tools contributed by other capabilities, MCP, or clients.
By default, returns an empty vector (no tool definition transforms).
Sourcefn tool_definition_hooks_with_config(
&self,
_config: &Value,
) -> Vec<Arc<dyn ToolDefinitionHook>>
fn tool_definition_hooks_with_config( &self, _config: &Value, ) -> Vec<Arc<dyn ToolDefinitionHook>>
Returns tool definition hooks adapted to per-capability config.
Default delegates to tool_definition_hooks(). Capabilities whose
schema transforms depend on config override this method.
Sourcefn tool_definition_hooks_with_context(
&self,
_ctx: &SystemPromptContext,
config: &Value,
) -> Vec<Arc<dyn ToolDefinitionHook>>
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, …).
Default delegates to Self::tool_definition_hooks_with_config, which
ignores the context. Capabilities whose hooks carry session-scoped state
override this to capture ctx — e.g. tool_search keys its
progressive-disclosure reveal set by ctx.session_id, since the
capability is a process-global singleton shared across sessions and a
ToolDefinitionHook::transform has no session context of its own.
Sourcefn tool_call_hooks(&self) -> Vec<Arc<dyn ToolCallHook>>
fn tool_call_hooks(&self) -> Vec<Arc<dyn ToolCallHook>>
Returns tool call hooks provided by this capability.
These hooks run after the model has produced a tool call. They can read model-authored metadata for UI display and transform the tool call used for actual execution.
By default, returns an empty vector (no tool call handling).
Sourcefn narrate(
&self,
_tool_def: Option<&ToolDefinition>,
tool_call: &ToolCall,
phase: ToolNarrationPhase,
locale: Option<&str>,
ctx: ToolNarrationContext<'_>,
) -> Option<String>
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”).
The default dispatches to the matching tool’s
crate::tools::Tool::narrate, so a capability narrates its tools for
free — narration lives on the tool that owns it. Override this only when
narration is config-driven or spans tools, or when the tools are dynamic
(e.g. proxied MCP tools that have no local Tool struct).
Returns None for tool names this capability does not provide, so other
capabilities — or the generic fallback in crate::tool_narration —
can handle them. The framework consults this for every applied
capability (see assemble/CapabilityNarrationHook) on the act path.
Sourcefn user_hooks(&self) -> Vec<UserHookSpec>
fn user_hooks(&self) -> Vec<UserHookSpec>
Returns user-defined hook specifications contributed by this capability.
User hooks are JSON-serializable specs (see
crate::user_hook_types::UserHookSpec and specs/user-hooks.md) that
the HookAdapterBuilder validates and turns into per-event
Arc<dyn …Hook> adapters during capability collection. Capabilities
that ship reusable hook bundles (formatters, security guards, audit
commands) override this; the user-facing user_hooks capability also
uses this hook to surface user-config-authored entries.
Contributors return data only — the executor is constructed centrally by the core so global timeout/output/sandbox limits cannot be bypassed.
By default, returns an empty vector (no contributed hooks).
Sourcefn user_hooks_with_config(&self, _config: &Value) -> Vec<UserHookSpec>
fn user_hooks_with_config(&self, _config: &Value) -> Vec<UserHookSpec>
Returns user-defined hook specifications adapted to per-capability config.
Default delegates to user_hooks(). The user_hooks capability
overrides this to parse hook entries out of its config.
Sourcefn risk_level(&self) -> RiskLevel
fn risk_level(&self) -> RiskLevel
Returns the risk level of this capability.
TM-AGENT-005: High-risk capabilities (code execution, network access) require admin approval when assigned to agents/harnesses. Capabilities that combine execution + network access enable data exfiltration.
By default, returns RiskLevel::Low.
Sourcefn commands(&self) -> Vec<CommandDescriptor>
fn commands(&self) -> Vec<CommandDescriptor>
Returns system commands this capability provides.
System commands are user-invocable /slash commands that execute directly without involving the LLM. They are surfaced in the UI command palette alongside invocable skills.
By default, returns an empty vector (no commands).
Sourcefn 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,
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.
Capabilities that declare commands MUST override this. The default
implementation returns an error so that misconfigurations surface at
invocation time rather than silently succeeding. Capabilities should
match on request.name, validate request.arguments, and use the
references they captured at construction time to mutate any external
state (provider store, file system, etc.).
Commands that need the session’s assembled context or an out-of-band
LLM call (e.g. /btw) use the host facilities on
CommandExecutionContext::host — see
crate::command_host::CommandHost and specs/commands.md.
Sourcefn agent_blueprints(&self) -> Vec<AgentBlueprint>
fn agent_blueprints(&self) -> Vec<AgentBlueprint>
Returns agent blueprints contributed by this capability.
Blueprints are pre-built agent definitions with private tools, baked-in prompts,
and fixed/default models. They are spawned via spawn_agent with a subagent target
and blueprint.
Blueprint tools never appear in the host agent’s tool list.
By default, returns an empty vector (no blueprints).
Sourcefn contribute_skills(&self) -> Vec<SkillContribution>
fn contribute_skills(&self) -> Vec<SkillContribution>
Returns skills contributed by this capability in code.
Contributions are normalized during capability collection into read-only
mount points at /.agents/skills/{name}/ so the built-in skills
capability discovers them alongside user-uploaded and registry-based
skills. This keeps discovery, prompt listing, and activation in one
place rather than adding a parallel skill pipeline.
By default, returns an empty vector (no contributed skills).
Sourcefn output_guardrails(&self) -> Vec<Arc<dyn OutputGuardrail>>
fn output_guardrails(&self) -> Vec<Arc<dyn OutputGuardrail>>
Returns streaming output guardrails contributed by this capability.
Each provider is armed once per assistant message stream with the
fully assembled system prompt and per-capability config; the returned
per-stream OutputGuardrailRun is invoked after every batched delta
in the streaming hot path. Returning Block aborts the stream and
the client is told to replace the accumulated text with a canned
message. See crate::output_guardrail.
Default: no guardrails.
Sourcefn post_output_guardrails_with_config(
&self,
_config: &Value,
) -> Vec<Arc<dyn PostGenerationOutputGuardrail>>
fn post_output_guardrails_with_config( &self, _config: &Value, ) -> Vec<Arc<dyn PostGenerationOutputGuardrail>>
Async, end-of-message output guardrails (EVE-573).
Unlike Self::output_guardrails (synchronous, per-delta, hot path),
these providers run once on the fully assembled assistant message
after streaming completes and before the message is finalized into
context. They receive an LLM-capable context and may perform I/O (e.g.
a moderation classifier). The per-agent capability config is passed so a
capability contributes nothing unless it has an applicable check
configured — keeping the common (no-output-check) case free of work.
Default: no guardrails.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".