import type { QMemoryCategory } from "../memory/categories.js";
/** A memory file with its inferred category and metadata. */
export interface CategorizedMemoryFile {
    filename: string;
    category: QMemoryCategory | "uncategorized";
    /** First line description. */
    description: string;
    /** File size bytes. */
    sizeBytes: number;
    /** Count of entries/bullets in the file. */
    entryCount: number;
}
/** Category statistics for the dream prompt. */
export interface CategoryManifest {
    /** Per-category file groups. */
    categories: Record<string, CategorizedMemoryFile[]>;
    /** Total files scanned. */
    totalFiles: number;
    /** Files that couldn't be classified. */
    uncategorizedCount: number;
}
/**
 * Scan MEMDIR and classify all topic files by category.
 *
 * @param memoryRoot - The MEMDIR root directory
 * @returns Category manifest with grouped files
 */
export declare function scanCategoryManifest(memoryRoot: string): Promise<CategoryManifest>;
/**
 * Category-specific merge/conflict rules for the dream prompt.
 *
 * These rules tell the dream agent how to handle each category:
 * - facts: supersede (newer replaces older when same topic)
 * - lessons: accumulate (append new insights, don't delete old)
 * - preferences: overwrite (latest preference wins)
 * - patterns: merge (consolidate duplicates into one authoritative entry)
 * - decisions: update (add "update" section if decision changed)
 */
export declare const CATEGORY_MERGE_RULES: Record<QMemoryCategory | "uncategorized", string>;
/**
 * Format the category manifest and merge rules as an injection block
 * for the dream consolidation prompt.
 *
 * This replaces the blind "grep transcripts" approach with structured
 * guidance about what exists and how to handle each category.
 */
export declare function formatCategoryContextBlock(manifest: CategoryManifest): string;
