/** * TUI helper functions and constants. * * Pure utilities shared across the TUI plugin — no SolidJS reactivity. * * @module */ import type { RGBA } from "@opentui/core"; import { formatDuration, truncate, shortSessionId, compactDuration, barSegments } from "../utils/display-helpers"; import { buildSessionScope } from "../utils/session-scope"; export { formatDuration, truncate, shortSessionId, compactDuration, barSegments, buildSessionScope }; export type ThemeColors = Record; export type HealthState = "ACTIVE" | "IDLE" | "NO_STATE" | "STALE" | "ERROR"; export declare const REFRESH_MS = 1000; export declare const MAX_DISPATCH_ROWS = 8; export declare const MAX_GRAPH_ROWS = 2; export declare const MAX_ENGINE_GRAPH_ROWS = 2; export declare const MAX_LOOP_ROWS = 3; export declare const MAX_FN_ROWS = 6; export declare const BAR_WIDTH = 6; export declare const RULE_WIDTH = 36; export declare const INDENT = " "; export declare const BOLD: number; export declare const DIM: number; export declare const ITALIC: number; export declare const UNDERLINE: number; export declare const DIM_ITALIC: number; export declare const G_RUNNING = "\u2022"; export declare const G_PENDING = "\u00B7"; export declare const G_ERROR = "\u2717"; export declare const G_DONE = "\u2713"; export declare const G_CANCEL = "\u25CB"; export declare const G_TIMEOUT = "\u25C7"; export declare const G_GATED = "\u00B7"; export declare const G_BAR_ON = "\u25A0"; export declare const G_BAR_OFF = "\u25A1"; export declare const G_SUB = "\u00B7"; export declare const G_RULE = "\u2500"; export declare const G_STALLED = "!"; export declare const G_RUNNING_COMPACT = "\u00B7"; export declare const G_DONE_COMPACT = "\u00B7"; export declare const LEN_VERSION = 8; export declare const LEN_DUR = 8; export declare function rgbaToCSS(c: RGBA): string; export declare function readPackageVersion(): string; /** Extract the leaf agent name from a "--"-scoped path. */ export declare function agentLeaf(agent: string): string; /** Extract the ROOT agent name (first segment before --). */ export declare function agentRoot(agent: string): string; /** Format a time duration as a human-readable relative time like "3s ago", "2m ago", or "1h ago". */ export declare function formatTimeAgo(ms: number): string; /** Status glyph + color for a task. */ export declare function statusVisual(status: string, c: ThemeColors): { glyph: string; color: RGBA; }; /** * Map a graph-engine node lifecycle status onto a display glyph. * * Pure (color-free) so it is reusable/testable outside the UI; the caller * picks the fg color. Unknown statuses fall back to a neutral dot. */ export declare function engineNodeGlyph(status: string): string; /** Wrap a long string into lines of at most `width` chars. */ export declare function wrapText(text: string, width: number): string[]; //# sourceMappingURL=helpers.d.ts.map