/** * Entity relationship graph for iranti. * * Stores and queries directed relationships between entities in the * `entityRelationship` table. Relationships are identified by a 5-tuple * `(fromType, fromId, relationshipType, toType, toId)` and are upserted * idempotently so callers can register the same edge multiple times safely. * * Supports bidirectional traversal: `getRelated` returns both outbound and * inbound edges labelled with `direction`. `getRelatedDeep` walks the graph * up to `depth` hops (default 2), deduplicating visited nodes. * * Used by: * - `contextual-conflicts.ts` — cross-entity semantic consistency checks * - `agent-registry.ts` — MEMBER_OF team assignments * - MCP `iranti_related` / `iranti_related_deep` tools */ export interface RelationshipInput { fromType: string; fromId: string; relationshipType: string; toType: string; toId: string; createdBy: string; properties?: Record; } export interface Relationship { fromType: string; fromId: string; relationshipType: string; toType: string; toId: string; properties: Record; createdAt: Date; } export interface RelatedEntity { entityType: string; entityId: string; relationshipType: string; direction: 'outbound' | 'inbound'; properties: Record; } export declare function createRelationship(input: RelationshipInput): Promise; export declare function getRelated(entityType: string, entityId: string): Promise; export declare function getRelatedDeep(entityType: string, entityId: string, depth?: number): Promise; export declare function deleteRelationship(fromType: string, fromId: string, relationshipType: string, toType: string, toId: string): Promise; //# sourceMappingURL=relationships.d.ts.map