/**
 * Core task non-CRUD operations - business logic extracted from task-engine.ts.
 *
 * These are pure business logic functions that throw on failure and return
 * data directly (no EngineResult wrapper). The engine layer wraps these
 * in try/catch to produce EngineResult.
 *
 * Covers: next, blockers, tree, deps, relates, relatesAdd, analyze, restore,
 * unarchive, reorder, reparent, promote, reopen, complexityEstimate, depends,
 * stats, export, history, lint, batchValidate, import
 *
 * @task T4790
 * @epic T4654
 */
import type { BottleneckTask, TaskAnalysisResult, TaskDepsResult, TaskRef } from '@cleocode/contracts';
/** Tree node representation for task hierarchy. */
export interface FlatTreeNode {
    id: string;
    title: string;
    status: string;
    type?: string;
    children: FlatTreeNode[];
}
/** Complexity factor. */
export interface ComplexityFactor {
    name: string;
    value: number;
    detail: string;
}
/**
 * Suggest next task to work on based on priority, phase, age, and deps.
 * @task T4790
 */
export declare function coreTaskNext(projectRoot: string, params?: {
    count?: number;
    explain?: boolean;
}): Promise<{
    suggestions: Array<{
        id: string;
        title: string;
        priority: string;
        phase: string | null;
        score: number;
        reasons?: string[];
    }>;
    totalCandidates: number;
}>;
/**
 * Show blocked tasks and analyze blocking chains.
 * @task T4790
 */
export declare function coreTaskBlockers(projectRoot: string, params?: {
    analyze?: boolean;
    limit?: number;
}): Promise<{
    blockedTasks: Array<{
        id: string;
        title: string;
        status: string;
        depends?: string[];
        blockingChain: string[];
    }>;
    criticalBlockers: BottleneckTask[];
    summary: string;
    total: number;
    limit: number;
}>;
/**
 * Build hierarchy tree.
 * @task T4790
 */
export declare function coreTaskTree(projectRoot: string, taskId?: string): Promise<{
    tree: FlatTreeNode[];
    totalNodes: number;
}>;
/**
 * Show dependencies for a task.
 * @task T4790
 */
export declare function coreTaskDeps(projectRoot: string, taskId: string): Promise<TaskDepsResult>;
/**
 * Show task relations.
 * @task T4790
 */
export declare function coreTaskRelates(projectRoot: string, taskId: string): Promise<{
    taskId: string;
    relations: Array<{
        taskId: string;
        type: string;
        reason?: string;
    }>;
    count: number;
}>;
/**
 * Add a relation between two tasks.
 * @task T4790
 */
export declare function coreTaskRelatesAdd(projectRoot: string, taskId: string, relatedId: string, type: string, reason?: string): Promise<{
    from: string;
    to: string;
    type: string;
    reason?: string;
    added: boolean;
}>;
/**
 * Analyze tasks for priority and leverage.
 * @task T4790
 */
export declare function coreTaskAnalyze(projectRoot: string, taskId?: string, params?: {
    tierLimit?: number;
}): Promise<TaskAnalysisResult & {
    tierLimit: number;
}>;
/**
 * Restore a cancelled task back to pending.
 * @task T4790
 */
export declare function coreTaskRestore(projectRoot: string, taskId: string, params?: {
    cascade?: boolean;
    notes?: string;
}): Promise<{
    task: string;
    restored: string[];
    count: number;
}>;
/**
 * Cancel a task (sets status to 'cancelled', a soft terminal state).
 * Use restore to reverse. Use delete for permanent removal.
 * @task T4529
 */
export declare function coreTaskCancel(projectRoot: string, taskId: string, params?: {
    reason?: string;
}): Promise<{
    task: string;
    cancelled: boolean;
    reason?: string;
    cancelledAt: string;
}>;
/**
 * Move an archived task back to active tasks.
 * @task T4790
 */
export declare function coreTaskUnarchive(projectRoot: string, taskId: string, params?: {
    status?: string;
    preserveStatus?: boolean;
}): Promise<{
    task: string;
    unarchived: boolean;
    title: string;
    status: string;
}>;
/**
 * Change task position within its sibling group.
 * @task T4790
 */
export declare function coreTaskReorder(projectRoot: string, taskId: string, position: number): Promise<{
    task: string;
    reordered: boolean;
    newPosition: number;
    totalSiblings: number;
}>;
/**
 * Move task under a different parent.
 * @task T4790
 */
