pub struct Capabilities {
pub query: QueryCapability,
pub correlation: bool,
pub graph: bool,
pub embeddings_fingerprint: Option<String>,
pub verify: bool,
pub representations: Vec<Representation>,
pub resolve: bool,
}Expand description
What a provider can do, negotiated at handshake time.
Every field here is a capability a host can actually exercise. upsert and
subscribe were removed in the pre-freeze sweep because neither had a wire
method, a host API, a schema entry, or a conformance check — a provider
could declare a capability no host on earth could use. See
ADR 0004, and the design
sketches under docs/sketches/ that keep both doors open for a 1.x
additive minor.
Unknown fields are ignored on deserialization, so a provider still emitting the removed flags handshakes successfully — the removal breaks the Rust API, not the wire.
Fields§
§query: QueryCapability§correlation: boolThe provider echoes the id of a request on its reply, so a host may
pipeline concurrent exchanges over one connection (SPEC.md §H4).
Negotiated explicitly rather than discovered by observation. A host that
sent an id speculatively could not tell a provider that does not
implement correlation from one that implements it incorrectly, which
makes the guarantee uncheckable — and an uncheckable guarantee is the
thing this protocol exists to avoid. A provider that does not declare it
is queried in lock-step and stays fully conformant.
graph: boolThe provider serves FrameKind::Graph frames
and populates Relation edges. Gates the graph
conformance checks (SPEC.md §G1–G3).
embeddings_fingerprint: Option<String>Identifies the embedding space this provider indexes, so a host never sends it a vector from a different model.
Format: <model-id>/<dimensions>[/<normalization>], e.g.
bge-small-en-v1.5/384/l2. Matching is exact — see
embedding_fingerprints_match
and SPEC.md §E1.
verify: boolWhether this provider answers context/verify — pull-based
revalidation of frames a host already holds (docs/context-reuse.md
§4). Defaults to false, so a provider that says nothing is treated as
not supporting it and the host falls back to re-querying.
representations: Vec<Representation>The frame representations this provider can return
(build prompt §“Capability negotiation”). Empty ⇒ full only, the
legacy default, so a provider that says nothing keeps working.
resolve: boolWhether this provider answers context/resolve for a frame’s
content_ref. Compact/reference support implies
resolve support (representations_consistent).
Implementations§
Source§impl Capabilities
impl Capabilities
Sourcepub fn offered_representations(&self) -> Vec<Representation>
pub fn offered_representations(&self) -> Vec<Representation>
The representations this provider actually offers, defaulting to [full]
when it advertised none (the legacy contract).
Sourcepub fn representations_consistent(&self) -> bool
pub fn representations_consistent(&self) -> bool
Whether the advertised representations are honest: compact/reference
both hand the host a content_ref to rehydrate, so
a provider that cannot resolve must not advertise
them. A provider offering only full is always consistent.
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 more