/** * Local insight ticker — environment/task-aware suggestions sharing the * promo row's screen real estate, but a deliberately SEPARATE data path * from it. * * Why separate: the promo row is "zero local content, fully remote-served, * fail-closed" (an explicit earlier design call — nothing about WHAT shows * ships in the package). Insights are the opposite by nature — CVE counts, * uncommitted changes, sponsored-mode state — none of that is knowable * server-side. Conflating the two would mean either routing local logic * through the remote-content validation pipeline (messages.ts's * isValidMessage(), built for untrusted REMOTE content) or quietly giving * the promo row a second, unrelated job. So: same rendered slot, same * PromoRow shape, but a totally separate module, never touching * message-transport.ts or the remote message cache. * * Cheapness discipline (learned the hard way — see the funnel-cache fix): * every insight source here MUST be either (a) synchronous local file/state * reads, already-computed data the caller passes in, or (b) a read of a * cache some OTHER, separately-scheduled process populates. NEVER a network * call from here — that would reintroduce the exact bug where a statusline * render silently ate a multi-second fetch it could never actually finish. */ export interface LocalInsight { id: string; text: string; /** Higher = shown first when multiple insights are candidates this slot. */ priority: number; } export interface LocalInsightContext { security?: { status: string; findings?: number; cvesFixed: number; totalCves: number; }; swarm?: { activeAgents: number; maxAgents: number; coordinationActive: boolean; }; /** Count of uncommitted-changed files (git status --short line count). */ gitUncommittedCount?: number; now?: Date; } /** All candidate insights for this render, unsorted. */ export declare function computeLocalInsights(ctx: LocalInsightContext): LocalInsight[]; /** Highest-priority insight this render, or null if nothing is actionable. */ export declare function selectLocalInsight(ctx: LocalInsightContext): LocalInsight | null; //# sourceMappingURL=insights.d.ts.map