export interface RepoGroundingFile { path: string; symbols: string[]; keywords: string[]; } export interface RepoGroundingIndex { schemaVersion: "martin.grounding.v1"; repoRoot: string; createdAt: string; fileCount: number; files: RepoGroundingFile[]; trackedPaths?: string[]; repositoryFingerprint?: string; } export interface RepoGroundingHit { path: string; score: number; matchedTerms: string[]; symbols: string[]; } export declare function resolveGroundingRoot(env?: NodeJS.ProcessEnv): string; export declare function loadOrBuildRepoGroundingIndex(repoRoot: string): Promise; export declare function buildRepoGroundingIndex(repoRoot: string, repositoryFingerprint?: string): Promise; export declare function queryRepoGroundingIndex(index: RepoGroundingIndex, query: string, limit?: number): RepoGroundingHit[]; export type GroundingViolationKind = "file_not_found" | "symbol_not_found" | "import_not_found" | "patch_outside_allowed_paths"; export interface GroundingViolation { kind: GroundingViolationKind; reference: string; sourceHint?: string; } export interface GroundingScanResult { violations: GroundingViolation[]; scannedReferences: number; resolvedFiles: string[]; /** True when the diff adds only comments, whitespace, or empty lines — no substantive code. */ contentOnly: boolean; } export declare function scanPatchForGroundingViolations(diff: string, index: RepoGroundingIndex, options?: { allowedPaths?: string[]; }): GroundingScanResult;