/** * tui/progress — AgentSwarm live progress panel. * * Vertical panel layout with fixed-width tool-call-based braille progress * bars and inline activity text. Each agent renders as a single line: * 001 [braille bar] read: src/lib.rs lines 42-99 * Bar width is fixed (5 cells) so tool labels align across agents. * * Progress is driven by actual tool calls / activity events (progressTick), * not wall-clock time. An agent that makes more progress fills faster. * * For 5+ agents, switches to a 2-column compact grid (3-cell bars). */ import type { Component } from "@earendil-works/pi-tui"; import type { BatchProgressSnapshot, SubagentUsage } from "../shared/types.js"; export type MemberPhase = "pending" | "queued" | "prompting" | "working" | "completed" | "failed" | "cancelled" | "suspended"; export interface MemberStatus { readonly index: number; phase: MemberPhase; name?: string; item?: string; result?: string; error?: string; currentTool?: string; activity?: string; usage?: SubagentUsage; progressTick?: number; startedAt?: number; } export interface SwarmProgressState { title?: string; total: number; completed: number; failed: number; active: number; queued: number; members: MemberStatus[]; totalUsage: SubagentUsage; startedAt: number; mailbox?: boolean; mailboxCount?: number; } export declare function snapshotToProgressState(snapshot: BatchProgressSnapshot, title?: string): SwarmProgressState; export declare class AgentSwarmProgressComponent implements Component { private state_; private onRequestRender; private pollTimer; private debounceTimer; constructor(onRequestRender?: () => void); update(state: SwarmProgressState): void; complete(): void; dispose(): void; invalidate(): void; handleInput(_data: string): void; render(width: number): string[]; private renderHeader; private renderStatusLine; /** * Render all agents. Uses vertical panels for small counts * and a compact 2-column grid for larger batches. */ private renderAgentPanels; private renderVerticalPanels; /** * Render one agent as a single line with fixed-width progress bar. * * Format: `001 [braille bar] read: src/lib.rs lines 42-99` * Bar is always FIXED_BAR_CELLS (5) wide so tool labels align across agents. * * Progress is driven by progressTick (actual tool calls / activity events), * not wall-clock time. Each tick fills one level of the braille bar. */ private renderAgentLine; private renderCompactGrid; /** * Compact single-line grid cell. * Format: `001 [▓▓] label` */ private renderGridCell; private renderBrailleBar; private renderCellLabel; private requestRender; private startPolling; private stopTimers; } //# sourceMappingURL=progress.d.ts.map