import { OpenAIService } from './openai.service';
import { LangChainService } from './langchain.service';
import { NLPService } from '../nlp/nlp.service';
import { Redis } from 'ioredis';
/**
 * Natural language task creation request
 */
export interface NaturalLanguageTaskRequest {
    prompt: string;
    projectId?: string;
    context?: {
        currentTasks?: string[];
        completedTasks?: string[];
        projectDescription?: string;
        userRole?: string;
    };
}
/**
 * AI-generated task structure
 */
export interface AIGeneratedTask {
    title: string;
    description: string;
    priority: 'low' | 'medium' | 'high' | 'critical';
    complexity: 'trivial' | 'minor' | 'major' | 'critical';
    estimatedHours?: number;
    acceptanceCriteria?: string[];
    tags?: string[];
    subtasks?: Array<{
        title: string;
        description: string;
        estimatedHours?: number;
    }>;
    dependencies?: string[];
    assignee?: string;
}
/**
 * Task suggestion response
 */
export interface TaskSuggestion {
    id: string;
    title: string;
    description: string;
    rationale: string;
    priority: 'low' | 'medium' | 'high' | 'critical';
    estimatedHours?: number;
    confidence: number;
}
/**
 * Service for AI-powered task management
 * Integrates OpenAI and LangChain for intelligent task operations
 */
export declare class AITaskService {
    private openAIService;
    private langChainService;
    private nlpService;
    private config;
    private redis?;
    private rateLimiter?;
    private aiContextRepository;
    constructor(openAIService: OpenAIService, langChainService: LangChainService, nlpService: NLPService, redis?: Redis);
    /**
     * Initialize rate limiter for API calls
     */
    private initializeRateLimiter;
    /**
     * Create a task from natural language input
     * @param request Natural language task request
     * @returns AI-generated task
     */
    createTaskFromNaturalLanguage(request: NaturalLanguageTaskRequest): Promise<AIGeneratedTask>;
    /**
     * Break down a complex task into subtasks
     * @param taskId Task ID to break down
     * @param taskDescription Task description
     * @param context Additional context
     * @returns Task breakdown with subtasks
     */
    breakdownTask(taskId: string, taskDescription: string, context?: string): Promise<any>;
    /**
     * Get AI-powered task suggestions for a project
     * @param projectId Project ID
     * @param currentContext Current project context
     * @returns List of task suggestions
     */
    getTaskSuggestions(projectId: string, currentContext: {
        projectDescription: string;
        completedTasks: string[];
        currentTasks: string[];
        goals: string[];
    }): Promise<TaskSuggestion[]>;
    /**
     * Update AI context for a task based on feedback
     * @param taskId Task ID
     * @param feedback User feedback
     */
    updateTaskContext(taskId: string, feedback: string): Promise<void>;
    /**
     * Warm up cache with common queries
     * @param projectId Project ID to warm cache for
     */
    warmCache(projectId: string): Promise<void>;
    /**
     * Get AI service health status
     * @returns Health status of AI services
     */
    getHealthStatus(): Promise<{
        openai: boolean;
        langchain: boolean;
        redis: boolean;
        rateLimiter: boolean;
    }>;
    /**
     * Get usage statistics for AI services
     * @returns Combined usage stats
     */
    getUsageStats(): Promise<{
        openai: any;
        totalContextsSaved: number;
        cacheHitRate?: number;
    }>;
    /**
     * Process task update with NLP understanding
     * @param taskId Task to update
     * @param updatePrompt Natural language update description
     * @returns Updated task information
     */
    processTaskUpdate(taskId: string, updatePrompt: string): Promise<Partial<AIGeneratedTask>>;
    /**
     * Get task recommendations based on NLP analysis
     * @param projectId Project to analyze
     * @param recentActivity Recent project activity for context
     * @returns Task suggestions
     */
    getTaskRecommendations(projectId: string, recentActivity?: string[]): Promise<TaskSuggestion[]>;
    /**
     * Validate task description using NLP
     * @param description Task description to validate
     * @returns Validation result with suggestions
     */
    validateTaskDescription(description: string): Promise<{
        isValid: boolean;
        issues: string[];
        suggestions: string[];
        extractedInfo: any;
    }>;
    /**
     * Map NLP complexity to task complexity
     */
    private mapComplexityFromNLP;
    private buildProjectContext;
    private parseSuggestions;
    private finalizeSuggestion;
    private saveAIContext;
    private checkRateLimit;
    private getCached;
    private setCached;
    private invalidateCache;
    private hashString;
    private testRedisConnection;
    private calculateCacheHitRate;
}
//# sourceMappingURL=ai-task.service.d.ts.map