import { TaskService } from './service.js'; import { CoordinationService } from '../coordination/service.js'; import type { Task, TaskWithRelations } from './types.js'; import type { WorkAnnouncement, WorkOverlap, CollaborationSuggestion } from '../types/coordination.js'; export interface TaskCoordinationConfig { taskService: TaskService; coordinationService: CoordinationService; agentId: string; agentName: string; worktreeBranch?: string; } export interface ClaimResult { task: TaskWithRelations; announcement: WorkAnnouncement; overlaps: WorkOverlap[]; suggestions: CollaborationSuggestion[]; worktreeBranch?: string; } export interface ReleaseResult { task: Task; completedAnnouncements: number; } /** * Coordinates task operations with the agent coordination system. * Handles claiming/releasing tasks, overlap detection, and multi-agent awareness. */ export declare class TaskCoordinator { private taskService; private coordService; private agentId; private worktreeBranch?; constructor(config: TaskCoordinationConfig); /** * Claim a task for this agent. * - Assigns the task to this agent * - Creates worktree branch if needed * - Announces work to coordination system * - Detects overlaps with other agents */ claim(taskId: string, worktreeBranch?: string): Promise; /** * Release a task (mark complete, announce completion). */ release(taskId: string, reason?: string): Promise; /** * Check for overlaps before working on a task. */ checkOverlaps(taskId: string): WorkOverlap[]; /** * Find tasks that other agents are working on in the same area. */ findRelatedActiveWork(taskId: string): Array<{ task: Task; agent: string; overlap: WorkOverlap; }>; /** * Suggest optimal task assignment based on current work distribution. */ suggestNextTask(): TaskWithRelations | null; /** * Get merge order suggestions for tasks with overlapping work. */ getMergeOrderSuggestion(taskIds: string[]): string[]; /** * Convert a task to a resource identifier for the coordination system. */ private taskToResource; /** * Estimate time to complete a task based on type and complexity. */ private estimateMinutes; } //# sourceMappingURL=coordination.d.ts.map