import type { KnowledgeGraphEdge, KnowledgeGraphNode, KnowledgeGraphSnapshot } from '../association/knowledge-graph.js'; export interface GraphInsight { type: 'isolated_node' | 'bridge_node' | 'sparse_community' | 'unexpected_association'; nodeIds: string[]; score: number; summary: string; metadata?: Record; } export interface GraphVisualizationNode { id: string; label: string; color: string; size: number; type: KnowledgeGraphNode['type']; domain?: string; x?: number; y?: number; markers: GraphInsight['type'][]; } export interface GraphVisualizationEdge { id: string; source: string; target: string; style: 'solid' | 'dashed' | 'dotted'; color: string; width: number; type: KnowledgeGraphEdge['type']; } /** * FR-G03-AC4: Summary card data shown on node click. */ export interface NodeSummaryCard { entryId: string; title: string; type: KnowledgeGraphNode['type']; domain?: string; summary: string; confidence?: number; sourceRef: string; createdAt: Date; updatedAt: Date; neighborCount: number; insightMarkers: GraphInsight['type'][]; } /** * FR-G03-AC2: Interaction capabilities descriptor. * Declares which interactions the visualization data supports. */ export interface GraphInteractionCapabilities { zoom: boolean; pan: boolean; nodeDrag: boolean; focusOnClick: boolean; summaryCardOnClick: boolean; } /** * FR-G02-AC5: Research task suggestion generated from an insight. */ export interface InsightResearchTask { insightType: GraphInsight['type']; title: string; description: string; targetNodeIds: string[]; priority: 'low' | 'medium' | 'high'; } export interface GraphVisualizationData { layout: 'force-directed'; nodes: GraphVisualizationNode[]; edges: GraphVisualizationEdge[]; filters: { domains: string[]; types: string[]; timeRange?: { from?: Date; to?: Date; }; }; /** FR-G03-AC2: Interaction capabilities */ interactions: GraphInteractionCapabilities; /** FR-G03-AC4: Pre-built summary cards keyed by node id */ summaryCards: Map; } export interface InsightOptions { sparseCommunityThreshold?: number; bridgeCentralityThreshold?: number; unexpectedAssociationThreshold?: number; } export declare class GraphInsightAnalyzer { /** * FR-G02-AC5: Generate research task suggestions from insights. */ toResearchTasks(insights: GraphInsight[]): InsightResearchTask[]; /** * FR-G03-AC4: Build a summary card for a specific node. */ buildSummaryCard(node: KnowledgeGraphNode, snapshot: KnowledgeGraphSnapshot, insights: GraphInsight[]): NodeSummaryCard; analyze(snapshot: KnowledgeGraphSnapshot, options?: InsightOptions): GraphInsight[]; toVisualizationData(snapshot: KnowledgeGraphSnapshot, insights: GraphInsight[], filters: GraphVisualizationData['filters']): GraphVisualizationData; } //# sourceMappingURL=graph-insights.d.ts.map