import { IDataObject } from 'n8n-workflow';
/**
 * 임베딩 데이터를 저장하고 관리하는 단순 메모리 클래스
 */
export declare class SimpleMemory {
    private static instance;
    private memory;
    private constructor();
    /**
     * 싱글톤 인스턴스 가져오기
     */
    static getInstance(): SimpleMemory;
    /**
     * 임베딩 데이터 저장하기
     * @param key 데이터 식별 키
     * @param data 저장할 데이터
     */
    store(key: string, data: IDataObject): void;
    /**
     * 임베딩 데이터 가져오기
     * @param key 데이터 식별 키
     * @returns 저장된 데이터 또는 undefined (없는 경우)
     */
    retrieve(key: string): IDataObject | undefined;
    /**
     * 모든 임베딩 데이터 가져오기
     * @returns 모든 저장된 데이터 맵
     */
    getAll(): Map<string, IDataObject>;
    /**
     * 특정 키로 시작하는 모든 데이터 가져오기
     * @param prefix 키 접두사
     * @returns 접두사로 시작하는 모든 데이터 객체의 배열
     */
    getAllByPrefix(prefix: string): IDataObject[];
    /**
     * 데이터 삭제하기
     * @param key 삭제할 데이터의 키
     * @returns 삭제 성공 여부
     */
    remove(key: string): boolean;
    /**
     * 특정 접두사로 시작하는 모든 데이터 삭제하기
     * @param prefix 키 접두사
     * @returns 삭제된 데이터 수
     */
    removeByPrefix(prefix: string): number;
    /**
     * 모든 데이터 삭제하기
     */
    clear(): void;
    /**
     * 저장된 데이터 수 가져오기
     */
    size(): number;
}
export declare const memoryInstance: SimpleMemory;
/**
 * 벡터 간 코사인 유사도를 계산합니다.
 * 두 벡터 간의 코사인 각도를 기반으로 -1과 1 사이의 유사도 값을 반환합니다.
 * 1에 가까울수록 유사, -1에 가까울수록 반대, 0은 관계 없음을 의미합니다.
 */
export declare function simpleVectorSimilarity(vecA: number[], vecB: number[]): number;
/**
 * 간단한 인메모리 캐시 구현체
 * 워크플로우 ID별로 키-값 쌍을 저장합니다.
 */
export declare class MemoryCache<T> {
    private cache;
    private static instance;
    private constructor();
    static getInstance<T>(): MemoryCache<T>;
    /**
     * 지정된 워크플로우 및 키에 대한 값을 저장합니다.
     */
    set(workflowId: string, key: string, value: T): void;
    /**
     * 지정된 워크플로우 및 키에 대한 값을 가져옵니다.
     */
    get(workflowId: string, key: string): T | undefined;
    /**
     * 지정된 워크플로우 및 키에 대한 값이 있는지 확인합니다.
     */
    has(workflowId: string, key: string): boolean;
    /**
     * 지정된 워크플로우 및 키에 대한 값을 삭제합니다.
     */
    delete(workflowId: string, key: string): boolean;
    /**
     * 지정된 워크플로우의 모든 값을 삭제합니다.
     */
    clear(workflowId: string): boolean;
    /**
     * 모든 워크플로우의 모든 값을 삭제합니다.
     */
    clearAll(): void;
    /**
     * 지정된 워크플로우의 모든 키를 가져옵니다.
     */
    keys(workflowId: string): string[];
    /**
     * 지정된 워크플로우의 모든 값을 가져옵니다.
     */
    values(workflowId: string): T[];
    /**
     * 지정된 워크플로우의 모든 항목을 가져옵니다.
     */
    entries(workflowId: string): [string, T][];
}
export declare const memoryCache: MemoryCache<unknown>;
