/** * Knowledge Aggregator — Stage 2 of FR-A05 two-stage pipeline. * * Reads unconsumed staging materials, performs LLM-based semantic clustering * and abstraction, then writes aggregated knowledge through the quality gate * into the entries table. * * This module provides a standalone entry point for Stage 2 that can be * triggered independently of Stage 1 extraction (e.g., via CLI or cron). */ export interface AggregatorOptions { /** Skip quality gate checks on produced entries */ skipQualityGate?: boolean; /** Maximum materials to process in one run (env: KIVO_AGGREGATOR_MAX_MATERIALS) */ maxMaterials?: number; /** Working directory for resolving DB path */ cwd?: string; /** Dry run — don't write to DB */ dryRun?: boolean; } export interface AggregatorResult { /** Number of pending staging materials found */ pendingMaterials: number; /** Number of aggregated knowledge entries produced */ knowledgeProduced: number; /** Number of entries that passed quality gate and were written */ knowledgeWritten: number; /** Number of staging materials marked as consumed */ materialsConsumed: number; /** Errors encountered */ errors: string[]; } /** * Run Stage 2 knowledge aggregation independently. * * 1. Reads all pending staging materials from DB * 2. Sends them to LLM for semantic clustering + abstraction * 3. Validates produced knowledge through quality gate * 4. Writes passing entries to the knowledge base * 5. Marks consumed staging materials */ export declare function runKnowledgeAggregation(options?: AggregatorOptions): Promise; /** * Format aggregation result for CLI output. */ export declare function formatAggregatorResult(result: AggregatorResult, dryRun: boolean): string; //# sourceMappingURL=knowledge-aggregator.d.ts.map