/** * @module minions-sdk/relations * Relation graph utilities — manage typed links between minions. */ import type { Relation, RelationType, CreateRelationInput } from '../types/index.js'; /** * In-memory relation graph manager. * Provides utilities to add, remove, query, and traverse relations. */ export declare class RelationGraph { private relations; /** * Add a relation to the graph. * @returns The created Relation. */ add(input: CreateRelationInput): Relation; /** * Remove a relation by ID. * @returns true if the relation was removed. */ remove(id: string): boolean; /** * Remove all relations involving a given minion (as source or target). * @returns Number of relations removed. */ removeByMinionId(minionId: string): number; /** * Get a relation by ID. */ get(id: string): Relation | undefined; /** * Get all relations. */ list(): Relation[]; /** * Get all relations where the given minion is the source. */ getFromSource(sourceId: string, type?: RelationType): Relation[]; /** * Get all relations where the given minion is the target. */ getToTarget(targetId: string, type?: RelationType): Relation[]; /** * Get children of a minion (targets of parent_of relations from this minion). */ getChildren(parentId: string): string[]; /** * Get parents of a minion (sources of parent_of relations to this minion). */ getParents(childId: string): string[]; /** * Get the full tree of descendants from a root minion using parent_of relations. * Returns a flat array of all descendant IDs (depth-first). */ getTree(rootId: string): string[]; /** * Get all minions connected to the given minion (regardless of direction or type). * Returns a flat array of connected minion IDs. */ getNetwork(minionId: string): string[]; } //# sourceMappingURL=index.d.ts.map