import type { CommunityConsentClient, CommunityRegistryMatchResult } from "./community-consent-client.js";
import { CommunityDiscoveryCache, type CommunityDiscoveryCacheEntry } from "./community-discovery-cache.js";
export interface LocalCommunityResourceIndex {
    findInstalled(intentKey: string): CommunityRegistryMatchResult | undefined;
}
export type CommunityDiscoveryStatus = "matched" | "local" | "cached" | "miss" | "disabled" | "unavailable";
export interface CommunityDiscoveryResult {
    status: CommunityDiscoveryStatus;
    intentKey: string;
    match?: CommunityRegistryMatchResult;
    cacheEntry?: CommunityDiscoveryCacheEntry;
    error?: string;
}
export interface CommunityDiscoveryCoordinatorOptions {
    client: Pick<CommunityConsentClient, "getConsent" | "matchRegistry"> | null;
    cache?: CommunityDiscoveryCache;
    localIndex?: LocalCommunityResourceIndex;
    topK?: number;
    now?: () => Date;
}
export declare class CommunityDiscoveryCoordinator {
    private readonly client;
    private readonly cache;
    private readonly localIndex?;
    private readonly topK;
    private readonly now;
    private readonly inMemory;
    constructor(options: CommunityDiscoveryCoordinatorOptions);
    matchForTurn(intent: string): Promise<CommunityDiscoveryResult>;
    prefetchIdle(intents: string[]): Promise<CommunityDiscoveryResult[]>;
    private memo;
}
export declare function normalizeDiscoveryIntent(intent: string): string;
