import type { MemoryStore } from '../types.js'; import { type ExtractionConfig, type ExtractionTrigger, type Extractor, type MemoryMessageFilter } from './types.js'; /** * Default cadence when an {@link ExtractionConfig} omits its `trigger`: extract every N turns. * @internal */ export declare const DEFAULT_EXTRACTION_TRIGGER_TURNS = 5; /** * An {@link ExtractionConfig} with every field resolved to a concrete value, ready to drive * extraction. Produced by {@link resolveExtractionConfig} so the {@link MemoryManager} and * {@link ExtractionCoordinator} never have to re-apply defaults or normalize shapes. * @internal */ export interface ResolvedExtractionConfig { /** Normalized to an array (a single trigger is wrapped). Never empty for a resolved config. */ triggers: ExtractionTrigger[]; /** * The extractor that distills facts client-side and stores them via the store's `add` method, or * `undefined` to use the store's `addMessages` method (server-side extraction). */ extractor?: Extractor; /** The content-block filter applied before extraction. */ filter: MemoryMessageFilter; } /** * Resolves a store's `extraction` setting into a {@link ResolvedExtractionConfig}, applying defaults. * * The single place the `boolean | ExtractionConfig` shorthand is interpreted: `false`/omitted is off * (returns `undefined`), `true` enables all defaults, an {@link ExtractionConfig} defaults its unset * fields. The defaults are: * - **trigger**: every {@link DEFAULT_EXTRACTION_TRIGGER_TURNS} turns. An explicit empty array is left * empty for the {@link MemoryManager} to reject. * - **extractor**: chosen from the methods the store implements. A store that implements `addMessages` * supports server-side extraction, so it defaults to no extractor: the manager hands raw messages to * `addMessages` and the backend extracts them itself, with no model call. A store that implements only * `add` cannot extract server-side, so it defaults to a {@link ModelExtractor} that distills facts * client-side (via model calls) and stores each one through `add`. * - **filter**: {@link DEFAULT_MEMORY_MESSAGE_FILTER}. * * @param extraction - The store's `extraction` setting * @param store - The store, inspected for the write methods it implements to pick the default extractor * @returns The resolved config, or `undefined` when extraction is disabled * @internal */ export declare function resolveExtractionConfig(extraction: boolean | ExtractionConfig | undefined, store: Pick): ResolvedExtractionConfig | undefined; //# sourceMappingURL=resolve-extraction-config.d.ts.map