/** * Progress message renderer - builds Discord markdown from progress state. * Adapted from IdleHands. */ import type { ProgressSnapshot } from "./types.js"; export type RenderOptions = { /** Max characters for Discord message (default: 1900) */ maxChars?: number; /** Max tool lines to show (default: 8) */ maxToolLines?: number; /** Max assistant preview chars (default: 1200) */ maxAssistantChars?: number; /** Show stats line (turn count, tokens) */ showStats?: boolean; }; export type ProgressRenderInput = { /** Banner text (e.g., warnings) */ banner?: string | null; /** Progress snapshot from TurnProgressController */ snapshot: ProgressSnapshot; /** Accumulated assistant markdown text */ assistantText?: string; /** Optional tool output tail */ toolTail?: { stream: "stdout" | "stderr"; lines: string[]; } | null; }; export declare function renderProgressMarkdown(input: ProgressRenderInput, opts?: RenderOptions): string; export type FinalStatus = "completed" | "timeout" | "error"; export type FinalMessageStats = { turnCount: number; totalToolCalls: number; totalTokens: number; elapsedMs: number; status: FinalStatus; /** Timeout limit in ms (for display when status is timeout) */ timeoutMs?: number; }; /** * Render final message with tool history + final response. * Used when the run completes. */ export declare function renderFinalMessage(toolLines: string[], finalText: string, opts?: { maxChars?: number; maxToolLines?: number; stats?: FinalMessageStats; }): string;