/**
 * Memento MCP Server 타입 정의
 */
export type MemoryType = 'working' | 'episodic' | 'semantic' | 'procedural';
export type MemoryTypeRequest = 'working' | 'episodic' | 'semantic' | 'procedural' | 'core' | 'vault';
/**
 * 타입 가드 함수: MemoryTypeRequest가 MemoryType인지 확인
 * 'core'와 'vault'는 memory_item 테이블에 저장되지 않으므로 false 반환
 */
export declare function isMemoryItemType(type: MemoryTypeRequest): type is MemoryType;
export type PrivacyScope = 'private' | 'team' | 'public';
/**
 * SQL 파라미터 타입
 * SQLite에서 지원하는 파라미터 타입을 정의합니다.
 * better-sqlite3의 prepare() 메서드에서 사용할 수 있는 타입들입니다.
 */
export type SqlParam = string | number | boolean | null | Date;
export interface MemoryItem {
    id: string;
    type: MemoryType;
    content: string;
    importance: number;
    privacy_scope: PrivacyScope;
    created_at: Date;
    last_accessed?: Date;
    pinned: boolean;
    tags?: string[];
    source?: string;
    embedding?: number[];
    origin_source?: string;
    task_goal?: string;
    steps?: string;
    reflection_notes?: string;
    workflow_name?: string;
    skill_name?: string;
    trigger_conditions?: string;
    owner_id?: string | null;
    process_id?: string | null;
    session_id?: string | null;
    project_id?: string | null;
    num_times?: number;
    last_mentioned_at?: Date | string | null;
    source_session_id?: string | null;
    confidence?: number | null;
    /** Sleep consolidation (005): episodic이 통합 처리되었으면 true */
    isConsolidated?: boolean;
}
/**
 * Process Attribute (Issue #91): process별 주제/속성 메타.
 * recall 시 (query 유사도) × (process-attribute 적합도) 스코어링에 사용.
 */
export interface ProcessAttribute {
    process_id: string;
    topics?: string[];
    workflow_names?: string[];
    skill_names?: string[];
    created_at?: string;
    updated_at?: string;
}
export interface MemorySearchFilters {
    id?: string[] | undefined;
    type?: MemoryType[] | undefined;
    tags?: string[] | undefined;
    privacy_scope?: PrivacyScope[] | undefined;
    time_from?: string | undefined;
    time_to?: string | undefined;
    pinned?: boolean | undefined;
    has_reflection_notes?: boolean | undefined;
    workflow_name?: string | undefined;
    skill_name?: string | undefined;
    version_filter?: import('./procedural-versioning.js').VersionFilterType;
    version_series_id?: string | undefined;
    version_number?: number | undefined;
    include_version_chain?: boolean | undefined;
    include_diff_with?: 'previous' | string | undefined;
    owner_id?: string | string[] | undefined;
    process_id?: string | string[] | undefined;
    session_id?: string | string[] | undefined;
    project_id?: string | undefined;
}
export type { RelationCandidate, RelationType, RelationCategory, ExtractOptions, ExtractResult, IRelationExtractor } from './relation.js';
export type { MemoryRelation, RelationMetadata, RelationDirection, GetRelationsOptions, GetRelatedMemoriesOptions, AddRelationOptions, IRelationGraph, RelationTypeRegistry } from './relation-graph.js';
export type { FieldDiff, StepsDiffItem, StepChangeType, ProceduralDiffResult, VersionChainItem, VersionFilterType } from './procedural-versioning.js';
export type { Triple, TripleExtractionFailureReason, ExtractionSteps, ExtractionInfo, TripleExtractionResult, TripleExtractionOptions, PredicateCanonicalizationResult, EntityLinkingResult, TripleValidationResult, TripleExtractionStats, TriplePipelineChunkError, TriplePipelineResult } from './triple-extraction.js';
export type { ConsolidationCluster, SleepConsolidationRunResult } from './consolidation.types.js';
export { MEMORY_TYPE_RELATION_MAP, RELATION_TYPE_CATEGORY_MAP, RELATION_TYPE_BOOST_MAP, isApplicableRelationType, getRelationCategory, getRelationBoost } from './relation.js';
export interface MemorySearchResult {
    id: string;
    content: string;
    type: MemoryType;
    importance: number;
    created_at: Date;
    last_accessed?: Date;
    pinned: boolean;
    tags?: string[];
    score: number;
    recall_reason: string;
    /** include_score_breakdown=true일 때 텍스트/하이브리드 검색 경로에서 포함 */
    score_breakdown?: import('./search.types.js').ScoreBreakdown;
    task_goal?: string;
    steps?: string;
    reflection_notes?: string;
    workflow_name?: string;
    skill_name?: string;
    trigger_conditions?: string;
    version?: number;
    version_series_id?: string | null;
    version_chain?: import('./procedural-versioning.js').VersionChainItem[];
    diff_with_previous?: import('./procedural-versioning.js').ProceduralDiffResult | null;
    diff_with?: import('./procedural-versioning.js').ProceduralDiffResult | null;
    consolidation_score?: number;
    owner_id?: string | null;
    process_id?: string | null;
    session_id?: string | null;
    num_times?: number;
    last_mentioned_at?: Date;
    project_id?: string | null;
}
export interface SearchRankingWeights {
    relevance: number;
    recency: number;
    importance: number;
    usage: number;
    duplication_penalty: number;
}
export type EmbeddingProvider = 'tfidf' | 'lightweight' | 'minilm' | 'openai' | 'gemini';
export type LLMProvider = 'openai' | 'gemini' | 'ollama' | 'auto';
/**
 * 저장된 임베딩의 Provider 통계 정보
 * 데이터베이스에서 조회한 provider별 통계를 나타냄
 */
