import type { DebtEntry, Feature, Flow, Junction, Loop, ModelNode, Scenario } from "../schema/index.js"; /** * A single successfully-parsed node together with the file it came from. * This is the raw ingredient both the graph builder and the T0 checker * (ID uniqueness in particular) need — keeping it as a flat list first * means "two nodes share an id" is representable before we collapse * anything into a Map. */ export interface ModelEntry { node: ModelNode; file: string; } export interface ModelGraph { byKind: { feature: Map; flow: Map; loop: Map; junction: Map; scenario: Map; debt: Map; }; /** Source file each id was loaded from (first occurrence wins on duplicates). */ sourceFile: Map; } export interface DuplicateId { id: string; files: string[]; } export declare function createEmptyGraph(): ModelGraph; /** * Builds a ModelGraph from a flat list of parsed entries. Duplicate ids * (same id appearing in more than one entry, whether same kind or not) * are reported rather than silently overwritten — first occurrence wins * in the graph, but every duplicate is surfaced so T0's ID-uniqueness * check can fail the build. */ export declare function buildGraph(entries: ModelEntry[]): { graph: ModelGraph; duplicateIds: DuplicateId[]; }; export declare function getNode(graph: ModelGraph, id: string): ModelNode | undefined; export declare function allNodes(graph: ModelGraph): ModelNode[]; //# sourceMappingURL=model-graph.d.ts.map