Retrieval Router
The single retrieval router shared by every discovery presentation tier (MCP tools, REST).
Routes each RetrievalMode to its capability fragment via as?-checks and degrades gracefully: an absent fragment yields a typed-empty result with supported = false, never a silent full scan. The context is baked in at construction so a caller cannot read across contexts — only the query's mode/text/entity/window/bounds are honoured, never a context override.
Traversal depth and result size are clamped before routing to bound cost.
Parameters
the backing proposition store; its declared fragments determine which modes are natively supported
the portable graph facade for GRAPH_WALK and the HYBRID expansion arm
the fixed access-control scope for this router
Constructors
Functions
Execute query, returning a leak-free DiscoveryResult. Never throws for an absent fragment; degrades to typed-empty with supported = false instead.
Whether the fragment backing mode is present on the wrapped store.
Lineage query mapped to a leak-free lineage DTO (null when absent). Returns not-found (null) when the resolved proposition belongs to another context, so a caller bound to one context can never read lineage for a foreign-context proposition id.