import type { Loop } from "../types.js"; import { Store } from "../lib/store.js"; export interface LoopUiRow { id: string; name: string; status: Loop["status"]; cadence: string; nextRun: string; lastRunOutcome: string; provider: string; activeRuns: number; } export interface LoopUiStats { activeLoops: number; pausedLoops: number; stoppedLoops: number; runningRuns: number; failedRuns: number; updatedAt: string; } export interface LoopUiSnapshot { rows: LoopUiRow[]; stats: LoopUiStats; } export interface BuildLoopUiSnapshotOptions { now?: Date; limit?: number; } export interface RenderLoopUiFrameOptions { columns?: number; rows?: number; now?: Date; refreshMs?: number; color?: boolean; } export interface RunLoopsUiAppOptions { refreshMs?: number; input?: NodeJS.ReadStream; output?: NodeJS.WriteStream; storeFactory?: () => Store; } export declare function buildLoopUiSnapshot(store: Store, opts?: BuildLoopUiSnapshotOptions): LoopUiSnapshot; export declare function renderLoopUiFrame(snapshot: LoopUiSnapshot, opts?: RenderLoopUiFrameOptions): string; export declare function runLoopsUiApp(opts?: RunLoopsUiAppOptions): Promise;