/** * Agent widget renderer. * Spec: §5.12 — Widget * * Read-only view of `listAgentStatuses` + `readCostSummary`. Pure rendering * functions are exported separately from the component factory so they can * be unit-tested against fixture data without touching the filesystem. */ import { listAgentStatuses, readCostSummary } from "./engine/status.js"; import type { AgentStatusFile } from "@pi-orca/core"; export interface AgentWidgetItem { agentId: string; templateName: string; status: AgentStatusFile["status"]; exitReason?: AgentStatusFile["exitReason"]; model: string; isolation: AgentStatusFile["isolation"]; inputTokens: number; outputTokens: number; totalCost: number; labels: Record; cleanupBlockedReason?: string; } export interface AgentWidgetTotals { inputTokens: number; outputTokens: number; totalCost: number; } /** Render a token count compactly: 25140 → "25.1k". */ export declare function formatTokenCount(n: number): string; /** Render a USD cost: 0.123 → "$0.123", 1.5 → "$1.50". */ export declare function formatCost(n: number): string; /** * Format a single agent line. * * Layout (per spec §5.12, simplified for terminal width): * " ◉