/** * Procedural Memory 유사도·병합 전략 * 기존 procedural memory와의 유사도 계산 및 병합 결정 */ import Database from 'better-sqlite3'; import type { ExtractedProceduralMemory } from './procedural-memory-extractor.types.js'; /** * 유사도 기반 병합 결과 */ export interface SimilarityMergeResult { shouldMerge: boolean; similarity: number; existingMemoryId?: string; updateMode: 'replace' | 'incremental' | 'versioned'; } /** * 기존 procedural memory와의 유사도 계산 * * 유사도 계산 전략: * 1. workflow_name 일치 여부 * 2. skill_name 일치 여부 * 3. task_goal 유사도 (문자열 유사도) * 4. steps 유사도 (JSON 배열 비교) */ export declare function calculateSimilarity(extracted: ExtractedProceduralMemory, existing: { workflow_name?: string | null; skill_name?: string | null; task_goal?: string | null; steps?: string | null; }): number; /** * 유사도 기반 병합 결정 * * 결정 전략: * 1. 유사도가 SIMILARITY_THRESHOLD 이상이면 병합 * 2. 유사도가 HIGH_SIMILARITY_THRESHOLD 이상이면 replace 모드 * 3. 그 외에는 incremental 모드 * 4. 유사도가 임계값 미만이면 새로 생성 (versioned 모드) */ export declare function determineMergeStrategy(db: Database.Database, extracted: ExtractedProceduralMemory): Promise; //# sourceMappingURL=procedural-memory-similarity.d.ts.map