/**
 * Task cancellation operations.
 * Ported from lib/tasks/cancel-ops.sh
 *
 * @epic T4454
 * @task T4529
 */
import type { Task } from '@cleocode/contracts';
/** Result of a cancel operation. */
export interface CancelResult {
    success: boolean;
    taskId: string;
    reason?: string;
    cancelledAt?: string;
    error?: {
        code: string;
        message: string;
    };
}
/**
 * Check if a task can be cancelled.
 */
export declare function canCancel(task: Task): {
    allowed: boolean;
    reason?: string;
};
/**
 * Cancel a task in the tasks array (returns updated array).
 * Does NOT handle children - use deletion-strategy for that.
 */
export declare function cancelTask(taskId: string, tasks: Task[], reason?: string): {
    tasks: Task[];
    result: CancelResult;
};
/**
 * Batch cancel multiple tasks.
 */
export declare function cancelMultiple(taskIds: string[], tasks: Task[], reason?: string): {
    tasks: Task[];
    results: CancelResult[];
};
//# sourceMappingURL=cancel-ops.d.ts.map