/** * Shared types for the Overview (fleet mission-control) widgets. * * Everything here is backed by an operation that already exists under * `src/operations/**` — `VibecontrolsAnalytics` for the activity/AI-run * numbers and the cached `VibeControlsInitialData` agents for fleet health. */ /** Windows offered by the Fleet Activity range picker. */ export type FleetActivityRange = 'LAST_24H' | 'LAST_7D' | 'LAST_30D'; /** Bucket size the backend aggregates into for a given range. */ export type FleetActivityGranularity = 'HOUR' | 'DAY'; /** One timestamped bucket as returned by `vibecontrolsAnalytics`. */ export interface FleetActivityPoint { timestamp: string; value: number; } /** One plotted line/area on the Fleet Activity chart. */ export interface FleetActivitySeries { /** Stable key used as the recharts `dataKey`. */ id: string; /** Translated, user-visible series name. */ label: string; /** Semantic token reference, e.g. `var(--color-accent-purple)`. */ color: string; data: readonly FleetActivityPoint[] | null | undefined; } /** Health roll-up for a single agent, derived from heartbeat freshness. */ export type FleetHealthStatus = 'healthy' | 'degraded' | 'offline'; export interface FleetHealthEntry { id: string; name: string; hostname: string; status: FleetHealthStatus; }