/** * Parser boundary: external IR → internal normalized graph shape. * Generators still receive the original IR object; use normalized form for validation/lint only. */ export type NormalizedNode = { id: string; /** Lowercased from `type` or `kind` */ type: string; name: string; config: Record; schema: Record; /** Node-level metadata (e.g. `tags` for policy packs / lint). */ metadata: Record; }; export type NormalizedEdge = { id: string; from: string; to: string; config: Record; /** Preserved for lint (e.g. async / protocol); generators still use raw IR. */ metadata: Record; }; export type NormalizedGraph = { metadata: Record; nodes: NormalizedNode[]; edges: NormalizedEdge[]; }; /** * Coerce one node slot to the internal shape (invalid input → empty fields; structural rules flag issues). */ export declare function normalizeNodeSlot(raw: unknown): NormalizedNode; /** * Coerce one edge slot to internal `from` / `to` (accepts legacy `source` / `target`). */ export declare function normalizeEdgeSlot(raw: unknown): NormalizedEdge; export type MaterializeResult = { normalized: NormalizedGraph; /** True when `edges` was present but not an array (treated as []). */ edgesInputWasMalformed: boolean; }; /** * Build internal normalized graph from an already-unwrapped `graph` object * (`normalizeIrGraph` must have succeeded). Does not validate semantics. * * **Contract:** `normalized.edges[i]` corresponds 1:1 to `graph.edges[i]` when `edges` is an array; * structural validation and lint assume this index alignment. If edges are filtered or merged later, * keep positions or re-run materialization from the same raw array. */ export declare function materializeNormalizedGraph(graph: Record): MaterializeResult; //# sourceMappingURL=ir-normalize.d.ts.map