+
+
+
+
Inbox
+
{items.length} {items.length === 1 ? "item" : "items"}
+
+ {view === "inbox" && (
+ <>
+
+
+ {filtered.map((item) => (
+
+
+ {item.agentName &&
}
+
+
{item.title}
+
{item.detail}
+
+
{humanize(item.kind)}
+
{formatRelative(item.timestamp)}
+
+
+ ))}
+
+ >
+ )}
+
+ {view === "standup" &&
}
+ {view === "performance" &&
}
+
+ );
+}
+
+function StandupView({ agents, tasks, taskRuns }: { agents: AgentRecord[]; tasks: TaskRecord[]; taskRuns: TaskRunRecord[] }) {
+ return (
+
+ {agents.map((agent) => {
+ const agentTasks = tasks.filter((t) => t.assigneeAgentId === agent.id);
+ const inProgress = agentTasks.filter((t) => t.status === TASK_STATUS.IN_PROGRESS).length;
+ const done = agentTasks.filter((t) => t.status === TASK_STATUS.DONE).length;
+ const agentRuns = taskRuns.filter((r) => r.agentId === agent.id);
+ const lastRun = agentRuns[agentRuns.length - 1];
+ return (
+
+
+
+
{agent.name}
+
{agent.role} ยท {agent.department}
+
+
+ {inProgress} in progress
+ {done} done
+ {agentRuns.length} runs
+ {lastRun && {formatRelative(lastRun.createdAt)}}
+
+
+ );
+ })}
+
+ );
+}
+
+function PerformanceView({ agents, tasks, taskRuns }: { agents: AgentRecord[]; tasks: TaskRecord[]; taskRuns: TaskRunRecord[] }) {
+ const totalTasks = tasks.length;
+ const doneTasks = tasks.filter((t) => t.status === TASK_STATUS.DONE).length;
+ const completedRuns = taskRuns.filter((r) => r.state === "completed").length;
+ const failedRuns = taskRuns.filter((r) => r.state === "failed").length;
+ const successRate = completedRuns + failedRuns > 0 ? Math.round((completedRuns / (completedRuns + failedRuns)) * 100) : 0;
+ const throughput = doneTasks;
+
+ return (
+
+
+
+
+
+ a.lifecycle === "active").length)} />
+
+
Agent throughput
+
+
+
Agent
Tasks done
Runs
Failures
+
+ {agents.map((agent, i) => {
+ const agentDone = tasks.filter((t) => t.assigneeAgentId === agent.id && t.status === TASK_STATUS.DONE).length;
+ const agentRuns = taskRuns.filter((r) => r.agentId === agent.id);
+ const agentFailed = agentRuns.filter((r) => r.state === "failed").length;
+ return (
+
+
+
{agentDone}
+
{agentRuns.length}
+
{agentFailed > 0 ?
{agentFailed} :
0}
+
+ );
+ })}
+
+
+ );
+}
+
+function MetricCard({ label, value, sub }: { label: string; value: string; sub?: string }) {
+ return (
+