/** * SQLite-backed task store operations. * * CRUD operations for tasks, dependencies, and relations backed by tasks.db. * Implements the same interface as the JSON store for StoreProvider compatibility. * * @epic T4454 * @task W1-T3 */ import { type Task, type TaskStatus, type TaskType } from '@cleocode/contracts'; import { type SafetyConfig } from './data-safety-central.js'; /** Get a task by ID, including its dependencies. */ export declare function getTask(taskId: string, cwd?: string): Promise; /** Update an existing task. */ export declare function updateTask(taskId: string, updates: Partial, cwd?: string): Promise; /** Delete a task by ID. */ export declare function deleteTask(taskId: string, cwd?: string): Promise; /** List tasks with optional filters. */ export declare function listTasks(filters?: { status?: TaskStatus; parentId?: string | null; type?: TaskType; phase?: string; limit?: number; }, cwd?: string): Promise; /** Find tasks by fuzzy text search. */ export declare function findTasks(query: string, limit?: number, cwd?: string): Promise; /** * Archive a task (sets status to 'archived' with metadata). * * T1434 follow-up: T1408 introduced a CHECK constraint that limits * `archive_reason` to the 6-value enum (verified, reconciled, superseded, * shadowed, cancelled, completed-unverified). The default and any caller- * supplied reason MUST be one of those values; anything else is normalized * to `'completed-unverified'` to preserve forward compat. */ export declare function archiveTask(taskId: string, reason?: string, cwd?: string): Promise; /** Add a dependency between tasks. */ export declare function addDependency(taskId: string, dependsOn: string, cwd?: string): Promise; /** Remove a dependency. */ export declare function removeDependency(taskId: string, dependsOn: string, cwd?: string): Promise; /** Add a relation between tasks. */ export declare function addRelation(taskId: string, relatedTo: string, relationType?: 'related' | 'blocks' | 'duplicates' | 'absorbs' | 'fixes' | 'extends' | 'supersedes' | 'groups', cwd?: string, reason?: string): Promise; /** Remove a relation between tasks. */ export declare function removeRelation(taskId: string, relatedTo: string, relationType?: string, cwd?: string): Promise; /** Get relations for a task. */ export declare function getRelations(taskId: string, cwd?: string): Promise>; /** Get the dependency chain (blockers) for a task using recursive CTE. */ export declare function getBlockerChain(taskId: string, cwd?: string): Promise; /** Get children of a task (hierarchy). */ export declare function getChildren(parentId: string, cwd?: string): Promise; /** Build a tree from a root task using recursive CTE. */ export declare function getSubtree(rootId: string, cwd?: string): Promise; /** Count tasks by status. */ export declare function countByStatus(cwd?: string): Promise>; /** Get total task count (excluding archived). */ export declare function countTasks(cwd?: string): Promise; /** Configuration for safe operations. */ export type { SafetyConfig } from './data-safety-central.js'; /** * Create a task with full safety protections. * Includes: collision detection, write verification, sequence validation, auto-checkpoint. */ export declare function createTask(task: Task, cwd?: string, config?: Partial): Promise; /** * Update a task with full safety protections. * Includes: write verification, auto-checkpoint. */ export declare function updateTaskSafe(taskId: string, updates: Partial, cwd?: string, config?: Partial): Promise; /** * Delete a task with full safety protections. * Includes: delete verification, auto-checkpoint. */ export declare function deleteTaskSafe(taskId: string, cwd?: string, config?: Partial): Promise; //# sourceMappingURL=tasks-sqlite.d.ts.map