import type { AssetCatalogEntry, DemandProfile, SelectionRegistry } from "../../types.js"; interface RelevanceFilterResult { selectedEntries: AssetCatalogEntry[]; rejectedEntries: AssetCatalogEntry[]; } interface DemandRelevanceTerms { exactHighSignalTerms: Set; highSignalPhrases: string[][]; lowSignalTerms: Set; demandKeywords: Set; stackAnchorTerms: Set; primaryStackAnchorTerms: Set; } interface CatalogTermData { documentFrequency: Map; entryTermsByEntry: Map>; } /** * Filters catalog entries to assets that overlap with workspace demand signals. */ export declare function filterCatalogEntriesByDemandRelevance(catalogEntries: AssetCatalogEntry[], demandProfile: DemandProfile | null): RelevanceFilterResult; /** * Partitions catalog entries by demand relevance. * * Separated from `filterCatalogEntriesByDemandRelevance` so the guarded * term-index lookup (#433) can be exercised directly: callers must pass a * term index consistent with `catalogEntries`; a mismatched index throws * with a descriptive error instead of producing `undefined` terms. */ declare function selectRelevantEntries(catalogEntries: AssetCatalogEntry[], catalogTermData: CatalogTermData, demandTerms: DemandRelevanceTerms): RelevanceFilterResult; /** * Groups catalog entries for selection in the lifecycle pipeline. */ export declare function groupCatalogEntriesForSelection(catalogEntries: AssetCatalogEntry[]): Map; /** * Compares selection candidate values for stable ordering. */ export declare function compareSelectionCandidates(left: AssetCatalogEntry, right: AssetCatalogEntry, selectionRegistry: SelectionRegistry): number; /** * Builds selection reason from the provided inputs. */ export declare function buildSelectionReason(selectedEntry: AssetCatalogEntry, selectionRegistry: SelectionRegistry): string; declare function buildDemandTermSet(demandProfile: DemandProfile | null, catalogTermDocumentFrequency: Map, catalogEntryCount: number): DemandRelevanceTerms; declare function addDemandSignal(value: string, exactHighSignalTerms: Set, highSignalPhrases: string[][], lowSignalTerms: Set, demandKeywords: Set, catalogTermDocumentFrequency: Map, catalogEntryCount: number, stackAnchorTerms?: Set, primaryStackAnchorTerms?: Set): void; declare function classifyDemandKeyword(keyword: string, catalogTermDocumentFrequency: Map, catalogEntryCount: number): "exact" | "low"; declare function normalizeDemandSignalKeywords(value: string): string[]; declare function matchesTermGroupSet(terms: Set, termGroups: string[][]): boolean; declare function isCatalogCommonHighSignal(keyword: string, catalogTermDocumentFrequency: Map, catalogEntryCount: number): boolean; declare function buildCatalogTermData(catalogEntries: AssetCatalogEntry[]): CatalogTermData; /** * Exposes focused catalog-selection helpers for deterministic coverage. */ export declare const catalogSelectionInternals: { addDemandSignal: typeof addDemandSignal; buildCatalogTermData: typeof buildCatalogTermData; buildDemandTermSet: typeof buildDemandTermSet; classifyDemandKeyword: typeof classifyDemandKeyword; isCatalogCommonHighSignal: typeof isCatalogCommonHighSignal; matchesTermGroupSet: typeof matchesTermGroupSet; normalizeDemandSignalKeywords: typeof normalizeDemandSignalKeywords; selectRelevantEntries: typeof selectRelevantEntries; }; /** * Builds a rejectionSummary map from a flat rejection log. * Exported for unit testing and reuse. * * @param log - Array of {assetId, reason} entries (one per rejected asset). * @returns A Record mapping each stable reason string to its count. */ export declare function buildRejectionSummary(log: ReadonlyArray<{ assetId: string; reason: string; }>): Record; export {};