import type { Database } from "./database.js"; import type { Evidence, RetrievalMethod, VerifyResult } from "../types/index.js"; export interface EvidenceInput { file: string; start_line: number; end_line: number; commit_sha: string | null; chunk_id: number | null; symbol: string | null; method: RetrievalMethod; score: number; content_hash: string; } export interface StoredEvidence extends EvidenceInput { id: string; created_at: number; } export declare class EvidenceStore { private db; private insertStmt; private getByIdStmt; private countStmt; private deleteOldStmt; private deleteOverflowStmt; constructor(db: Database); purge(now?: number): number; private insertsSincePurge; private static readonly PURGE_INTERVAL; insert(input: EvidenceInput): string; getById(id: string): StoredEvidence | null; count(): number; /** * Convert a stored row back to the public `Evidence` shape used in the * tool-response envelope. `chunk_id` / `symbol` are null→undefined'd. */ toEvidence(row: StoredEvidence): Evidence; } export declare function hashSpan(content: string): string; /** * Compute a cheap Jaccard-on-tokens similarity between two code spans. * Tokens are identifier-ish: `[A-Za-z0-9_]+`. Whitespace + punctuation * collapse to token boundaries. 1.0 = identical token bag, 0.0 = disjoint. */ export declare function spanSimilarity(a: string, b: string): number; /** * Classify the result of comparing the original evidence span to what's in * the file now. */ export declare function classifyVerify(opts: { fileExists: boolean; originalHash: string; currentHash: string | null; similarity: number | null; linesMoved: boolean; }): VerifyResult["status"];