Documentation
¶
Index ¶
- type Engine
- func (e *Engine) Bindings(label string) string
- func (e *Engine) Explain(label string) string
- func (e *Engine) FindNode(term string) (types.Node, bool)
- func (e *Engine) Graph() *types.Graph
- func (e *Engine) Lookup(term string, limit int) []LookupCandidate
- func (e *Engine) Neighbors(label string) ([]Neighbor, error)
- func (e *Engine) NodeByID(id string) (types.Node, bool)
- func (e *Engine) Path(fromLabel, toLabel string) string
- func (e *Engine) Query(input string) string
- func (e *Engine) RenderLookup(term string, limit int) string
- func (e *Engine) Route(input string) string
- func (e *Engine) RunRequest(req types.QueryRequest) (string, error)
- func (e *Engine) Search(term string, limit int) []types.Node
- func (e *Engine) Stats() GraphStats
- type GraphStats
- type LookupCandidate
- type Neighbor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine wraps a loaded graph and answers queries against it.
func LoadFromFile ¶
LoadFromFile reads graph.json and constructs a query Engine.
func (*Engine) Bindings ¶ added in v1.4.0
Bindings returns queryable memory reference binder state for the given node.
func (*Engine) FindNode ¶ added in v1.5.0
FindNode resolves a node by ID, exact label, or fuzzy label match.
func (*Engine) Lookup ¶ added in v1.7.1
func (e *Engine) Lookup(term string, limit int) []LookupCandidate
Lookup returns ranked node candidates for a broad term without pretending to answer a structural graph question directly.
func (*Engine) Neighbors ¶ added in v1.5.0
Neighbors returns all incoming and outgoing edges for the given node.
func (*Engine) Path ¶
Path finds the shortest directed path from nodeA to nodeB. Returns a human-readable string.
func (*Engine) RenderLookup ¶ added in v1.7.1
RenderLookup formats ranked candidates with enough metadata to pick an exact subject for follow-up structural graph queries.
func (*Engine) RunRequest ¶ added in v1.7.1
func (e *Engine) RunRequest(req types.QueryRequest) (string, error)
RunRequest executes the reduced graph-truth query contract used by the new CLI, TUI, server, and MCP surfaces.
func (*Engine) Stats ¶ added in v1.5.0
func (e *Engine) Stats() GraphStats
Stats returns a structured graph summary.
type GraphStats ¶ added in v1.5.0
type GraphStats struct {
NodeCount int
EdgeCount int
CommunityCount int
NodeTypes map[string]int
ConfidenceTypes map[string]int
}
GraphStats summarizes the graph contents for diagnostics and MCP output.
type LookupCandidate ¶ added in v1.7.1
LookupCandidate is a ranked node suggestion for broad discovery queries.