/** * Shared low-level helpers for scanning tool_use / tool_result blocks out of * a message history. Lives in `context/` (a lower layer than `cli/`) so both * the compaction path (`context/compaction.ts`) and the CLI completion gate * (`cli/coding-completion-gate.ts`) can reuse them without a context→cli * layering inversion. @public */ import type { Message } from '../core/session/session-jsonl.js'; export interface ParsedTodoItem { content: string; status: 'pending' | 'in_progress' | 'completed'; } /** Coerce a tool_result block to its flattened text content. */ export declare function toolResultText(block: unknown): string; /** Map tool_use_id → tool name from assistant tool_use blocks in the session. */ export declare function toolUseNameById(messages: Message[]): Map; /** * Find the most recent todo_write checklist in the message history (scanning * from the end). Returns the structured items, [] when the list was explicitly * cleared, or null when no todo_write result is present. Used by the TUI sticky * task panel, the CLI completion gate, and — critically — by compaction to * preserve the active checklist across context compression (otherwise a long * coding task loses its todo thread when the todo_write result lands in the * pruned middle). */ export declare function extractLatestTodosFromMessages(messages: Message[]): ParsedTodoItem[] | null; //# sourceMappingURL=message-tool-helpers.d.ts.map