/**
 * Unified in-memory graph model.
 *
 * Stores directed (default) or undirected graphs with node/edge attributes.
 * Node IDs are always strings. DB integer IDs should be stringified before use.
 */
export interface NodeAttrs {
    [key: string]: unknown;
}
export interface EdgeAttrs {
    [key: string]: unknown;
}
export interface CodeGraphOpts {
    directed?: boolean;
}
export declare class CodeGraph {
    private _directed;
    private _nodes;
    private _successors;
    private _predecessors;
    constructor(opts?: CodeGraphOpts);
    get directed(): boolean;
    get nodeCount(): number;
    get edgeCount(): number;
    addNode(id: string | number, attrs?: NodeAttrs): this;
    hasNode(id: string | number): boolean;
    getNodeAttrs(id: string | number): NodeAttrs | undefined;
    nodes(): IterableIterator<[string, NodeAttrs]>;
    nodeIds(): string[];
    addEdge(source: string | number, target: string | number, attrs?: EdgeAttrs): this;
    hasEdge(source: string | number, target: string | number): boolean;
    getEdgeAttrs(source: string | number, target: string | number): EdgeAttrs | undefined;
    edges(): Generator<[string, string, EdgeAttrs]>;
    private _directedEdges;
    private _undirectedEdges;
    /** Direct successors of a node (outgoing edges). */
    successors(id: string | number): string[];
    /** Direct predecessors of a node (incoming edges). */
    predecessors(id: string | number): string[];
    /** All neighbors (union of successors + predecessors). */
    neighbors(id: string | number): string[];
    outDegree(id: string | number): number;
    inDegree(id: string | number): number;
    /** Return a new graph containing only nodes matching the predicate. */
    subgraph(predicate: (id: string, attrs: NodeAttrs) => boolean): CodeGraph;
    /** Return a new graph containing only edges matching the predicate. */
    filterEdges(predicate: (source: string, target: string, attrs: EdgeAttrs) => boolean): CodeGraph;
    /** Convert to flat edge array for native Rust interop. */
    toEdgeArray(): {
        source: string;
        target: string;
    }[];
    clone(): CodeGraph;
    /** Merge another graph into this one. Nodes/edges from other override on conflict. */
    merge(other: CodeGraph): this;
}
//# sourceMappingURL=model.d.ts.map