Expand description
The uniform provider handle.
Every context source — an in-process built-in, a child process over
stdio, or a remote HTTP endpoint — reaches the host through one trait,
ContextProvider. Its shape mirrors the two Context Graph Protocol methods a host always
needs: capability negotiation (cached from the handshake, SPEC.md §3) and
context/query (SPEC.md §5). stella-context and any other Rust agent drive
all three provider kinds through this single interface
(SPEC.md §1 — “usable by any other Rust agent that wants Context Graph Protocol
support”).
Traits§
- Context
Provider - A registered Context Graph Protocol provider, queryable behind one handle regardless of
transport.
info()/capabilities()return values cached at handshake time, so they are cheap synchronous getters even for out-of-process providers.
Functions§
- capability_
matches - Whether a provider is worth querying for a given request. A query with no
kindsfilter matches every provider (the host wants everyone’s best frames, SPEC.md §5); otherwise a provider matches when it declares at least one of the requested frame kinds. Used byquery_allto fan out only to relevant providers. - frame_
kind_ name - The snake_case wire name of a
FrameKind, matching itsserderepresentation and the strings a provider lists inCapabilities::query’skinds.