import type { GraphInstance } from './graphology-compat.js'; import type { PathResult, SubgraphResult } from '../types.js'; import type { DatabaseHandle } from '../store/db.js'; /** * Info returned for each neighbor discovered by BFS traversal. */ export interface NeighborInfo { id: string; title: string; } /** * BFS from `nodeId` up to `depth` hops (treating the graph as undirected by * unioning in/out neighbors). The seed itself is not returned. Returns [] if * the seed is not present. */ export declare function findNeighbors(graph: GraphInstance, nodeId: string, depth: number): NeighborInfo[]; /** * Find every simple path from `from` to `to` with at most `maxDepth` edges. * Treats the graph as undirected (paths may traverse edges either way). */ export declare function findPaths(graph: GraphInstance, from: string, to: string, maxDepth: number): PathResult[]; /** * Intersection of the (undirected) neighborhoods of two nodes. */ export declare function commonNeighbors(graph: GraphInstance, a: string, b: string): Array<{ id: string; title: string; }>; /** * BFS-expand a seed node out to `depth` hops and return the induced subgraph * (nodes + every edge between visited nodes, directed as in the source). */ export declare function extractSubgraph(graph: GraphInstance, seed: string, depth: number, db?: DatabaseHandle): SubgraphResult;