/** * Task import, export, history, lint, and batch-validate operations. * @task T10064 * @epic T9834 */ export { coreTaskDepends, coreTaskDeps, coreTaskDepsCycles, coreTaskDepsOverview, coreTaskRelates, coreTaskRelatesAdd, coreTaskRelatesAddBatch, coreTaskRelatesRemove, coreTaskStats, } from './task-data.js'; /** * Export tasks as JSON or CSV. * * @param projectRoot - Absolute path to the CLEO project root directory * @param params - Optional export configuration * @param params.format - Output format: "json" (default) or "csv" * @param params.status - Filter to only tasks with this status * @param params.parent - Filter to tasks under this parent ID (recursive) * @returns Export payload with format, content/tasks, and task count * * @remarks * CSV output includes columns: id, title, status, priority, type, parentId, createdAt. * JSON output returns the full task objects. Both formats support status and parent filtering. * * @example * ```typescript * const result = await coreTaskExport('/project', { format: 'csv', status: 'done' }); * console.log(result.content); // CSV string * ``` * * @task T4790 */ export declare function coreTaskExport(projectRoot: string, params?: { format?: 'json' | 'csv'; status?: string; parent?: string; }): Promise; /** * Get task history from the audit log. * * @param projectRoot - Absolute path to the CLEO project root directory * @param taskId - The task ID to retrieve history for * @param limit - Maximum number of history entries to return (default: 100) * @returns Array of audit log entries ordered by timestamp descending * * @remarks * Queries the SQLite audit_log table for all operations on the given task. * Returns an empty array if the database is unavailable or no entries exist. * * @example * ```typescript * const history = await coreTaskHistory('/project', 'T042', 10); * for (const entry of history) console.log(entry.timestamp, entry.operation); * ``` * * @task T4790 */ export declare function coreTaskHistory(projectRoot: string, taskId: string, limit?: number): Promise>>; /** * Lint tasks for common issues. * * @param projectRoot - Absolute path to the CLEO project root directory * @param taskId - Optional task ID to lint; omit to lint all tasks * @returns Array of lint issues with severity, rule name, and descriptive message * * @remarks * Checks for: duplicate IDs, missing titles, missing descriptions, identical * title/description, duplicate descriptions, invalid statuses, future timestamps, * invalid parent references, and invalid dependency references. * * @example * ```typescript * const issues = await coreTaskLint('/project'); * const errors = issues.filter(i => i.severity === 'error'); * console.log(`${errors.length} errors found`); * ``` * * @task T4790 */ export declare function coreTaskLint(projectRoot: string, taskId?: string): Promise>; /** * Validate multiple tasks at once. * * @param projectRoot - Absolute path to the CLEO project root directory * @param taskIds - Array of task IDs to validate * @param checkMode - Validation depth: "full" runs all checks, "quick" checks only title/description/status * @returns Per-task validation results and an aggregate summary with error/warning counts * * @remarks * In "full" mode, additional checks include title-description equality, parent existence, * dependency existence, and future timestamp detection. Tasks that are not found are * reported as errors. * * @example * ```typescript * const { summary } = await coreTaskBatchValidate('/project', ['T001', 'T002'], 'full'); * console.log(`${summary.validTasks}/${summary.totalTasks} valid`); * ``` * * @task T4790 */ export declare function coreTaskBatchValidate(projectRoot: string, taskIds: string[], checkMode?: 'full' | 'quick'): Promise<{ results: Record>; summary: { totalTasks: number; validTasks: number; invalidTasks: number; totalIssues: number; errors: number; warnings: number; }; }>; /** * Import tasks from a JSON source string. * * @param projectRoot - Absolute path to the CLEO project root directory * @param source - JSON string containing an array of tasks or an object with a `tasks` array * @param overwrite - When true, overwrites existing tasks with matching IDs; otherwise skips them * @returns Import summary with counts of imported, skipped, errors, and optional ID remap table * * @remarks * When a task ID collides with an existing one and overwrite is false, a new sequential * ID is assigned and recorded in the remapTable. Tasks missing required id or title * fields are skipped with an error message. * * @example * ```typescript * const json = JSON.stringify([{ id: 'T500', title: 'New task', status: 'pending', priority: 'medium' }]); * const result = await coreTaskImport('/project', json, false); * console.log(`Imported ${result.imported}, skipped ${result.skipped}`); * ``` * * @task T4790 */ export declare function coreTaskImport(projectRoot: string, source: string, overwrite?: boolean): Promise<{ imported: number; skipped: number; errors: string[]; remapTable?: Record; }>; //# sourceMappingURL=task-import.d.ts.map