import type { LLMProvider } from '../../provider-contract/types.js';
import type { MemoryStore } from '../store/index.js';
import type { MemoryEntry } from '../entry/index.js';
import type { MemoryPipeline } from './types.js';
import { type FactPipelineState, type FactExtractor } from '../facts/index.js';
import { type NarrativeBeat, type BeatExtractor, type ExtractBeatsState } from '../beats/index.js';
export interface AutoPipelineConfig {
    /** The store both extractors share. */
    readonly store: MemoryStore;
    /**
     * When present, upgrades both fact AND beat extraction to LLM-backed
     * variants. Typically a cheap/fast model like Claude Haiku. Omit to
     * use the free heuristic + regex defaults.
     */
    readonly provider?: LLMProvider;
    /**
     * Override the fact extractor explicitly. Takes precedence over
     * `provider`. Use when you want facts via LLM but beats via heuristic,
     * or vice-versa.
     */
    readonly factExtractor?: FactExtractor;
    /**
     * Override the beat extractor explicitly. Takes precedence over
     * `provider`.
     */
    readonly beatExtractor?: BeatExtractor;
    /**
     * Upper bound on the `store.list` page size during read. Large enough
     * to fit typical identity+history; raise for long-lived agents with
     * dozens of fact categories and hundreds of beats. Default `200`.
     */
    readonly loadLimit?: number;
    /** Tier filter for read. */
    readonly tiers?: ReadonlyArray<'hot' | 'warm' | 'cold'>;
    /** Tier to tag newly written entries (both facts and beats). */
    readonly writeTier?: 'hot' | 'warm' | 'cold';
    /** TTL in ms applied to newly written entries. */
    readonly writeTtlMs?: number;
    /** Header for the facts block in the injected system message. */
    readonly factsHeader?: string;
    /** Lead-in phrase for the narrative paragraph. Default `"From earlier: "`. */
    readonly narrativeLeadIn?: string;
    /**
     * When `true`, appends `(conf 0.xx)` after each fact. Off by default
     * — confidence is noise for the LLM in typical flows.
     */
    readonly showConfidence?: boolean;
    /**
     * When `true`, appends `(refs: msg-x-y, ...)` after each beat line.
     * Off by default.
     */
    readonly showRefs?: boolean;
}
/** State used by the auto pipeline's subflows. */
export interface AutoPipelineState extends FactPipelineState, ExtractBeatsState {
    /** Beats loaded from the store during auto-READ. */
    loadedBeats?: readonly MemoryEntry<NarrativeBeat>[];
}
export declare function autoPipeline(config: AutoPipelineConfig): MemoryPipeline;
