import type Database from 'better-sqlite3'; import type { RelationshipCoverageBreakdown, RelationshipInteractionCoverage } from '../schema.js'; import type { InteractionRepository } from './interaction-repository.js'; /** * Service for interaction analysis — relationship coverage, validation, and diagnostics. * Extracted from InteractionRepository to separate analysis from CRUD. */ export declare class InteractionAnalysis { private db; constructor(db: Database.Database); /** * Get relationship-to-interaction coverage statistics. */ getRelationshipCoverage(): RelationshipInteractionCoverage; /** * Get detailed breakdown of relationship coverage for diagnostics. */ getRelationshipCoverageBreakdown(): RelationshipCoverageBreakdown; /** * Get cross-module relationship pairs that have no corresponding interaction. */ getUncoveredModulePairs(): Array<{ fromModuleId: number; toModuleId: number; fromPath: string; toPath: string; relationshipCount: number; }>; /** * Create interaction edges for inheritance relationships (extends/implements). */ syncInheritanceInteractions(): { created: number; }; /** * Validate all llm-inferred interactions. */ validateInferredInteractions(interactionRepo: InteractionRepository, isSameProcess?: (fromModuleId: number, toModuleId: number) => boolean): Array<{ interactionId: number; fromModuleId: number; toModuleId: number; fromPath: string; toPath: string; issue: string; }>; /** * Get detailed relationship annotation rows between two modules' members. */ getRelationshipDetailsForModulePair(fromModuleId: number, toModuleId: number): Array<{ fromName: string; fromKind: string; toName: string; toKind: string; semantic: string; relationshipType: string; }>; /** * Check if an interaction exists in the reverse direction (toModuleId → fromModuleId). */ hasReverseInteraction(fromModuleId: number, toModuleId: number): boolean; /** * Detect fan-in anomalies: modules with unusually high llm-inferred inbound * connections but zero AST inbound connections (hallucination pattern). * * Uses Tukey's standard outlier fence (Q3 + 1.5*IQR) with an absolute minimum of 4. */ detectFanInAnomalies(): Array<{ moduleId: number; modulePath: string; llmFanIn: number; astFanIn: number; }>; /** * Get symbols from relationship annotations for a module pair. */ getRelationshipSymbolsForPair(fromModuleId: number, toModuleId: number): string[]; } //# sourceMappingURL=interaction-analysis.d.ts.map