import type { IAgentRuntime } from "../types/runtime";
import { Service } from "../types/service";
/**
 * Service responsible for generating embeddings asynchronously
 * This service listens for EMBEDDING_GENERATION_REQUESTED events
 * and processes them in a queue to avoid blocking the main runtime
 */
export declare class EmbeddingGenerationService extends Service {
    static serviceType: string;
    capabilityDescription: string;
    private queue;
    private isProcessing;
    private processingInterval;
    private maxQueueSize;
    private batchSize;
    private processingIntervalMs;
    private isDisabled;
    static start(runtime: IAgentRuntime): Promise<Service>;
    initialize(): Promise<void>;
    private handleEmbeddingRequest;
    /**
     * Make room in the queue by removing items based on priority and age
     * Removes 10% of the queue (minimum 1, maximum 10 items)
     */
    private makeRoomInQueue;
    /**
     * Insert an item into the queue based on its priority
     * High priority items go to the front, normal in the middle, low at the end
     */
    private insertItemByPriority;
    private startProcessing;
    private processQueue;
    /**
     * Prepare text for embedding generation.
     *
     * 1. Strip formatting (names, timestamps, entity IDs, markdown headers) so
     *    the embedding captures semantic meaning rather than structure.
     * 2. If the memory belongs to a conversation room, fetch the last few
     *    messages to provide contextual meaning for short/ambiguous messages.
     * 3. Truncate the result to the model's max input tokens to stay within limits.
     */
    private prepareEmbeddingText;
    private generateEmbedding;
    stop(): Promise<void>;
    getQueueSize(): number;
    getQueueStats(): {
        high: number;
        normal: number;
        low: number;
        total: number;
    };
    clearQueue(): void;
}
//# sourceMappingURL=embedding.d.ts.map