import type { AgentTool } from "@apholdings/jensen-agent-core"; import { type Static } from "@sinclair/typebox"; import { TodoEngine } from "../todo/index.js"; import { TodoLoopGuard } from "./todo-loop-guard.js"; /** Schema for the todo_update tool */ declare const todoUpdateSchema: import("@sinclair/typebox").TObject<{ updates: import("@sinclair/typebox").TArray, import("@sinclair/typebox").TLiteral<"in_progress">, import("@sinclair/typebox").TLiteral<"completed">]>>; activeForm: import("@sinclair/typebox").TOptional; content: import("@sinclair/typebox").TOptional; }>>; expectedRevision: import("@sinclair/typebox").TNumber; }>; export type TodoUpdateInput = Static; export interface TodoUpdateSnapshot { revision: number; timestamp: number; } export interface TodoUpdateSnapshotEnforcement { /** Returns the current read snapshot, or null if none */ getSnapshot: () => TodoUpdateSnapshot | null; /** Invalidates the current snapshot, requiring a fresh todo_read */ invalidateSnapshot: () => void; } /** * @deprecated Retained for compatibility. Loop detection is now progress-aware * and nonfatal inside the engine; this counter no longer terminates the run. */ export interface TodoUpdateRejectionState { count: number; } export type { TodoItem, TodoRebaseResult } from "../todo/index.js"; import type { TodoItem } from "../todo/index.js"; /** * Create the todo_update tool. * * Stale revisions are recovered internally and deterministically: the engine * reads the current state, rebases the (non-conflicting) intent exactly once, * and applies it. TODO failures are typed and never terminate the active run. * * @param getSessionTodos - Callback to get the current todos from session * @param setSessionTodos - Callback to set todos in session * @param getRevision - Callback to get the current todo revision number * @param loopGuard - Guard instance to track consecutive calls (backward-compat) * @param snapshotEnforcement - Optional snapshot validation (stale-safe) * @param rejectionState - Deprecated; retained for compatibility * @param engine - Optional shared TodoEngine (idempotency, rebase, loop detection) */ export declare function createTodoUpdateTool(getSessionTodos: () => TodoItem[], setSessionTodos: (todos: TodoItem[]) => void, getRevision: () => number, _loopGuard: TodoLoopGuard, snapshotEnforcement?: TodoUpdateSnapshotEnforcement, _rejectionState?: TodoUpdateRejectionState, engine?: TodoEngine): AgentTool; /** Default todo_update tool - requires session binding for state management */ export declare const todoUpdateTool: AgentTool; //# sourceMappingURL=todo-update.d.ts.map