export declare function normalizeKeywordMatchText(value: string): string; export declare function splitKeywordDoc(value: string | undefined): string[]; export declare function textIncludesKeywordTerm(text: string, term: string): boolean; /** * A keyword term with its per-term work (normalization, word-boundary pattern) * done once. `term` is the raw string exactly as supplied, because match sets * are keyed by the raw term. Prepared terms hold catalog vocabulary only — * never conversation text — so callers may retain them across turns. */ export interface PreparedKeywordTerm { term: string; matches: (normalizedText: string) => boolean; } /** * Prepare a term list for repeated matching. Duplicate raw terms collapse to * one entry; a match set keyed by raw term cannot gain a member from a repeat, * so {@link collectPreparedKeywordTermMatches} returns the same set, in the * same text-first insertion order, as {@link collectKeywordTermMatches} over * the unprepared list. Action retrieval memoizes the result per catalog parent * (~16K terms per turn otherwise recompiled on every call). */ export declare function prepareKeywordTerms(terms: readonly string[]): PreparedKeywordTerm[]; /** * {@link collectKeywordTermMatches} over already-prepared terms: each text is * normalized once, each term's pattern was compiled once, and a term already * matched by an earlier text is not re-tested against later texts. */ export declare function collectPreparedKeywordTermMatches(texts: readonly string[], prepared: readonly PreparedKeywordTerm[]): Set; export declare function collectKeywordTermMatches(texts: readonly string[], terms: readonly string[]): Set; export declare function findKeywordTermMatch(text: string, terms: readonly string[]): string | undefined; export declare function getCatalogValidationKeywordTerms(key: string, options?: { includeAllLocales?: boolean; locale?: string; }): string[]; export declare function hasPreparedKeywordTermMatch(texts: readonly string[], prepared: readonly PreparedKeywordTerm[]): boolean; export declare function getValidationKeywordTerms(key: string, options?: { includeAllLocales?: boolean; locale?: unknown; }): string[];