// ═══════════════════════════════════════════════════════════
// Agent Types — from CONTRACTS.md §1.4
// ═══════════════════════════════════════════════════════════

export type AgentType = "ai_builder" | "test_runner" | "deployer" | "monitor";
export type AgentStatus = "idle" | "active" | "error" | "offline";

export interface Agent {
  id: string;
  name: string;
  type: AgentType;
  status: AgentStatus;
  currentTaskId: string | null;
  currentPipelineId: string | null;
  health: AgentHealth;
  capabilities: string[];
  config: Record<string, unknown>;
  tasksCompletedTotal: number;
  avgTaskDurationSeconds: number | null;
  createdAt: string;
  updatedAt: string;
}

export interface AgentHealth {
  uptimeSeconds: number;
  tasksCompleted24h: number;
  errorRate: number;
  lastHeartbeat: string;
}
