import type { MemoryBlockScope } from '../blocks/types.js'; import type { AnyExtractor, Extractor, ExtractorRuntimeContext, ResolvedExtractor } from './types.js'; /** Slugs reserved by other memory subsystems — an extractor may not claim one. */ /** Slugs longer than this are rejected — a live risk as a persistence key (file path / DB index). */ export declare const MAX_SLUG_LENGTH = 64; /** Throws when `slug` is not lowercase alphanumerics/hyphens starting with a letter and ending alphanumeric. */ export declare function assertValidSlug(slug: string, sourceName: string): void; /** Throws when `slug` matches a reserved key claimed by another memory subsystem. */ /** * Derives an extractor slug from its display name: NFKD-normalised (so accents and * fullwidth forms fold to their plain-ASCII base — 'Café' -> 'cafe', '2' -> '2' — * rather than being silently dropped), lowercased, non-alphanumerics collapsed to * `-`, trimmed. */ export declare function slugifyExtractorName(name: string): string; /** Rejects duplicate slugs, naming both extractors that collided. */ export declare function validateExtractorList(extractors: readonly AnyExtractor[]): AnyExtractor[]; export interface DefineExtractorConfig { name: string; instructions: Extractor['instructions']; schema: Extractor['schema']; scope?: MemoryBlockScope; includePrevious?: boolean; persist?: boolean; onExtracted?: Extractor['onExtracted']; } export declare function defineExtractor(config: DefineExtractorConfig): Extractor; /** Resolves function-form `instructions`/`schema` against a runtime context into concrete values. */ export declare function resolveExtractor(extractor: Extractor, ctx: ExtractorRuntimeContext): Promise>;