pub struct Capabilities {Show 13 fields
pub schema_version: String,
pub tier: String,
pub version: String,
pub features: CapabilityFeatures,
pub models: CapabilityModels,
pub permissions: CapabilityPermissions,
pub hooks: CapabilityHooks,
pub compaction: CapabilityCompaction,
pub approval: CapabilityApproval,
pub transcripts: CapabilityTranscripts,
pub hnsw: CapabilityHnsw,
pub kg_backend: Option<String>,
pub memory_kinds: Vec<String>,
}Expand description
Top-level capabilities report for a running instance.
Schema versions:
- v1 (legacy, pre-v0.6.3.1):
tier,version,features,models. Reachable viaAccept-Capabilities: v1(HTTP) or the MCPacceptargument set to"v1". SeeCapabilitiesV1. - v2 (v0.6.3.1 honesty patch):
schema_version="2"plus thepermissions,hooks,compaction,approval,transcriptsblocks. v1 fields preserved at the same top-level paths — old clients that read v2 by name continue to work for the un-dropped fields. Default response shape.
v2 honesty patch (P1, v0.6.3.1):
features.recall_mode_activeandfeatures.reranker_activeare runtime state, not config-derived flags.features.memory_reflectionis now a{planned, version, enabled}object, not abool.compactionandtranscriptscarry the same planned-feature shape so operators can distinguish “disabled but built” from “not in this build.”permissions.mode = "advisory"until the enforcement gate ships in P4. Was"ask", which implied an active interactive loop.- The following fields were removed because no backing
implementation exists:
permissions.rule_summary,hooks.by_event,approval.subscribers,approval.default_timeout_seconds.
Fields§
§schema_version: StringSchema-version discriminator. Always "2" since v0.6.3.
tier: String§version: String§features: CapabilityFeatures§models: CapabilityModels§permissions: CapabilityPermissionsActive permission/governance rules. Pre-P4 reports the count of
namespaces that have a metadata.governance policy attached to
their standard memory; the underlying permission system itself
is P4 work.
hooks: CapabilityHooksRegistered hooks. Pre-v0.7 reports webhook subscriptions as a proxy (hook system itself is v0.7 Bucket 0).
compaction: CapabilityCompactionCompaction state. v0.8 work — reports {planned, version, enabled} until the subsystem ships.
approval: CapabilityApprovalApproval API state. Reports the live count of pending actions
from the existing pending_actions table.
transcripts: CapabilityTranscriptsSidechain-transcript state. v0.7 Bucket 1.7 work — reports
{planned, version, enabled} until the subsystem ships.
hnsw: CapabilityHnswv0.6.3.1 (P3, G2): HNSW vector-index health. Defaults to a quiet zero-state report; the MCP/HTTP capabilities wrapper overwrites with live process counters when the index module has run an eviction.
kg_backend: Option<String>v0.7 J1 — knowledge-graph backend tag. "age" when a Postgres
SAL adapter probed Apache AGE successfully at connect time;
"cte" when the deployment falls back to the recursive-CTE
path (every SQLite deployment + Postgres without AGE
installed). None when no SAL adapter is wired (the active
dispatch path through the legacy crate::db free functions
pre-J2). Operators consult this through ai-memory doctor and
memory_capabilities to verify which traversal path their
daemon actually runs. Skipped from the JSON wire when None
so v1 / v2 clients that don’t know the field round-trip cleanly.
memory_kinds: Vec<String>L1-1 (v0.7.0) — the set of typed memory kinds this binary
supports. Always ["observation", "reflection"] for v0.7.0;
Goal/Plan/Step/Decision land in L1-6/v0.8.0. Callers that want
to enumerate valid values for a memory_kind filter should
consult this field rather than hardcoding the list.
#[serde(default)] keeps older capabilities consumers that
don’t know the field from breaking.
Implementations§
Source§impl Capabilities
impl Capabilities
Sourcepub fn to_v1(&self) -> CapabilitiesV1
pub fn to_v1(&self) -> CapabilitiesV1
Project the v2 report down to the legacy v1 shape. Used to
honour Accept-Capabilities: v1 from older clients.
memory_reflection collapses from {planned, enabled} to a
single bool (enabled value). All v2-only fields
(recall_mode_active, reranker_active, permissions,
hooks, compaction, approval, transcripts) are dropped.
Sourcepub fn to_v3(
&self,
summary: String,
to_describe_to_user: String,
tools: Vec<ToolEntry>,
agent_permitted_families: Option<Vec<String>>,
your_harness_supports_deferred_registration: Option<bool>,
) -> CapabilitiesV3
pub fn to_v3( &self, summary: String, to_describe_to_user: String, tools: Vec<ToolEntry>, agent_permitted_families: Option<Vec<String>>, your_harness_supports_deferred_registration: Option<bool>, ) -> CapabilitiesV3
v0.7.0 (A1+A2+A3+A4): project the report into the v3 shape.
v3 = v2 +
- top-level
summary(A1) — terse description of operational access plus the three named recovery paths. - top-level
to_describe_to_user(A2) — plain-English end-user-facing sentence the LLM should repeat verbatim when asked “what tools do you have?”. No MCP jargon. - top-level
tools(A3) — per-tool array carrying name, family,loaded, andcallable_now.callable_nowcombines profile-side loaded-state with the[mcp.allowlist]agent-can-call decision so an LLM that keeps a manifest cache doesn’t need to ask twice to know whether a tool will resolve. - top-level
agent_permitted_families(A4, optional) — when the[mcp.allowlist]is enabled AND anagent_idis provided, lists the family names the requesting agent is allowed to access (collapses every callable_now=true entry’s family to a unique list). When the allowlist is disabled or no agent_id is provided, the field is omitted from the wire (so v2-shaped consumers see no churn from A4 alone).
All four are computed by the caller from the live Profile +
McpConfig + agent_id state because the Capabilities
struct itself doesn’t know which families the MCP server
actually advertised or which agent is asking.
A5 bumps the default wire shape to v3. v2 stays supported indefinitely.
Trait Implementations§
Source§impl Clone for Capabilities
impl Clone for Capabilities
Source§fn clone(&self) -> Capabilities
fn clone(&self) -> Capabilities
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Capabilities
impl Debug for Capabilities
Source§impl<'de> Deserialize<'de> for Capabilities
impl<'de> Deserialize<'de> for Capabilities
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Capabilities
impl RefUnwindSafe for Capabilities
impl Send for Capabilities
impl Sync for Capabilities
impl Unpin for Capabilities
impl UnsafeUnpin for Capabilities
impl UnwindSafe for Capabilities
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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