/** * Dashboard API — Formats OrgX data for the React dashboard SPA. * * Transforms the cached OrgSnapshot into the shapes the dashboard components * expect, and exposes an onboarding check (is the API key configured?). */ import type { OnboardingState, OrgSnapshot } from "./types.js"; export interface DashboardStatus { connected: boolean; syncedAt: string | null; initiativeCount: number; activeAgentCount: number; activeTaskCount: number; pendingDecisionCount: number; } export interface DashboardAgent { id: string; name: string; domain: string; status: "active" | "idle" | "throttled"; currentTask: string | null; lastActive: string | null; } export interface DashboardActivityItem { id: string; type: "task" | "decision" | "agent"; title: string; status: string; domain?: string; urgency?: string; timestamp: string | null; } export interface DashboardInitiative { id: string; title: string; status: string; progress: number | null; workstreams: string[]; } export declare function formatStatus(snapshot: OrgSnapshot | null): DashboardStatus; export declare function formatAgents(snapshot: OrgSnapshot | null): DashboardAgent[]; export declare function formatActivity(snapshot: OrgSnapshot | null): DashboardActivityItem[]; export declare function formatInitiatives(snapshot: OrgSnapshot | null): DashboardInitiative[]; export declare function getOnboardingState(state: OnboardingState): OnboardingState;