/** * Task 176 — server side of the `/tasks` drawer. * * The drawer edits the SAME file the prompt projection reads, found the same * way: `Tasks.md` at the root of the thread's project directory (task 183). * There is deliberately no setting pointing at a tasks file — one resolution * rule, so the drawer and the prompt can never disagree about which file is the * queue (Rule #8). * * Before task 183 the file was found among the thread's always-include entries. * Creating a thread scaffolds a `Tasks.md` but persists only `projectDir`, so a * new thread had a tasks file that neither the prompt nor the drawer ever saw. */ import { TaskDisposition, TaskRow, TasksFile } from '../lib/tasks-file.js'; export interface ResolvedTasksFile { filePath: string; file: TasksFile; } export interface TasksLocation { cwd: string; filePath: string; } /** * Where a thread's tasks file lives: `/Tasks.md`. * * The single place that answers the question, so the drawer, Refresh and the * prompt (via `readAlwaysIncludeFiles`, which applies the same rule to the cwd * it is handed) cannot resolve to different files (Rule #8). */ export declare function threadTasksLocation(threadName: string): Promise; /** * The thread's schema tasks file, or null when it has none. * * "Schema" is the marker inside the file: a `Tasks.md` that has not been * migrated exists but is not yet a tasks file, and the drawer says so rather than * half-parsing it. */ export declare function resolveTasksFile(threadName: string): Promise; /** What task 179's Refresh is pointed at, and what state it is in. */ export interface RefreshTarget { filePath: string; /** Empty string when the file does not exist. */ content: string; cwd: string; /** True when the file already carries the marker — Refresh re-checks rather than converts. */ migrated: boolean; /** False when there is no file yet — Refresh then creates the empty schema. */ exists: boolean; } /** The file Refresh acts on (task 179): the same path, whatever is or is not there. */ export declare function resolveRefreshTarget(threadName: string): Promise; /** Wire shape for the drawer — flat rows, depth carried explicitly. */ export interface TasksPayload { filePath: string | null; queue: TaskRow[]; done: TaskRow[]; errors: TasksFile['errors']; /** Absent only when the thread has no schema tasks file at all. */ missing?: boolean; } export declare function readTasks(threadName: string): Promise; export declare function moveTaskInThread(threadName: string, dragId: string, targetId: string, position: 'before' | 'after'): Promise; export declare function resolveDepInThread(threadName: string, id: string, accept: boolean): Promise; /** Task 178 — the drawer's Closed ✓ / Archive buttons. */ export declare function dispositionTasksInThread(threadName: string, ids: string[], disposition: TaskDisposition): Promise; //# sourceMappingURL=tasks.d.ts.map