import type { RalphLoopAgentWorkload, RalphLoopEvaluationOptions, RalphLoopEvaluationResult } from "../helpers.js"; import type { ResolvedTaskAssignment } from "../task-assignments.js"; import type { BrokerMaintenanceResult } from "./maintenance.js"; import type { PinetLaneInfo } from "./types.js"; export type BrokerControlPlaneRecentCycle = { startedAt: string; completedAt: string | null; durationMs: number | null; ghostAgentIds: string[]; stuckAgentIds: string[]; anomalies: string[]; followUpDelivered: boolean; agentCount: number; backlogCount: number; }; export interface BrokerControlPlaneAgentRow { id: string; role: string; label: string; status: string; health: string; workload: string; taskSummary: string; heartbeat: string; branch: string; worktree: string; } export interface BrokerControlPlaneDashboardSnapshot { cycleStartedAt: string; cycleDurationMs: number; currentBranch: string | null; ralphSnooze?: { active: boolean; until: string | null; reason: string | null; source: string | null; emptyCycleCount: number; } | null; totalAgents: number; liveAgents: number; brokerCount: number; workerCount: number; idleWorkers: number; workingWorkers: number; ghostAgents: number; stuckAgents: number; pendingBacklogCount: number; nudgesThisCycle: number; idleDrainCandidates: number; assignedBacklogCount: number; reapedAgents: number; repairedThreadClaims: number; maintenanceAnomalies: string[]; anomalies: string[]; taskCounts: { assigned: number; branchPushed: number; openPrs: number; mergedPrs: number; closedPrs: number; }; activeTasks: string[]; recentOutcomes: string[]; activeLanes: string[]; detachedLanes: string[]; roster: BrokerControlPlaneAgentRow[]; recentCycles: Array<{ startedAt: string; duration: string; agentCount: number; backlogCount: number; ghostCount: number; stuckCount: number; anomalySummary: string; followUpDelivered: boolean; }>; } export interface BuildBrokerControlPlaneDashboardSnapshotInput { workloads: RalphLoopAgentWorkload[]; evaluation: RalphLoopEvaluationResult; evaluationOptions?: RalphLoopEvaluationOptions; maintenance: BrokerMaintenanceResult | null; assignments: Array>; lanes?: PinetLaneInfo[]; recentCycles: BrokerControlPlaneRecentCycle[]; cycleStartedAt: string; cycleDurationMs: number; currentBranch: string | null; homedir?: string; snooze?: { active: boolean; until: string | null; reason: string | null; source: string | null; emptyCycleCount: number; } | null; } export declare function buildBrokerControlPlaneDashboardSnapshot(input: BuildBrokerControlPlaneDashboardSnapshotInput): BrokerControlPlaneDashboardSnapshot;