import type { ToolDef } from './provider-base.js'; import type { ToolDispatcher } from './tool-dispatcher.js'; import { type TodoItem } from './todo-items.js'; export type { TodoItem, TodoStatus } from './todo-items.js'; /** Three-state read for completion gates and inspectors. */ export type TodoSnapshot = { status: 'unavailable'; } | { status: 'absent'; } | { status: 'present'; items: TodoItem[]; }; export declare function isTodoToolName(name: string): boolean; /** Read API for callers that want to render the list outside the * dispatcher (web admin, recap composer, etc.). * Returns null when the thread has never written a checklist. */ export declare function getTodoForThread(threadKey: string): TodoItem[] | null; /** Prefer this for completion gates — distinguishes unavailable / absent / * present (including an explicit empty list). */ export declare function getTodoSnapshot(threadKey: string): TodoSnapshot; /** Gate used by complete_goal for native agents. */ export declare function evaluateTodoCompletionGate(threadKey: string): { ok: true; } | { ok: false; error: string; }; /** Clear a thread's todo list (e.g. on /new conversation). */ export declare function clearTodoForThread(threadKey: string): void; /** * On a successful agent turn, close a sticky last `in_progress` item so * Plan UI / complete_goal see an all-completed checklist. No-op when the * pattern does not match or the store is unavailable. */ export declare function reconcileTodoOnSuccessfulTurn(threadKey: string): TodoItem[] | null; /** Tool definitions to advertise to the LLM. */ export declare function getTodoTools(): ToolDef[]; /** * Build a per-thread dispatcher. `threadKey` is the composite * `threadKey(platform, channelId, threadId)` so the store is scoped * to a single conversation. */ export declare function buildTodoDispatcher(threadKey: string): ToolDispatcher; /** Test-only: drop memory + close the handle so a temp DB can be unlinked * or reopened after a simulated restart. */ export declare function closeTodoDbForTesting(): void; /** Test-only: wipe rows without closing the handle. */ export declare function _truncateTodosForTests(): void; //# sourceMappingURL=todo-dispatcher.d.ts.map