import { EventEmitter } from 'events';
import type { TmuxService } from '../agent/tmux.service.js';
export interface TaskMonitoringConfig {
    monitoringId: string;
    taskPath: string;
    originalPath: string;
    targetPath: string;
    orchestratorSession: string;
    assignmentPrompt: string;
    retryCount: number;
    timeoutSeconds: number;
    projectPath: string;
    taskId: string;
}
export declare class TaskAssignmentMonitorService extends EventEmitter {
    private activeMonitors;
    private logger;
    private tmuxService;
    private readonly POLL_INTERVAL;
    private readonly MAX_CONCURRENT_JOBS;
    constructor(tmuxService: TmuxService);
    /**
     * Start monitoring a task assignment
     */
    startMonitoring(config: TaskMonitoringConfig): Promise<{
        success: boolean;
        monitoringId: string;
        message?: string;
        error?: string;
    }>;
    /**
     * Stop monitoring a specific task
     */
    stopMonitoring(monitoringId: string, reason?: string): Promise<boolean>;
    /**
     * Get status of all active monitors
     */
    getActiveMonitors(): Array<{
        monitoringId: string;
        taskId: string;
        status: string;
        currentAttempt: number;
        elapsedSeconds: number;
        lastAssignedAgent?: string;
    }>;
    /**
     * Start the actual monitoring job with polling and timeout
     */
    private startMonitoringJob;
    /**
     * Start polling for file system changes
     */
    private startPolling;
    /**
     * Handle timeout - send escape and retry
     */
    private handleTimeout;
    /**
     * Send escape key to target agent to cancel hanging prompts
     */
    private sendEscapeToTargetAgent;
    /**
     * Find the oldest monitoring job for cleanup
     */
    private findOldestJob;
    /**
     * Cleanup and destroy service
     */
    destroy(): Promise<void>;
}
//# sourceMappingURL=task-assignment-monitor.service.d.ts.map