import type { IAgentRuntime } from "../../../types/runtime.ts";
import { Service, type ServiceTypeName } from "../../../types/service.ts";
import { type Experience, type ExperienceAnalysis, type ExperienceQuery, ExperienceType } from "./types.ts";
export declare class ExperienceService extends Service {
    static serviceType: ServiceTypeName;
    capabilityDescription: string;
    private experiences;
    private experiencesByDomain;
    private experiencesByType;
    private dirtyExperiences;
    private persistTimer;
    private decayManager;
    private relationshipManager;
    constructor(runtime: IAgentRuntime);
    static start(runtime: IAgentRuntime): Promise<ExperienceService>;
    private loadExperiences;
    recordExperience(experienceData: Partial<Experience>): Promise<Experience>;
    private saveExperienceToMemory;
    private persistDirtyExperiences;
    queryExperiences(query: ExperienceQuery): Promise<Experience[]>;
    /** Apply query filters (type, outcome, domain, tags, confidence, importance, timeRange). */
    private applyFilters;
    /**
     * Find similar experiences using vector search + reranking.
     *
     * Reranking strategy:
     *   Vector similarity is the dominant signal (70%) — an irrelevant experience
     *   should never outrank a relevant one just because it has high confidence.
     *   Quality signals (confidence, importance) act as tiebreakers among
     *   similarly-relevant results (30% combined).
     *
     *   A minimum similarity threshold filters out noise so quality signals
     *   can't promote genuinely irrelevant experiences.
     */
    findSimilarExperiences(text: string, limit?: number): Promise<Experience[]>;
    /** Fallback when embeddings are unavailable: sort by decayed confidence * importance. */
    private fallbackSort;
    analyzeExperiences(domain?: string, type?: ExperienceType): Promise<ExperienceAnalysis>;
    private cosineSimilarity;
    private findCommonPatterns;
    private calculateOutcomeConsistency;
    private extractAlternatives;
    private generateRecommendations;
    stop(): Promise<void>;
}
//# sourceMappingURL=service.d.ts.map