export interface StoredEmbeddingProviderStats {
    provider: EmbeddingProvider;
    count: number;
    avg_dimensions: number;
}
export interface MementoConfig {
    dbPath: string;
    serverName: string;
    serverVersion: string;
    port: number;
    embeddingProvider: EmbeddingProvider;
    openaiApiKey: string | undefined;
    openaiModel: string;
    openaiLlmModel: string;
    geminiApiKey: string | undefined;
    geminiModel: string;
    embeddingDimensions: number;
    llmProvider: LLMProvider;
    ollamaBaseUrl: string;
    ollamaModel: string;
    searchDefaultLimit: number;
    searchMaxLimit: number;
    forgetTTL: {
        working: number;
        episodic: number;
        semantic: number;
        procedural: number;
    };
    logLevel: string;
    logFile: string | undefined;
    mcpLogProtocol: boolean;
    nodeEnv: string;
    typeParamMode: 'warn' | 'deprecate' | 'error';
    consolidationScoreEnabled: boolean;
    fts5MigrationStatus: 'pending' | 'in_progress' | 'completed' | 'failed';
    walCheckpointIntervalMs: number;
    walSizeWarningThreshold: number;
    walSizeDangerThreshold: number;
    walCheckpointUseDedicatedConnection: boolean;
    walCheckpointMaxRetries: number;
    walCheckpointRetryBackoffMs: number;
    diagnosticsEnabled: boolean;
    diagnosticsIntervalMs: number;
    diagnosticsLogDir: string;
    lockMonitorIntervalMs: number;
    lockMonitorWarningThresholdMs: number;
    lockMonitorDangerThresholdMs: number;
    lockMonitorCriticalThresholdMs: number;
    batchSchedulerEnabled: boolean;
    walCheckpointEnabled: boolean;
    dbLockMonitorEnabled: boolean;
    proceduralExtractionStrategy: 'llm_first' | 'rule_only';
    proceduralLlmExtractorTimeoutMs: number;
    corsAllowedOrigins: string[];
    adminApiKey: string | undefined;
    /** HTTP 서버 바인드 주소 (MEMENTO_HTTP_BIND_HOST, 미설정 시 기본 127.0.0.1) */
    httpListenHost: string;
    /**
     * true이면 루프백이 아닌 바인딩에서도 ADMIN_API_KEY 없이 기동 허용(무인증 노출 위험, 문서화된 개발용).
     */
    allowInsecureHttpAdmin: boolean;
    recallProfileEnabled: boolean;
    fts5FallbackEnabled: boolean;
    /** FR-014: true이면 recall 텔레메트리에 query 전문을 저장(기본 false = 해시만) */
    telemetryStoreQueryPlaintext: boolean;
}
/**
 * 업데이트 모드 타입
 * - replace: 기존 steps를 새로운 steps로 완전 교체
 * - incremental: 기존 steps에 새로운 단계 추가 또는 수정
 * - versioned: 새 버전의 Procedural Memory 생성 (버전 관리)
 */
export type UpdateMode = 'replace' | 'incremental' | 'versioned';
export interface RememberParams {
    content?: string;
    type?: MemoryTypeRequest;
    key?: string;
    value?: string;
    always_load?: boolean;
    immutable?: boolean;
    task_goal?: string;
    steps?: string;
    reflection_notes?: string;
    workflow_name?: string;
    skill_name?: string;
    trigger_conditions?: string;
    update_mode?: UpdateMode;
    tags?: string[];
    importance?: number;
    source?: string;
    privacy_scope?: PrivacyScope;
}
/**
 * 반환 형식 타입
 * - full: 모든 필드 반환
 * - steps_only: steps 필드만 반환 (간결한 응답)
 */
