export type GraphNode = { id: string; opcode: string; category: string; colour: string; const: number | null; pe: number | null; iram_offset: number | null; ctx: number | null; has_error: boolean; loc: SourceLoc; sm_id?: number | null; synthetic?: boolean; label?: string; }; export type SourceLoc = { line: number; column: number; end_line: number | null; end_column: number | null; }; export type AddrInfo = { offset: number; port: string; pe: number | null; }; export type GraphEdge = { source: string; target: string; port: string; source_port: string | null; has_error: boolean; addr?: AddrInfo; synthetic?: boolean; }; export type GraphRegion = { tag: string; kind: string; node_ids: string[]; }; export type GraphError = { line: number; column: number; category: string; message: string; suggestions: string[]; }; export type GraphUpdate = { type: "graph_update"; stage: string; nodes: GraphNode[]; edges: GraphEdge[]; regions: GraphRegion[]; errors: GraphError[]; parse_error: string | null; metadata: { stage: string; pe_count: number; sm_count: number; }; };