Add Command Center v2: DQ/RAG integration, S3 browser, Jupyter, GPU matrix.
Mirror mo/atc-GPU layout with config/, docs/, scripts/ for Gitea deploy.
This commit is contained in:
@@ -0,0 +1,126 @@
|
||||
import type { LucideIcon } from 'lucide-react'
|
||||
import {
|
||||
Bot,
|
||||
Cpu,
|
||||
Database,
|
||||
Layers,
|
||||
Network,
|
||||
Radio,
|
||||
Server,
|
||||
Shield,
|
||||
TreePine,
|
||||
Workflow,
|
||||
} from 'lucide-react'
|
||||
import type { AgentAnim } from '../types'
|
||||
|
||||
export type AgentMeta = {
|
||||
icon: LucideIcon
|
||||
accent: string
|
||||
idleTask: string
|
||||
activeTask: string
|
||||
domain: string
|
||||
}
|
||||
|
||||
export const AGENT_META: Record<string, AgentMeta> = {
|
||||
'etl-guardian': {
|
||||
icon: Workflow,
|
||||
accent: '#38bdf8',
|
||||
domain: 'ETL / CDC',
|
||||
idleTask: 'Monitoring Airflow DAGs & Kafka connectors',
|
||||
activeTask: 'Automating ETL layer — CDC sync validation',
|
||||
},
|
||||
'lakehouse-ops': {
|
||||
icon: Layers,
|
||||
accent: '#818cf8',
|
||||
domain: 'Lakehouse',
|
||||
idleTask: 'Watching Spark, Trino & Iceberg catalogs',
|
||||
activeTask: 'Optimizing lakehouse queries & table health',
|
||||
},
|
||||
'data-custodian': {
|
||||
icon: Database,
|
||||
accent: '#34d399',
|
||||
domain: 'Databases',
|
||||
idleTask: 'Guarding PostgreSQL, MySQL & document stores',
|
||||
activeTask: 'Running database health & replication checks',
|
||||
},
|
||||
'hadoop-ranger': {
|
||||
icon: TreePine,
|
||||
accent: '#4ade80',
|
||||
domain: 'Hadoop',
|
||||
idleTask: 'Patrolling HDFS capacity & YARN nodes',
|
||||
activeTask: 'Analyzing HDFS blocks & cluster balance',
|
||||
},
|
||||
'infra-sentinel': {
|
||||
icon: Server,
|
||||
accent: '#94a3b8',
|
||||
domain: 'Infrastructure',
|
||||
idleTask: 'Observing Docker hosts & platform services',
|
||||
activeTask: 'Correlating infra events across the lab',
|
||||
},
|
||||
'mo-commander': {
|
||||
icon: Shield,
|
||||
accent: '#60a5fa',
|
||||
domain: 'Supervision',
|
||||
idleTask: 'Ingress intel & approval oversight',
|
||||
activeTask: 'Reviewing agent dispatch & approvals',
|
||||
},
|
||||
'bart-commander': {
|
||||
icon: Radio,
|
||||
accent: '#2dd4bf',
|
||||
domain: 'Supervision',
|
||||
idleTask: 'Egress monitoring & MCP comms relay',
|
||||
activeTask: 'Tracking outbound agent communications',
|
||||
},
|
||||
'network-watcher': {
|
||||
icon: Network,
|
||||
accent: '#38bdf8',
|
||||
domain: 'Network',
|
||||
idleTask: 'VLAN 20/21 traffic path analysis',
|
||||
activeTask: 'Mapping data ingress & egress flows',
|
||||
},
|
||||
'mcp-coordinator': {
|
||||
icon: Cpu,
|
||||
accent: '#c084fc',
|
||||
domain: 'MCP Hub',
|
||||
idleTask: 'Routing tool calls between agents',
|
||||
activeTask: 'Orchestrating MCP tool execution',
|
||||
},
|
||||
}
|
||||
|
||||
const DEFAULT_META: AgentMeta = {
|
||||
icon: Bot,
|
||||
accent: '#94a3b8',
|
||||
domain: 'Agent',
|
||||
idleTask: 'Standing by',
|
||||
activeTask: 'Executing mission',
|
||||
}
|
||||
|
||||
export function getAgentMeta(agentId: string): AgentMeta {
|
||||
return AGENT_META[agentId] || DEFAULT_META
|
||||
}
|
||||
|
||||
export function agentTaskLabel(agentId: string, anim?: AgentAnim): string {
|
||||
const meta = getAgentMeta(agentId)
|
||||
if (!anim || anim.state === 'idle') return meta.idleTask
|
||||
if (anim.state === 'walk') return `Routing to ${anim.zone || 'target zone'}…`
|
||||
if (anim.state === 'fetch') return meta.activeTask
|
||||
if (anim.state === 'return') return 'Publishing mission results…'
|
||||
return meta.activeTask
|
||||
}
|
||||
|
||||
export function pseudoAgentLoad(stats?: { tasks: number; alerts: number }) {
|
||||
const tasks = stats?.tasks ?? 0
|
||||
const alerts = stats?.alerts ?? 0
|
||||
const cpu = Math.min(94, 8 + tasks * 3 + alerts * 5)
|
||||
const mem = Math.min(88, 12 + tasks * 2 + alerts * 4)
|
||||
return { cpu, mem }
|
||||
}
|
||||
|
||||
export const DOMAIN_LABELS: Record<string, string> = {
|
||||
docker: 'Docker Platform',
|
||||
databases: 'Database Vault',
|
||||
lakehouse: 'Lakehouse',
|
||||
etl: 'ETL / Streaming',
|
||||
hadoop: 'Hadoop Cluster',
|
||||
gpu: 'GPU / AI',
|
||||
}
|
||||
Reference in New Issue
Block a user