| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- import { AgentProfile, AgentStatus } from "@/types/agent";
- export const demoAgents: AgentProfile[] = [
- {
- id: "main-orchestrator",
- name: "main",
- role: "主调度 Agent",
- avatarKind: "male-dispatcher",
- status: "working",
- statusLabel: "工作中",
- host: "macbook-ops.local",
- owner: "OpenClaw Core",
- currentTask: "拆分今日任务并下发给 news-intel、ops-updater、research-assistant",
- taskId: "orch-20260327-0841",
- taskStage: "dispatching",
- queueDepth: 3,
- todayCompleted: 18,
- uptime: "12天 4小时",
- lastHeartbeat: "2秒前",
- updatedAt: "刚刚",
- lastOutput: "已完成一轮任务编排,正在等待下游 agent 回传结果。",
- tags: ["调度", "编排", "主控"]
- },
- {
- id: "news-intel",
- name: "news-intel",
- role: "情报汇总 Agent",
- avatarKind: "female-analyst",
- status: "working",
- statusLabel: "工作中",
- host: "macbook-ops.local",
- owner: "OpenClaw Intel",
- currentTask: "整理今天的资讯摘要与来源,并准备发送给 main",
- taskId: "intel-20260327-0915",
- taskStage: "summarizing",
- queueDepth: 2,
- todayCompleted: 9,
- uptime: "18天 9小时",
- lastHeartbeat: "5秒前",
- updatedAt: "1分钟前",
- lastOutput: "最近一次摘要已经生成,等待主调度确认是否继续扩展来源。",
- tags: ["情报", "摘要", "采集"]
- },
- {
- id: "ops-updater",
- name: "ops-updater",
- role: "运维巡检 Agent",
- avatarKind: "male-ops",
- status: "working",
- statusLabel: "工作中",
- host: "macbook-ops.local",
- owner: "OpenClaw Infra",
- currentTask: "执行 openclaw-daily-security-check 与服务可用性巡检",
- taskId: "ops-20260327-0932",
- taskStage: "checking",
- queueDepth: 1,
- todayCompleted: 14,
- uptime: "22天 1小时",
- lastHeartbeat: "8秒前",
- updatedAt: "2分钟前",
- lastOutput: "巡检中记录到 1 条待人工确认告警,尚未升级为阻断事件。",
- tags: ["安全", "巡检", "更新"]
- },
- {
- id: "research-assistant",
- name: "research-assistant",
- role: "研究支持 Agent",
- avatarKind: "female-researcher",
- status: "idle",
- statusLabel: "待命",
- host: "macbook-ops.local",
- owner: "OpenClaw Research",
- currentTask: "等待新的研究主题进入任务队列",
- taskId: "idle",
- taskStage: "ready",
- queueDepth: 0,
- todayCompleted: 6,
- uptime: "5天 7小时",
- lastHeartbeat: "18秒前",
- updatedAt: "6分钟前",
- lastOutput: "上一条输出是资料整理清单,已同步到共享上下文。",
- tags: ["研究", "整理", "支持"]
- },
- {
- id: "observer-panel",
- name: "observer-panel",
- role: "状态观察 Agent",
- avatarKind: "female-observer",
- status: "warning",
- statusLabel: "待确认",
- host: "macbook-ops.local",
- owner: "OpenClaw Observe",
- currentTask: "等待人工确认一条心跳异常告警",
- taskId: "obs-20260327-0745",
- taskStage: "waiting_ack",
- queueDepth: 1,
- todayCompleted: 11,
- uptime: "9天 2小时",
- lastHeartbeat: "41秒前",
- updatedAt: "9分钟前",
- lastOutput: "检测到一个子任务心跳偏长,建议检查是否需要重试。",
- lastError: "heartbeat_delay_warning",
- tags: ["监控", "观察", "告警"]
- },
- {
- id: "session-maintainer",
- name: "session-maintainer",
- role: "会话维护 Agent",
- avatarKind: "male-maintainer",
- status: "offline",
- statusLabel: "离线",
- host: "macbook-ops.local",
- owner: "OpenClaw Session",
- currentTask: "当前未接入状态总线",
- taskId: "offline",
- taskStage: "disconnected",
- queueDepth: 0,
- todayCompleted: 0,
- uptime: "0天 0小时",
- lastHeartbeat: "14小时前",
- updatedAt: "昨天",
- lastOutput: "最后一次上报发生在昨晚 22:17,之后未再回传会话状态。",
- lastError: "agent_offline",
- tags: ["会话", "心跳", "维护"]
- }
- ];
- export const agentStatusFilters: Array<{ key: "all" | AgentStatus; label: string }> = [
- { key: "all", label: "全部" },
- { key: "working", label: "工作中" },
- { key: "idle", label: "待命" },
- { key: "warning", label: "待确认" },
- { key: "offline", label: "离线" }
- ];
- export function getAgentById(agentId: string) {
- return demoAgents.find((agent) => agent.id === agentId);
- }
|