Skip to main content

Module provider

Module provider 

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

ContextProvider
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 kinds filter 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 by query_all to fan out only to relevant providers.
frame_kind_name
The snake_case wire name of a FrameKind, matching its serde representation and the strings a provider lists in Capabilities::query’s kinds.