export type TodoStatus = "pending" | "in_progress" | "done" | "failed" | "blocked" | "skipped";
export type TodoWriteOperationName = "init" | "start" | "done" | "drop" | "rm" | "append" | "note";
export interface TodoItem {
    title: string;
    status: TodoStatus;
    agent?: string;
    role?: string;
    startedAt?: string;
    completedAt?: string;
    elapsedMs?: number;
    evidence?: string;
    description?: string;
    activeForm?: string;
    phase?: string;
    order?: number;
    notes?: string[];
}
export type TodoWriteStatus = "pending" | "in_progress" | "completed";
export interface TodoWriteItem {
    content: string;
    status: TodoWriteStatus;
    activeForm?: string;
}
export interface TodoWriteInput {
    todos: TodoWriteItem[];
}
export interface TodoWritePhaseInput {
    phase: string;
    items: string[];
}
export interface TodoWriteOperation {
    op: TodoWriteOperationName;
    list?: TodoWritePhaseInput[];
    task?: string;
    phase?: string;
    items?: string[];
    text?: string;
}
export interface TodoWriteOpsInput {
    ops: TodoWriteOperation[];
}
export interface TodoWriteOpsResult {
    todos: TodoItem[];
    applied: number;
}
export declare function writeTodos(runId: string, todos: TodoItem[]): Promise<void>;
export declare function readTodos(runId: string): Promise<TodoItem[] | null>;
export declare function normalizeTodoItems(value: unknown): TodoItem[];
export declare function normalizeTodoWriteInput(input: unknown): TodoItem[];
export declare function applyTodoWriteOperations(existingTodos: readonly TodoItem[], operations: readonly TodoWriteOperation[], now?: () => string): TodoWriteOpsResult;
export declare function updateTodoStatus(runId: string, title: string, status: TodoStatus): Promise<void>;
export declare function deriveTodosFromState(runId: string): Promise<TodoItem[] | null>;
export declare function parseSetTodoListFromOutput(output: string): TodoItem[] | null;
/**
 * Load todos for a run, trying todos.json first then falling back to state.json nodes.
 * This is the canonical read path used by cockpit and HUD renderers.
 */
export declare function loadTodos(runId: string | null): Promise<TodoItem[] | null>;