export type ReturnFormat = 'full' | 'steps_only';
export interface RecallParams {
    query?: string;
    type?: MemoryTypeRequest;
    key?: string;
    agent_id?: string;
    filters?: MemorySearchFilters;
    limit?: number;
    workflow_name?: string;
    skill_name?: string;
    match_trigger_conditions?: boolean;
    return_format?: ReturnFormat;
    version_filter?: import('./procedural-versioning.js').VersionFilterType;
    version_series_id?: string;
    version_number?: number;
    include_version_chain?: boolean;
    include_diff_with?: 'previous' | string;
}
export interface ForgetParams {
    id: string;
    hard?: boolean;
}
export interface PinParams {
    id: string;
}
export interface UnpinParams {
    id: string;
}
export interface FeedbackParams {
    memory_id: string;
    helpful: boolean;
    score?: number;
}
export interface MemoryInjectionParams {
    query: string;
    token_budget?: number;
}
/**
 * Meta Memory Statistics 인터페이스
 *
 * 메모리 항목의 recall 통계를 저장하는 타입입니다.
 * meta_memory_stats 테이블과 일대일 대응됩니다.
 *
 * @property memory_id - 기억 ID (memory_item.id 참조)
 * @property recall_count - 총 회상 횟수
 * @property success_count - 성공한 회상 횟수 (final_score >= 0.5)
 * @property failure_count - 실패한 회상 횟수 (final_score < 0.5)
 * @property avg_confidence - 평균 신뢰도 점수 (0.0 ~ 1.0)
 * @property last_recalled_at - 마지막 회상 시점 (NULL 허용)
 * @property created_at - 생성 시점
 * @property updated_at - 마지막 업데이트 시점
 */
export interface MetaMemoryStats {
    memory_id: string;
    recall_count: number;
    success_count: number;
    failure_count: number;
    avg_confidence: number;
    last_recalled_at?: Date;
    created_at: Date;
    updated_at: Date;
}
/**
 * Get Meta Memory Statistics 파라미터 인터페이스
 *
 * get_meta_memory_stats 도구의 파라미터 타입입니다.
 * 모든 필드는 선택적이며, 다양한 필터링 옵션을 제공합니다.
 *
 * @property memory_id - 특정 기억 ID (선택적)
 * @property memory_ids - 여러 기억 ID 배열 (선택적)
 * @property min_recall_count - 최소 recall_count 필터 (선택적)
 * @property min_confidence - 최소 avg_confidence 필터 (선택적)
 * @property limit - 결과 제한 (기본값: 100, 선택적)
 *
 * @example
 * ```typescript
 * // 특정 메모리 조회
 * const params1: GetMetaMemoryStatsParams = {
 *   memory_id: 'mem_12345'
 * };
 *
 * // 여러 메모리 조회
 * const params2: GetMetaMemoryStatsParams = {
 *   memory_ids: ['mem_1', 'mem_2', 'mem_3']
 * };
 *
 * // 필터링 조회
 * const params3: GetMetaMemoryStatsParams = {
 *   min_recall_count: 10,
 *   min_confidence: 0.5,
 *   limit: 50
 * };
 * ```
 */
export interface GetMetaMemoryStatsParams {
    memory_id?: string;
    memory_ids?: string[];
    min_recall_count?: number;
    min_confidence?: number;
    limit?: number;
}
/**
 * Meta Memory Statistics 결과 인터페이스
 *
 * get_meta_memory_stats 도구의 응답 타입입니다.
 *
 * @property items - MetaMemoryStats 배열
 * @property total_count - 전체 결과 개수
 *
 * @example
 * ```typescript
 * const result: MetaMemoryStatsResult = {
 *   items: [
 *     {
 *       memory_id: 'mem_12345',
 *       recall_count: 10,
 *       success_count: 8,
 *       failure_count: 2,
 *       avg_confidence: 0.85,
 *       created_at: new Date('2024-01-01T00:00:00.000Z'),
 *       updated_at: new Date('2024-01-01T00:00:00.000Z')
 *     }
 *   ],
 *   total_count: 1
 * };
 * ```
 */
export interface MetaMemoryStatsResult {
    items: MetaMemoryStats[];
    total_count: number;
}
//# sourceMappingURL=index.d.ts.map