import type { AgentTool } from "@apholdings/jensen-agent-core"; import { type Static } from "@sinclair/typebox"; import { TodoLoopGuard } from "./todo-loop-guard.js"; /** Schema for the todo_write tool */ declare const todoWriteSchema: import("@sinclair/typebox").TObject<{ todos: import("@sinclair/typebox").TArray; content: import("@sinclair/typebox").TString; activeForm: import("@sinclair/typebox").TString; status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"pending">, import("@sinclair/typebox").TLiteral<"in_progress">, import("@sinclair/typebox").TLiteral<"completed">]>; }>>; confirmClear: import("@sinclair/typebox").TOptional; }>; export type TodoWriteInput = Static; /** Todo item stored in session state */ export interface TodoItem { id?: string; content: string; activeForm: string; status: "pending" | "in_progress" | "completed"; } /** * Per-user-turn lock marker. * Prevents duplicate todo_write within the same user turn. */ export declare function createPerTurnLock(): PerTurnLock; export interface PerTurnLock { currentTurn: number; lockedUntil: number; reservedUntil: number; isActive(): boolean; tryReserveForCurrentTurn(): boolean; setLockedForCurrentTurn(): void; releaseReservation(): void; } /** Redact sensitive credentials from text string. */ export declare function redactSecrets(text: string): string; /** * Create the todo_write tool. * @param getSessionTodos - Callback to get the current todos from session * @param setSessionTodos - Callback to set todos in session and trigger update event * @param loopGuard - Guard instance to track consecutive calls * @param getRevision - Callback to get the current todo revision number * @param perTurnLock - Optional lock to prevent duplicate writes within a single user turn */ export declare function createTodoWriteTool(getSessionTodos: () => TodoItem[], setSessionTodos: (todos: TodoItem[]) => void, loopGuard?: TodoLoopGuard, getRevision?: () => number, perTurnLock?: PerTurnLock): AgentTool; /** Default todo_write tool - requires session binding for state management */ export declare const todoWriteTool: AgentTool; export {}; //# sourceMappingURL=todo-write.d.ts.map