namespace RackPeek.Domain.Graph; public record GraphNode( string Id, string Label, string Kind, string? Subtitle = null, IReadOnlyDictionary? Data = null, IReadOnlyList? Rows = null); /// /// A bullet/list row rendered inside a node label. Used by the logical /// view to fold a host's services into a single host card. /// public record GraphNodeRow(string Name, string? Detail = null); public record GraphEdge( string Source, string Target, string? Label, string Kind, IReadOnlyDictionary? Data = null); /// /// A labelled cluster of nodes. Used to drive Mermaid subgraph /// blocks. Groups may nest via . /// public record GraphGroup( string Id, string Label, IReadOnlyList NodeIds, string? ParentGroupId = null); /// /// How a graph should be rendered. is the /// hardware-topology view: one node per resource with shape-based kind /// signalling. is the logical-services view: /// each host is a single card listing its services as rows, no edges, /// siblings packed vertically. /// public enum GraphRenderHint { Standard, Compact } public record Graph( IReadOnlyList Nodes, IReadOnlyList Edges, IReadOnlyList? Groups = null, GraphRenderHint RenderHint = GraphRenderHint.Standard) { public static Graph Empty { get; } = new([], [], null); }