import type { GoalTodoSummary } from "../core/tree.js"; import type { GoalTodoNode } from "../core/types.js"; import type { GoalRuntimeView } from "../runtime/engine.js"; import type { SessionContext } from "./pi-types.js"; import type { GetRuntime, GoalActivationMode } from "./tools.js"; export declare const GOALS_WIDGET_ID = "pi-goals-hud"; export declare const GOALS_STATUS_ID = "goals"; /** Plain-data input to the pure renderer. */ export interface GoalHudState { readonly hasGoal: boolean; readonly status: string; readonly mode: GoalActivationMode; readonly done: number; readonly total: number; readonly open: number; readonly blocked: number; } /** * PURE renderer — no ANSI, no Pi API. Exactly one compact line with an * active goal, zero lines without one (the widget is then cleared). * Sample: "◆ goals: 7/12 done · open 5 · blocked 0" */ export declare function renderGoalHudLines(state: GoalHudState): string[]; /** Compact footer status text; undefined (cleared) without an active goal. */ export declare function goalHudStatusText(state: GoalHudState): string | undefined; /** Tree icons: open ○, in-progress ●, done ✓, blocked ⊘, skipped ⤫ * (batch-#2 fix: skipped gets its own glyph so a skipped node never reads * as blocked at a glance — zob shared ⊘ for both). */ export declare function todoStatusIcon(status: string): string; /** * PURE tree render: nodes sorted numerically by path, children indented, * zob status icons, and a progress header line. Empty input -> "(no todos)". */ export declare function renderGoalTodoTree(summary: GoalTodoSummary, nodes: readonly GoalTodoNode[]): string[]; /** Build the HUD state from a runtime view (undefined -> hidden). */ export declare function goalHudStateOf(view: GoalRuntimeView | undefined, mode: GoalActivationMode): GoalHudState; /** * GoalsHud — pushes the compact progress widget to the TUI. refresh() is * fire-and-forget: an engine read failure clears the widget (never throws * into the tool/command path). */ export declare class GoalsHud { private readonly deps; private ctx; constructor(deps: { getRuntime: GetRuntime; }); attach(ctx: SessionContext): void; /** session_shutdown: clear BOTH widget and status. */ detach(): void; refresh(): void; /** Eager colorization; plain lines when no theme (headless). */ private colorize; }