import type { AIProfileDefinition, AIProfileTag, ProfileTagMatchMode } from "./types.js"; export type { ProfileTagMatchMode }; export interface ProfileTagScore { profileKey: string; profile: AIProfileDefinition; score: number; matchedTags: AIProfileTag[]; coverageRatio: number; } export interface TagScoreResult { score: number; matchedTags: AIProfileTag[]; /** Matched weight / total requested weight (0–1). */ coverageRatio: number; } /** * Weighted overlap of requested tags against a candidate tag list. * Weights: domain/task 3, capability 2, tier/vendor 1, `wf` 0.25. */ export declare function scoreTagOverlap(candidateTags: readonly AIProfileTag[] | undefined, tags: readonly AIProfileTag[]): TagScoreResult; /** * Weighted score of requested tags present on the profile. */ export declare function scoreProfileTags(profile: AIProfileDefinition, tags: AIProfileTag[]): TagScoreResult; declare function compareTagScores(a: { score: number; coverageRatio: number; tagCount: number; key: string; }, b: { score: number; coverageRatio: number; tagCount: number; key: string; }): number; /** * Rank profiles by weighted tag score (highest first). * Tie-break: coverage ratio → fewer total tags → profile key lex. */ export declare function rankProfilesByTags(profiles: Record, tags: AIProfileTag[]): ProfileTagScore[]; /** * Best profile for a tag set, or undefined when no tag matches. */ export declare function pickBestProfileByTags(profiles: Record, tags: AIProfileTag[]): ProfileTagScore | undefined; /** * Returns true when the profile matches all requested tags (mode `all`) * or at least one (mode `any`, default). */ export declare function profileMatchesTags(profile: AIProfileDefinition, tags: AIProfileTag[], mode?: ProfileTagMatchMode): boolean; /** * Free-text discovery across profile metadata, tags, and choice labels. */ export declare function profileMatchesSearch(profile: AIProfileDefinition, search: string): boolean; /** True for vendor-family / catalog discovery profiles. */ export declare function isDiscoveryProfile(profile: AIProfileDefinition): boolean; /** * Whether a profile belongs in the default tag list/resolve pool. * Discovery/vendor profiles are excluded unless `includeDiscovery` or tags include `vnd`. */ export declare function profileIncludedInTagPool(profile: AIProfileDefinition, options?: { includeDiscovery?: boolean; tags?: readonly AIProfileTag[]; }): boolean; export declare function profileMatchesDiscovery(profile: AIProfileDefinition, options: { tags?: AIProfileTag[]; tagMatch?: ProfileTagMatchMode; search?: string; includeDiscovery?: boolean; }): boolean; /** Collect every tag used across profiles (sorted). */ export declare function collectProfileTags(profiles: Record): AIProfileTag[]; /** Stable signature for a profile tag set (sorted, comma-joined). */ export declare function profileTagSetSignature(tags: AIProfileTag[]): string; export { compareTagScores }; //# sourceMappingURL=profileDiscovery.d.ts.map