export declare function coreTaskReparent(projectRoot: string, taskId: string, newParentId: string | null): Promise<{
    task: string;
    reparented: boolean;
    oldParent: string | null;
    newParent: string | null;
    newType?: string;
}>;
/**
 * Promote a subtask to task or task to root.
 * @task T4790
 */
export declare function coreTaskPromote(projectRoot: string, taskId: string): Promise<{
    task: string;
    promoted: boolean;
    previousParent: string | null;
    typeChanged: boolean;
}>;
/**
 * Reopen a completed task.
 * @task T4790
 */
export declare function coreTaskReopen(projectRoot: string, taskId: string, params?: {
    status?: string;
    reason?: string;
}): Promise<{
    task: string;
    reopened: boolean;
    previousStatus: string;
    newStatus: string;
}>;
/**
 * Deterministic complexity scoring from task metadata.
 * @task T4790
 */
export declare function coreTaskComplexityEstimate(projectRoot: string, params: {
    taskId: string;
}): Promise<{
    size: 'small' | 'medium' | 'large';
    score: number;
    factors: ComplexityFactor[];
    dependencyDepth: number;
    subtaskCount: number;
    fileCount: number;
}>;
/**
 * Overview of all dependencies across the project.
 * @task T5157
 */
export declare function coreTaskDepsOverview(projectRoot: string): Promise<{
    totalTasks: number;
    tasksWithDeps: number;
    blockedTasks: Array<TaskRef & {
        unblockedBy: string[];
    }>;
    readyTasks: TaskRef[];
    validation: {
        valid: boolean;
        errorCount: number;
        warningCount: number;
    };
}>;
/**
 * Detect circular dependencies across the project.
 * @task T5157
 */
export declare function coreTaskDepsCycles(projectRoot: string): Promise<{
    hasCycles: boolean;
    cycles: Array<{
        path: string[];
        tasks: Array<Pick<TaskRef, 'id' | 'title'>>;
    }>;
}>;
/**
 * List dependencies for a task in a given direction.
 * @task T4790
 */
export declare function coreTaskDepends(projectRoot: string, taskId: string, direction?: 'upstream' | 'downstream' | 'both', options?: {
    tree?: boolean;
}): Promise<{
    taskId: string;
    direction: string;
    upstream: TaskRef[];
    downstream: TaskRef[];
    unresolvedChain: number;
    leafBlockers: TaskRef[];
    allDepsReady: boolean;
    hint?: string;
    upstreamTree?: FlatTreeNode[];
}>;
/**
 * Compute task statistics.
 * @task T4790
 */
export declare function coreTaskStats(projectRoot: string, epicId?: string): Promise<{
    total: number;
    pending: number;
    active: number;
    blocked: number;
    done: number;
    cancelled: number;
    byPriority: Record<string, number>;
    byType: Record<string, number>;
}>;
/**
 * Export tasks as JSON or CSV.
 * @task T4790
 */
export declare function coreTaskExport(projectRoot: string, params?: {
    format?: 'json' | 'csv';
    status?: string;
    parent?: string;
}): Promise<unknown>;
/**
 * Get task history from the log file.
 * @task T4790
 */
export declare function coreTaskHistory(projectRoot: string, taskId: string, limit?: number): Promise<Array<Record<string, unknown>>>;
/**
 * Lint tasks for common issues.
 * @task T4790
 */
export declare function coreTaskLint(projectRoot: string, taskId?: string): Promise<Array<{
    taskId: string;
    severity: 'error' | 'warning';
    rule: string;
    message: string;
}>>;
/**
 * Validate multiple tasks at once.
 * @task T4790
 */
export declare function coreTaskBatchValidate(projectRoot: string, taskIds: string[], checkMode?: 'full' | 'quick'): Promise<{
    results: Record<string, Array<{
        severity: 'error' | 'warning';
        rule: string;
        message: string;
    }>>;
    summary: {
        totalTasks: number;
        validTasks: number;
        invalidTasks: number;
        totalIssues: number;
        errors: number;
        warnings: number;
    };
}>;
/**
 * Import tasks from a JSON source string.
 * @task T4790
 */
export declare function coreTaskImport(projectRoot: string, source: string, overwrite?: boolean): Promise<{
    imported: number;
    skipped: number;
    errors: string[];
    remapTable?: Record<string, string>;
}>;
//# sourceMappingURL=task-ops.d.ts.map