import { type DuplicateId, type ModelEntry, type ModelGraph } from "./model-graph.js"; export interface ParseError { file: string; message: string; } export interface LoadResult { graph: ModelGraph; entries: ModelEntry[]; parseErrors: ParseError[]; duplicateIds: DuplicateId[]; /** * Files written as a SINGLE node (not a YAML array), mapped to that node's * id. This is exactly the set the file-per-node convention applies to * (Decision 004 技术点 3: filename must equal id) — array files that group * many nodes under a section name (the seed's loops/*.yaml) are deliberately * absent, so `checkFilenameMatchesId` doesn't false-flag them. */ singleNodeFiles: Map; } /** * Loads every *.yaml/*.yml file under `dir`. A file may contain a single * node or an array of nodes; array elements are validated independently * so one malformed sibling doesn't take down the rest of the file's * otherwise-valid nodes (a whole-array `safeParse` would fail the entire * batch on a single bad element — that's the wrong blast radius for a * file that groups many unrelated loops together, see e.g. * test/fixtures/synthetic-model/loops/main.yaml). Parse/validation * failures are collected rather than thrown so `loopgraph check` can * report every broken node in one pass instead of stopping at the first * one. */ export declare function loadModel(dir: string): Promise; //# sourceMappingURL=load-model.d.ts.map