import type { StoragePlugin, Entity, Relationship, EntityType, RelationshipType, GraphResult } from './types.js'; import type { ErrorLogger } from './error-logger.js'; export declare class KnowledgeGraph { private storage; private errorLogger?; constructor(storage: StoragePlugin); setErrorLogger(logger: ErrorLogger): void; addEntity(name: string, type: EntityType, opts?: { metadata?: Record; knowledgeId?: string; }): Entity; getEntity(id: string): Entity | null; findEntity(name: string, type?: EntityType): Entity[]; updateEntity(id: string, updates: Partial>): void; removeEntity(id: string): void; addRelationship(from: string, to: string, type: RelationshipType, opts?: { weight?: number; metadata?: Record; }): Relationship; removeRelationship(id: string): void; neighbors(entityId: string, opts?: { direction?: 'in' | 'out' | 'both'; type?: RelationshipType; depth?: number; }): GraphResult; subgraph(entityId: string, depth: number): GraphResult; /** * Scan the knowledge table and create entities + relationships from existing entries. * Idempotent: uses the UNIQUE constraint on (name, entity_type) to skip duplicates. * Returns the number of entities created. */ extractEntitiesFromKnowledge(): number; private getRelationships; private getEntitiesByIds; private rowToEntity; private rowToRelationship; /** Extract file paths from text content. Matches common path patterns. */ private extractFilePaths; } //# sourceMappingURL=knowledge-graph.d.ts.map