Skip to main content

Module plugin_api

Module plugin_api 

Source
Expand description

The three plugin contracts of the graph-storage gateway.

The gear is a stateless gateway over a pluggable store: every byte it serves comes from a GraphStoreV1 implementation behind the port, and the built-in PostgreSQL store is registered exactly as an external plugin would be. GraphEngineV1 serves traversal expansion; EmbeddingProviderV1 turns text into vectors.

An implementation that cannot provide an obligation declares the corresponding capability absent and returns Unsupported from the affected method. It never implements a weaker version — a silently weakened guarantee is worse than an absent capability, because the gear can route around the second and not the first.

Structs§

EmbedRequest
Batched, not per item: the batch is where a remote provider’s round trip is amortized.
EmbedResponse
EmbeddingPlan
The embedding decisions of one ingest batch.
EmbeddingState
What a store holds of one node’s vector, for the coordinator’s skip decision. Two facts, because both are needed: a vector is worth keeping only if it was made from the node’s current text (input_hash) and is rankable under the current space (vector_epoch).
EngineCursor
The engine’s applied (source epoch, graph revision) position. The epoch is a non-reusable timeline identifier, so a projection that survived a point-in-time restore of the source database is detected rather than served.
ExpandRequest
Directed one-hop expansion request. Direction is explicit because the undirected shorthand plans as an all-vertex probe; expansion is a one-hop primitive because multi-hop chain patterns enumerate paths and explode on hubs.
ExpandResponse
NodeEmbedding
What the Embedding Coordinator decided about one node, for the store to write. Index-aligned with IngestRequest::nodes — the same convention EmbedResponse::vectors uses, and for the same reason: any other association would have to be keyed on something a batch may legitimately repeat.
PathResponse
PatternRequest
Declared-capability pattern matching (not shipped by the built-in engine).
PatternResponse
ShortestPathRequest
StoreCtx
Per-call context. The compiled scope is mandatory, not optional: authorization has to reach inside the statements (a search arm applies it before ranking and LIMIT), so it cannot be a filter the gear applies to whatever the plugin returns.
VectorArm
The vector arm of one search, as the coordinator resolved it.

Enums§

EmbeddingProviderError
Provider-side failure vocabulary. A provider failure fails the ingest batch; it is never downgraded to an unembedded write.
GraphEngineError
Engine-side failure vocabulary.
GraphStoreError
Store-side failure vocabulary. The gear normalizes these into canonical errors before they cross the public boundary; no vendor text survives.
HopBackend
The hop backends of ADR-0005, as the answer reports them.

Traits§

EmbeddingProviderV1
The embedding-provider plugin contract (cpt-cf-graph-storage-contract-embedding-provider).
GraphEngineV1
The traversal-engine plugin contract (cpt-cf-graph-storage-contract-graph-engine-plugin).
GraphStoreV1
The store plugin contract (cpt-cf-graph-storage-contract-graph-store-plugin).