import { Request, Response } from 'express';
import type { ApiController } from '../api.controller.js';
import type { ApiContext } from '../types.js';
import type { EventBusService } from '../../services/event-bus/event-bus.service.js';
/**
 * Set the EventBusService instance for task monitoring cleanup.
 * Called during server initialization.
 *
 * @param service - The EventBusService instance
 */
export declare function setEventBusServiceForTaskCleanup(service: EventBusService): void;
/**
 * Get the current EventBusService reference (exposed for testing).
 *
 * @returns The EventBusService or null
 */
export declare function getEventBusServiceForTaskCleanup(): EventBusService | null;
/**
 * Creates a new task MD file in the project's .crewly/tasks/ directory.
 * Optionally assigns it immediately if a sessionName is provided.
 *
 * @param req - Request containing projectPath, task, priority, sessionName (optional), milestone (optional)
 * @param res - Response with success status, created task path, and status
 */
export declare function createTask(this: ApiController, req: Request, res: Response): Promise<void>;
/**
 * Assigns a task to a team member by moving it from open/ to in_progress/ folder
 *
 * @param req - Request containing taskPath and memberId
 * @param res - Response with success status and task information
 */
export declare function assignTask(this: ApiController, req: Request, res: Response): Promise<void>;
/**
 * Completes a task by moving it from in_progress/ to done/ folder
 *
 * @param req - Request containing taskPath
 * @param res - Response with success status and completion information
 */
export declare function completeTask(this: ApiController, req: Request, res: Response): Promise<void>;
/**
 * Blocks a task by moving it from in_progress/ to blocked/ folder
 *
 * @param req - Request containing taskPath and blockReason
 * @param res - Response with success status and block information
 */
export declare function blockTask(this: ApiController, req: Request, res: Response): Promise<void>;
/**
 * Unblocks a task by moving it from blocked/ to open/ folder for reassignment
 *
 * @param req - Request containing taskPath and optional unblockNote
 * @param res - Response with success status and unblock information
 */
export declare function unblockTask(this: ApiController, req: Request, res: Response): Promise<void>;
/**
 * Gets the next available task from the open/ folder
 *
 * @param req - Request containing optional taskGroup filter
 * @param res - Response with next available task information
 */
export declare function takeNextTask(this: ApiController, req: Request, res: Response): Promise<void>;
/**
 * Synchronizes task status across the system
 *
 * @param req - Request containing projectPath and optional taskGroup
 * @param res - Response with sync status and task counts
 */
export declare function syncTaskStatus(this: ApiController, req: Request, res: Response): Promise<void>;
/**
 * Gets team progress across all task groups for a project
 *
 * @param req - Request containing projectPath
 * @param res - Response with comprehensive team progress information
 */
export declare function getTeamProgress(this: ApiController, req: Request, res: Response): Promise<void>;
/**
 * Starts task execution by sending assignment prompt to orchestrator
 * Initiates monitoring process to detect task acceptance with retry logic
 *
 * @param req - Request containing task execution parameters
 * @param res - Response with execution status and monitoring information
 */
export declare function startTaskExecution(this: ApiContext, req: Request, res: Response): Promise<void>;
/**
 * Recovers abandoned in-progress tasks when orchestrator starts
 *
 * @param req - Request containing sessionName (optional)
 * @param res - Response with recovery report
 */
export declare function recoverAbandonedTasks(this: ApiController, req: Request, res: Response): Promise<void>;
export declare function createTasksFromConfig(this: ApiContext, req: Request, res: Response): Promise<void>;
/**
 * Reads a task file from the filesystem with security validation
 *
 * @param req - Request containing taskPath
 * @param res - Response with task file content
 */
export declare function readTask(this: ApiController, req: Request, res: Response): Promise<void>;
/**
 * Retrieves the stored output JSON for a completed task.
 *
 * @param req - Request containing taskPath (path to the .md file in done/)
 * @param res - Response with the parsed output data
 */
export declare function getTaskOutput(this: ApiController, req: Request, res: Response): Promise<void>;
/**
 * POST /api/task-management/request-review
 *
 * Request a code review for a completed task. Logs the review request
 * and returns success. In the future this may notify the reviewer agent
 * or broadcast a review request to the team.
 *
 * @param req - Request with body: { ticketId, reviewer?, message?, branch? }
 * @param res - Response with { success, data: { message: string } }
 */
export declare function requestReview(this: ApiController, req: Request, res: Response): Promise<void>;
export declare function addMonitoring(this: ApiController, req: Request, res: Response): Promise<void>;
/**
 * Completes all tasks assigned to a given agent session.
 * Finds running WorkItems for the session in the TaskPool and marks them done.
 *
 * @param req - Request containing sessionName
 * @param res - Response with list of completed tasks
 */
export declare function completeTasksBySession(this: ApiController, req: Request, res: Response): Promise<void>;
/**
 * GET /task-management/tasks
 *
 * List task files for a project, optionally filtered by status.
 * Returns task filenames and paths grouped by milestone.
 *
 * @param req - Request with query: { projectPath, status? }
 * @param res - Response with { success, tasks }
 */
/**
 * Detect and optionally clean up orphan tasks.
 * Legacy — no-op, will be rebuilt on V3 WorkItem system.
 *
 * @param req - Request with cleanup parameters
 * @param res - Response with deprecation notice
 */
export declare function cleanupOrphanTasks(this: ApiController, req: Request, res: Response): Promise<void>;
export declare function listTasks(this: ApiController, req: Request, res: Response): Promise<void>;
export declare function scoreTask(this: ApiController, req: Request, res: Response): Promise<void>;
export declare function recordHandoff(this: ApiController, req: Request, res: Response): Promise<void>;
export declare function acceptTask(this: ApiController, req: Request, res: Response): Promise<void>;
export declare function requestClarification(this: ApiController, req: Request, res: Response): Promise<void>;
export declare function saveWorkingNotes(this: ApiController, req: Request, res: Response): Promise<void>;
/**
 * POST /task-management/:taskId/checklist
 * Submit or update a checklist for a task. Called by the TL's design-checklist skill.
 *
 * @param req.params.taskId - Task ID
 * @param req.body - Checklist JSON (items, objective, etc.)
 */
export declare function submitChecklist(this: ApiContext, req: Request, res: Response): Promise<void>;
/**
 * POST /task-management/:taskId/checklist/approve
 * Approve (or adjust) a pending checklist. Called by Orchestrator or user.
 *
 * @param req.params.taskId - Task ID
 * @param req.body.adjustments - Optional adjustments to checklist items
 */
export declare function approveChecklist(this: ApiContext, req: Request, res: Response): Promise<void>;
/**
 * GET /task-management/:taskId/checklist
 * Get the current checklist for a task.
 */
export declare function getChecklist(this: ApiContext, req: Request, res: Response): Promise<void>;
//# sourceMappingURL=task-management.controller.d.ts.map