export type MemoryExportOrder = "recency" | "importance";
export interface MemoryExportOptions {
    /** Absolute or relative path where MEMORY.md is written. Required. */
    path: string;
    /** Hard line cap. 0 or negative disables truncation. */
    limit_lines?: number;
    /** Only include these entity_types. Empty/undefined = all (minus exclusions). */
    include_types?: string[];
    /** Always exclude these entity_types. Applied after include_types. */
    exclude_types?: string[];
    /**
     * When false (default), `conversation` and `agent_message` are filtered out
     * because they are chat bookkeeping that already lives in conversation
     * history. Set to true to include them.
     */
    include_bookkeeping?: boolean;
    /** Ordering strategy. Defaults to `importance`. */
    order?: MemoryExportOrder;
    /**
     * Optional per-field character cap. Applied by the compact renderer so
     * long-body entities (posts, notes, transcripts) do not dominate the line
     * budget. Default: 400. Pass 0 to disable.
     */
    max_field_chars?: number;
    /** Optional user scope. */
    user_id?: string;
}
export interface MemoryExportResult {
    path: string;
    total_entities: number;
    entities_written: number;
    line_count: number;
    truncated: boolean;
    order: MemoryExportOrder;
    bytes: number;
    excluded_types: string[];
}
/**
 * Chat bookkeeping entity types that exist to make conversation history
 * replayable. Excluded from MEMORY.md by default. Keep aligned with the
 * "chat bookkeeping" definition in the Neotoma display rule.
 */
export declare const BOOKKEEPING_ENTITY_TYPES: ReadonlySet<string>;
/**
 * Importance score. Exported for tests so we can assert ordering by real
 * inputs rather than reaching into the sort closure.
 */
export declare function importanceScore(row: Record<string, unknown>, nowMs?: number): number;
/** Sort in a stable way so output is byte-for-byte reproducible. Exported for tests. */
export declare function sortEntities(rows: Array<Record<string, unknown>>, order: MemoryExportOrder, nowMs?: number): Array<Record<string, unknown>>;
/**
 * Render and write MEMORY.md. Pure function over DB contents; the only side
 * effect is `fs.writeFile` on the resolved output path.
 */
export declare function exportMemory(options: MemoryExportOptions): Promise<MemoryExportResult>;
//# sourceMappingURL=memory_export.d.ts.map