/** * Graph Mutation Manager * Handles all graph modification operations */ import { KnowledgeNode, KnowledgeTriad, GraphMutation } from '../types'; import { IGraphDatabaseService } from '../services/graph-database-service'; import { IGraphStateManager } from './graph-state-manager'; export interface IGraphMutationManager { mutateGraph(mutation: GraphMutation, stateManager: IGraphStateManager, databaseService: IGraphDatabaseService): Promise; applyMutationToMemory(mutation: GraphMutation, stateManager: IGraphStateManager): Promise; batchAddNodes(nodes: Array>, stateManager: IGraphStateManager, databaseService: IGraphDatabaseService): Promise; batchAddTriads(triads: Array>, stateManager: IGraphStateManager, databaseService: IGraphDatabaseService): Promise; batchRemoveNodes(nodeIds: string[], stateManager: IGraphStateManager): Promise; batchRemoveTriads(triadIds: string[], stateManager: IGraphStateManager): Promise; mergeNodes(sourceNodeId: string, targetNodeId: string, stateManager: IGraphStateManager): Promise; splitNode(nodeId: string, splitCriteria: (triad: KnowledgeTriad) => boolean, stateManager: IGraphStateManager): Promise<{ node1Id: string; node2Id: string; }>; replaceNode(oldNodeId: string, newNode: Omit, stateManager: IGraphStateManager, databaseService: IGraphDatabaseService): Promise; removeOrphanedNodes(stateManager: IGraphStateManager): Promise; removeDuplicateTriads(stateManager: IGraphStateManager): Promise; removeWeakConnections(confidenceThreshold: number, stateManager: IGraphStateManager): Promise; optimizeGraph(stateManager: IGraphStateManager): Promise<{ orphanedNodes: string[]; duplicateTriads: string[]; weakConnections: string[]; }>; } export declare class GraphMutationManager implements IGraphMutationManager { private logger; mutateGraph(mutation: GraphMutation, stateManager: IGraphStateManager, databaseService: IGraphDatabaseService): Promise; applyMutationToMemory(mutation: GraphMutation, stateManager: IGraphStateManager): Promise; batchAddNodes(nodes: Array>, stateManager: IGraphStateManager, databaseService: IGraphDatabaseService): Promise; batchAddTriads(triads: Array>, stateManager: IGraphStateManager, databaseService: IGraphDatabaseService): Promise; batchRemoveNodes(nodeIds: string[], stateManager: IGraphStateManager): Promise; batchRemoveTriads(triadIds: string[], stateManager: IGraphStateManager): Promise; mergeNodes(sourceNodeId: string, targetNodeId: string, stateManager: IGraphStateManager): Promise; splitNode(nodeId: string, splitCriteria: (triad: KnowledgeTriad) => boolean, stateManager: IGraphStateManager): Promise<{ node1Id: string; node2Id: string; }>; replaceNode(oldNodeId: string, newNode: Omit, stateManager: IGraphStateManager, databaseService: IGraphDatabaseService): Promise; removeOrphanedNodes(stateManager: IGraphStateManager): Promise; removeDuplicateTriads(stateManager: IGraphStateManager): Promise; removeWeakConnections(confidenceThreshold: number, stateManager: IGraphStateManager): Promise; /** * Optimize graph structure by removing redundant connections */ optimizeGraph(stateManager: IGraphStateManager): Promise<{ orphanedNodes: string[]; duplicateTriads: string[]; weakConnections: string[]; }>; /** * Compact node IDs to save memory */ compactNodeIds(stateManager: IGraphStateManager): Promise>; /** * Validate and repair graph integrity */ validateAndRepair(stateManager: IGraphStateManager): Promise<{ isValid: boolean; repairs: string[]; errors: string[]; }>; private extractTriadIdFromError; } //# sourceMappingURL=graph-mutation-manager.d.ts.map