/**
 * Sleep consolidation 오케스트레이터
 */
import type Database from 'better-sqlite3';
import type { IRelationGraph } from '../../../shared/types/relation-graph.js';
import type { SleepConsolidationRunResult } from '../../../shared/types/consolidation.types.js';
import { MemoryEmbeddingService } from '../../memory/services/memory-embedding-service.js';
import { ConsolidationRepository } from '../repositories/consolidation-repository.js';
import { ClusteringService } from './clustering-service.js';
import { SummarizationService } from './summarization-service.js';
import type { TelemetryService } from '../../telemetry/services/telemetry-service.js';
export interface SleepConsolidationRunOptions {
    dryRun?: boolean;
    ownerIdFilter?: string | null;
    lookbackDays?: number;
}
export declare class ConsolidationAlreadyRunningError extends Error {
    constructor();
}
/** 부트스트랩에서 `createRelationGraph(db)` 등으로 주입 (domains → infrastructure 직접 의존 금지) */
export interface SleepConsolidationServiceDeps {
    relationGraph: IRelationGraph;
    /** remember/검색과 동일 인스턴스를 넘기면 쿼리·저장 임베딩 정책이 일치한다. 미지정 시 내부에서 새로 생성. */
    memoryEmbeddingService?: MemoryEmbeddingService;
    consolidationRepository?: ConsolidationRepository;
    clusteringService?: ClusteringService;
    summarizationService?: SummarizationService;
    /** 006: consolidation.performed 텔레메트리 */
    telemetryService?: TelemetryService;
}
export declare class SleepConsolidationService {
    private readonly db;
    /** 프로세스당 단일 인스턴스(bootstrap) 기준 동시 실행 방지 — static이면 테스트 간 상태가 오염된다 */
    private activeRun;
    private readonly repo;
    private readonly clustering;
    private readonly summarization;
    private readonly relationGraph;
    private readonly memoryEmbedding;
    private readonly telemetryService?;
    constructor(db: Database.Database, deps: SleepConsolidationServiceDeps);
    /**
     * 동시 실행 방지 (배치 + admin 공용)
     */
    isRunning(): boolean;
    run(options?: SleepConsolidationRunOptions): Promise<SleepConsolidationRunResult>;
}
//# sourceMappingURL=sleep-consolidation-service.d.ts.map