export type AgentStats = { tasks: number last_active: string | null alerts: number } export type Agent = { id: string name: string color: string zone: string role: string icon?: string motto?: string capabilities?: string[] suggested_prompts?: string[] stats?: AgentStats supervisor?: boolean person?: string } export type TopologyLayer = { id: string label: string y: number color: string x?: number } export type TopologyViewData = { id: string label: string subtitle: string layers?: TopologyLayer[] nodes: TopologyNode[] edges: TopologyEdge[] } export type Zone = { id: string; label: string; x: number; color: string } export type FeedEntry = { id: string ts: string agent_id: string message: string level: string } export type DomainStatus = { level: 'ok' | 'warn' | 'down' | 'unknown' label: string } export type StatusData = { ts: string domains: Record gpu?: GpuStatus } export type GpuDevice = { index: number name: string util_gpu: number memory_used_mib: number memory_total_mib: number temperature_c: number power_w: number } export type GpuStatus = { ok: boolean host: string ui_url: string inference_active?: boolean active_model?: string | null vllm_url?: string | null gpu_count?: number gpus?: GpuDevice[] error?: string } export type AgentState = 'idle' | 'walk' | 'fetch' | 'return' export type AgentAnim = { agentId: string state: AgentState zone?: string } export type Approval = { id: string ts: string agent_id: string action: string reason: string status: string action_type: string target: string payload?: Record decided_by?: string | null decide_note?: string | null decided_at?: string | null priority?: string } export type TerminalLine = { id: string ts: string agent_id: string level: 'info' | 'ok' | 'warn' | 'err' | 'cmd' | 'llm' phase: string text: string prompt_id?: string } export type WorkloadApp = { name: string state: string image: string ports: string[] host?: string } export type WorkloadZone = { id: string label: string x: number color: string level: 'ok' | 'warn' | 'down' | 'unknown' running: number total: number apps: WorkloadApp[] trino_ok?: boolean hdfs_used_gb?: number hdfs_total_gb?: number vm?: string ip?: string bucket?: string } export type NodeLink = { label: string; url: string } export type NodeEndpoint = { name: string; host: string; port: string; proto: string } export type TopologyNode = { id: string label: string vm: string ip: string x: number y: number color: string level: string role: string apps: WorkloadApp[] running: number total: number description?: string agent_id?: string links?: NodeLink[] endpoints?: NodeEndpoint[] commands?: string[] vmid?: number pve?: string bucket?: string port?: string connectors?: string[] trino_ok?: boolean model?: string util?: number hdfs_used_gb?: number hdfs_total_gb?: number consumer_ok?: boolean subtitle?: string metrics?: string[] icon?: string layer?: string } export type NodeDetail = TopologyNode export type TopologyEdge = { id: string from: string to: string label: string kind: 'pipeline' | 'query' | 'parallel' | 'infra' active: boolean } export type WorkloadData = { ts: string zones: WorkloadZone[] topology?: TopologyViewData topologies?: Record gpu: { level: string model?: string | null inference_active?: boolean gpu_count?: number avg_util?: number gpus?: GpuDevice[] } totals: { apps_running: number apps_total: number connectors: number vms?: number pipeline_active?: boolean } } export type ChatMessage = { role: 'user' | 'agent' text: string agent?: string ts?: string } export type PresentationSlide = { id: string title: string subtitle?: string bullets: string[] kind?: string image?: string animation?: string topology?: TopologyViewData zone?: WorkloadZone } export type PresentationData = { ts: string title: string subtitle: string totals: WorkloadData['totals'] pipeline_active?: boolean slides: PresentationSlide[] slide_count: number workload?: WorkloadData topologies?: Record }