import type { Database } from "./database.js"; export type DocMatchKind = "backtick" | "fenced_code" | "bare"; export type DocEdgeKind = "includes" | "references"; export interface DocMention { id: number; doc_chunk_id: number; target_symbol: string; target_chunk_id: number | null; match_kind: DocMatchKind; edge_kind: DocEdgeKind; confidence: number; } export interface DocMentionInput { doc_chunk_id: number; target_symbol: string; target_chunk_id: number | null; match_kind: DocMatchKind; edge_kind?: DocEdgeKind; confidence: number; } export interface DocMentionWithDoc extends DocMention { doc_file_path: string; doc_start_line: number; doc_end_line: number; doc_breadcrumb: string | null; } export declare function defaultEdgeKindFor(match: DocMatchKind): DocEdgeKind; export declare class DocEdgeStore { private db; private insertStmt; private deleteByDocStmt; private getBySymbolStmt; private getByChunkStmt; private countStmt; constructor(db: Database); insert(m: DocMentionInput): void; /** * Filter doc mentions for a symbol by edge kind. `includes` returns * structural section-of links (the doc section documents the symbol); * `references` returns associative see-also mentions. */ getBySymbolByKind(symbol: string, edgeKind: DocEdgeKind, limit?: number): DocMentionWithDoc[]; insertMany(inputs: DocMentionInput[]): void; deleteForDocChunk(docChunkId: number): void; /** * All doc chunks that mention the given symbol. Returns up to `limit` * rows, highest-confidence first. */ getBySymbol(symbol: string, limit?: number): DocMentionWithDoc[]; /** * All doc mentions that resolved to a specific chunk id. */ getByChunkId(chunkId: number): DocMention[]; count(): number; }