import type { Entity, Relation } from "../utils/types.js"; import type { IGraphStore } from "./interfaces.js"; export declare class GraphStore implements IGraphStore { /** Remove relations by id (wave-2 dedup pass). Unknown ids are ignored. */ removeRelations(relationIds: Set): Promise<{ removed: number; }>; private readonly entitiesPath; private readonly relationsPath; private readonly graphDir; constructor(twiningDir: string); /** Ensure graph directory and files exist. */ private ensureFiles; /** * Add or update an entity. * Upsert: match by name+type. If found, merge properties and update timestamp. * If not found, create new entity with generated ID. */ addEntity(input: { name: string; type: Entity["type"]; properties?: Record; }): Promise; /** * Add a relation between two entities. * Source/target can be entity ID or name. * Resolves by ID first, then by name. Throws AMBIGUOUS_ENTITY if name matches multiple. */ addRelation(input: { source: string; target: string; type: Relation["type"]; properties?: Record; }): Promise; /** Get all entities. Returns [] if file doesn't exist. */ getEntities(): Promise; /** Get all relations. Returns [] if file doesn't exist. */ getRelations(): Promise; /** Find entity by ID. Returns undefined if not found. */ getEntityById(id: string): Promise; /** Find entities by name, optionally filtered by type. */ getEntityByName(name: string, type?: string): Promise; /** * Remove entities by ID, along with any relations that reference them. * Returns the count of removed entities and relations. */ removeEntities(entityIds: Set): Promise<{ removedEntities: number; removedRelations: number; }>; } //# sourceMappingURL=graph-store.d.ts.map