/** * Task scheduler implementation */ import { Task, CoordinationConfig } from "../utils/types.js"; import { IEventBus } from "../core/event-bus.js"; import { ILogger } from "../core/logger.js"; export interface ScheduledTask { task: Task; agentId: string; attempts: number; lastAttempt?: Date; timeout?: NodeJS.Timeout; } /** * Task scheduler for managing task assignment and execution */ export declare class TaskScheduler { protected config: CoordinationConfig; protected eventBus: IEventBus; protected logger: ILogger; protected tasks: Map; protected agentTasks: Map>; protected taskDependencies: Map>; protected completedTasks: Set; constructor(config: CoordinationConfig, eventBus: IEventBus, logger: ILogger); initialize(): Promise; shutdown(): Promise; assignTask(task: Task, agentId: string): Promise; completeTask(taskId: string, result: Record): Promise; failTask(taskId: string, error: Error): Promise; cancelTask(taskId: string, reason: string): Promise; cancelAgentTasks(agentId: string): Promise; rescheduleAgentTasks(agentId: string): Promise; getAgentTaskCount(agentId: string): number; getHealthStatus(): Promise<{ healthy: boolean; error?: string; metrics?: Record; }>; getAgentTasks(agentId: string): Promise; performMaintenance(): Promise; protected startTask(taskId: string): void; protected canStartTask(task: Task): boolean; protected cancelDependentTasks(taskId: string, reason: string): Promise; protected cleanup(): void; } //# sourceMappingURL=scheduler.d.ts.map