/**
 * Predictive Memory Service for UAP
 *
 * Predicts which memory queries will be needed for a given task and
 * prefetches them to reduce latency. Learns from observed access
 * patterns to improve predictions over time.
 */
export interface MemoryService {
    query: (q: string) => Promise<any[]>;
}
/**
 * PredictiveMemoryService predicts what memory queries will be needed
 * for a task, prefetches them, and learns from actual access patterns.
 */
export declare class PredictiveMemoryService {
    /**
     * Learned mapping: task-type keywords -> queries that were actually used.
     * Map<normalized-task-keyword, string[]>
     */
    private learnedQueries;
    /**
     * Recent task history for similarity matching.
     * Array of { taskDescription, queriesUsed }
     */
    private taskHistory;
    private readonly maxHistory;
    /**
     * Predict what memory queries will be needed for a task.
     *
     * Uses three strategies:
     * 1. Task similarity: if a similar task was done before, reuse its queries
     * 2. Entity extraction: extract technical entities from the task description
     * 3. Category-based: match task to known categories and return relevant queries
     *
     * @param taskDescription - Description of the upcoming task
     * @param recentTasks - Recent task descriptions for context
     * @returns Array of predicted query strings
     */
    predictNeededContext(taskDescription: string, recentTasks: string[]): string[];
    /**
     * Prefetch predicted memories using the provided memory service.
     *
     * @param predictions - Array of query strings to prefetch
     * @param memoryService - Service with a query method
     * @returns Map of query -> results
     */
    prefetch(predictions: string[], memoryService: MemoryService): Promise<Map<string, any[]>>;
    /**
     * Record which queries were actually used for a task.
     * This feeds the learning model so future predictions improve.
     *
     * @param taskDescription - The task that was performed
     * @param queriesUsed - The queries that were actually accessed
     */
    recordAccess(taskDescription: string, queriesUsed: string[]): void;
    /**
     * Find similar past tasks and add their queries as predictions.
     */
    private predictFromSimilarTasks;
    /**
     * Extract technical entities from a description and use them as queries.
     */
    private predictFromEntities;
    /**
     * Match task description to known categories and add category queries.
     */
    private predictFromCategories;
    /**
     * Use learned keyword->query mappings for prediction.
     */
    private predictFromLearned;
    /**
     * Extract significant keywords from a task description.
     * Filters out common stop words and very short words.
     */
    private extractKeywords;
    /**
     * Save learned data to SQLite for cross-session persistence.
     */
    saveToDb(dbPath: string): void;
    /**
     * Load learned data from SQLite.
     */
    loadFromDb(dbPath: string): void;
}
export declare function getPredictiveMemoryService(dbPath?: string): PredictiveMemoryService;
//# sourceMappingURL=predictive-memory.d.ts.map