export interface Task { id: string; text: string; why: string; done_when: string; priority: 'high' | 'medium' | 'low'; status: 'open' | 'done' | 'pending'; template: string; plan: string; project: string; /** Parent task id (DR-0014 task tree). Children created by decompose --keep-parent point * at the retained parent, which becomes the join/acceptance node via depends_on. */ parent: string | null; depends_on: string[]; gpu: string | null; gpu_count: number; blocked_by: string | null; claimed_by: string | null; claimed_at: string | null; paused: boolean; approval_needed: boolean; approved_at: string | null; not_before: string | null; completed_at: string | null; completed_note: string | null; pending_at: string | null; /** Provenance for session→task wake (Problem 1). Captured from CORTEX_* / channel env when a * task is created from within a running session or agent. On task.completed, if origin_channel * is set (and no thread is waiting on this task), the originating session is woken. */ origin_session_id: string | null; origin_channel: string | null; origin_thread_id: string | null; } export interface LockState { owner: string; acquired_at: string; expires_at: string; note?: string; } declare const PRIORITY_ORDER: Record; declare const VALID_STATUSES: Set; declare function rawToTask(raw: any, project: string): Task; declare function parseTasksFile(content: string, project: string): Task[]; declare function parseTasksFileWithLock(content: string, project: string): { tasks: Task[]; lock: LockState | null; }; declare function taskToYamlObj(task: Task): Record; declare function serializeTasksFile(tasks: Task[]): string; declare function serializeTasksFileWithLock({ tasks, lock }: { tasks: Task[]; lock?: LockState | null; }): string; declare function getTasksYamlPath(project: string): string; declare function scanAllTasks(project?: string | null): Task[]; declare function completedHashSet(tasks: Task[]): Set; declare function isActionable(task: Task, completedHashes?: Set | null): boolean; declare function scanAvailableTasks(): Task[]; declare function getTaskStats(): any; declare function taskStatuses(task: Task, completedHashes?: Set | null): Set; declare function taskTags(task: Task): Set; declare function filterTasks(tasks: Task[], args: any, completedHashes?: Set | null): Task[]; declare function getTaskStatsFromTasks(tasks: Task[]): any; declare function printTaskListToString(tasks: Task[], actionableHeader?: boolean, showDeps?: boolean): string; declare function printStatsText(stats: any): string; declare function showPayload(task: Task, tasks: Task[]): { task: Task; actionable: boolean; dependents: string[]; depends_on: Task[]; }; declare function depsPayload(task: Task, tasks: Task[]): { task: Task; actionable: boolean; dependents: string[]; depends_on: Task[]; }; export { PRIORITY_ORDER, VALID_STATUSES, completedHashSet, depsPayload, filterTasks, getTaskStats, getTaskStatsFromTasks, getTasksYamlPath, isActionable, parseTasksFile, parseTasksFileWithLock, printStatsText, printTaskListToString, rawToTask, scanAllTasks, scanAvailableTasks, serializeTasksFile, serializeTasksFileWithLock, showPayload, taskToYamlObj, taskStatuses, taskTags, };