import { Task } from './todo'; /** * Serialises all mutating TODO.md operations so concurrent callers * (email poller, webhook poller, discord poller, sidebar "Add task", task loop) * never overwrite each other's changes. * * Each write operation is queued per file path and executes only after all * previously enqueued operations for that path have settled (resolved or * rejected). The queue is purely in-process — it does not use file locks, * which is sufficient because all writes originate from within this extension. */ declare class TodoWriteManager { private readonly _tails; private _enqueue; /** Append a new task to the Todo section and return its generated task ID. */ append(filePath: string, text: string, id?: string): Promise; /** Reset a single [~] in-progress task back to [ ]. */ resetToTodo(filePath: string, task: Task): Promise; /** Reset ALL [~] in-progress tasks back to [ ]. */ resetAllInProgress(filePath: string): Promise; /** Mark a task as [x] done in TODO.md. */ markDone(filePath: string, task: Task): Promise; /** Move a [ ] task to [~] in-progress (used to flag a provider hard-failure * as blocked/needs-attention instead of falsely marking it [x] done). */ markInProgress(filePath: string, task: Task): Promise; } /** Singleton — import this everywhere instead of calling todo.ts write functions directly. */ export declare const todoWriter: TodoWriteManager; export {};