/** * EngineResult wrappers for data/query task ops — deps, stats, export, lint, import. * Split from engine-wrap.ts to keep individual file sizes ≤780 LOC. * @task T10064 * @epic T9834 */ import type { TasksClaimParams, TasksClaimResult, TasksContextParams, TasksContextResult, TasksUnclaimParams, TasksUnclaimResult } from '@cleocode/contracts'; import { type EngineResult } from '../engine-result.js'; import type { DepGraphValidateResult, DepValidateScope } from './dep-graph-validator.js'; import type { RankingChange } from './ranking-audit.js'; import type { ComplexityFactor } from './task-analyze.js'; /** * Deterministic complexity scoring. * @task T1568 * @epic T1566 */ export declare function taskComplexityEstimate(projectRoot: string, params: { taskId: string; }): Promise>; /** * List dependencies for a task in a given direction. * @task T1568 * @epic T1566 */ export declare function taskDepends(projectRoot: string, taskId: string, direction?: 'upstream' | 'downstream' | 'both', tree?: boolean): Promise; /** * Return a localized WorkGraph slice around one task. * @task T10628 */ export declare function taskSlice(projectRoot: string, taskId: string, options?: { radius?: number; depth?: number; budget?: number; direction?: 'upstream' | 'downstream' | 'around'; includeRelates?: boolean; }): Promise; /** * Overview of all dependencies across the project. * @task T1568 * @epic T1566 */ export declare function taskDepsOverview(projectRoot: string): Promise; readyTasks: Array<{ id: string; title: string; status: string; }>; validation: { valid: boolean; errorCount: number; warningCount: number; }; }>>; /** * Detect circular dependencies across the project. * @task T1568 * @epic T1566 */ export declare function taskDepsCycles(projectRoot: string): Promise; }>; }>>; /** * Run dep-graph validation — orphan, circular, cross-epic gap, stale-dep detection. * * Fetches ALL tasks including archived so that deps pointing to archived tasks * are correctly treated as satisfied rather than missing (T9158 / T1954). * Without archived tasks in the pool, `validateDependencyRefs` incorrectly * flags them as E_MISSING_REF because `queryTasks({})` excludes archived by * default. * * @param projectRoot - Absolute path to the project root. * @param epicId - Optional epic ID to scope validation to direct children only. * @param scope - Which tasks to include: all, open, or critical-priority only. * @returns EngineResult with validation issues and summary. * @task T1857 * @epic T1855 */ export declare function taskDepsValidate(projectRoot: string, epicId?: string, scope?: DepValidateScope): Promise>; /** * Render a dep-graph tree for a given epic in text, Mermaid, or JSON format. * * @param projectRoot - Absolute path to the project root. * @param epicId - Epic ID to visualise. * @param format - Output format: 'text' | 'mermaid' | 'json'. * @returns EngineResult with rendered output and structured node/edge data. * @task T1857 * @epic T1855 */ export declare function taskDepsTree(projectRoot: string, epicId: string, format?: 'text' | 'mermaid' | 'json'): Promise>; /** * Compute task statistics, optionally scoped to an epic. * @task T1568 * @epic T1566 */ export declare function taskStats(projectRoot: string, epicId?: string): Promise; byType: Record; }>>; /** * Export tasks as JSON or CSV. * @task T1568 * @epic T1566 */ export declare function taskExport(projectRoot: string, params?: { format?: 'json' | 'csv'; status?: string; parent?: string; }): Promise>; /** * Get task history from the log file. * @task T1568 * @epic T1566 */ export declare function taskHistory(projectRoot: string, taskId: string, limit?: number): Promise>>>; /** * Who changed a task's ranking inputs, which session, why, before/after * (T12693, D11161) — newest first. * * @param projectRoot - Project root. * @param taskId - Task. * @param limit - Maximum entries. * @returns The recorded ranking changes. * @task T12693 */ export declare function taskRankingHistory(projectRoot: string, taskId: string, limit?: number): Promise>; /** * Undo one recorded ranking change as a new audited change (T12693). * * @param projectRoot - Project root. * @param params - Audit entry id, reason, force. * @returns The task, fields and restored values. * @task T12693 */ export declare function taskRankingRevert(projectRoot: string, params: { entryId: string; reason?: string; force?: boolean; }): Promise; }>>; /** * Lint tasks for common issues. * @task T1568 * @epic T1566 */ export declare function taskLint(projectRoot: string, taskId?: string): Promise>>; /** * Validate multiple tasks at once. * @task T1568 * @epic T1566 */ export declare function taskBatchValidate(projectRoot: string, taskIds: string[], checkMode?: 'full' | 'quick'): Promise>; summary: { totalTasks: number; validTasks: number; invalidTasks: number; totalIssues: number; errors: number; warnings: number; }; }>>; /** * Import tasks from a JSON source string or export package. * @task T1568 * @epic T1566 */ export declare function taskImport(projectRoot: string, source: string, overwrite?: boolean): Promise; }>>; /** * Take, renew or override the caller session's leased claim on a task * (T12502). The claim is recorded under the caller's BOUND session; an * unbound caller is refused (a lease needs a holder). The human `assignee` * is never written. * * @param projectRoot - Project root. * @param params - Task, optional agent id, and `renew` / `takeOver` / `forceClaim`. * @returns The lease held, or `E_TASK_CLAIMED` naming the holder. * @task T1568 * @task T12502 * @epic T1566 */ export declare function taskClaim(projectRoot: string, params: TasksClaimParams): Promise>; /** * Release the caller session's claim lease on a task (T12502). Releasing * another session's lease needs `forceClaim` and is audited. * * @param projectRoot - Project root. * @param params - Task and optional `forceClaim`. * @returns Whether a lease was released. * @task T1568 * @task T12502 * @epic T1566 */ export declare function taskUnclaim(projectRoot: string, params: TasksUnclaimParams): Promise>; /** * Build a bounded task-scoped context pack. * @task T10629 * @task T10630 */ export declare function taskContext(projectRoot: string, params: TasksContextParams): Promise>; //# sourceMappingURL=engine-wrap-ops.d.ts.map