/**
 * Multi-provider VEC search: per-provider tasks, overall timeout, Promise.allSettled aggregation, diagnostics.
 * Extracted from HybridSearchEngine (Issues #315, #349).
 */
import type { EmbeddingProvider, MemoryType } from '../../../shared/types/index.js';
import type { VectorSearchResult } from '../../memory/services/memory-embedding-service.js';
export type VectorResultWithProvider = VectorSearchResult & {
    provider: string;
};
/** Single provider race outcome (matches Promise shape from createProviderSearchTask). */
export type ProviderVectorRaceResult = {
    provider: string;
    results: VectorResultWithProvider[];
    success: boolean;
    timeMs: number;
    error: string | null;
    queryEmbeddingProvider?: EmbeddingProvider;
    tfidfQueryEmbeddingFallback?: boolean;
};
export type ProviderSearchExecutionSummary = {
    allResults: VectorResultWithProvider[];
    providerStats: Array<{
        provider: string;
        resultCount: number;
        success: boolean;
        timeMs: number;
        error?: string;
    }>;
    overallTimeoutOccurred: boolean;
    queryEmbeddingProviders?: EmbeddingProvider[];
    tfidfQueryEmbeddingFallback: boolean;
    tfidfQueryEmbeddingFallbackProviders?: EmbeddingProvider[];
};
export type SearchStepLogger = (searchId: string, step: string, data: unknown) => void;
export type ProviderVectorSearchOptions = {
    limit: number;
    threshold: number;
    types?: MemoryType[];
    includeContent: boolean;
};
type VectorSearchRow = {
    memory_id: string;
    content: string;
    type: string;
    importance: number;
    created_at: string;
    similarity: number;
};
/** Injected from HybridSearchEngine so this module stays free of SearchError / engine imports. */
export type ProviderVectorSearchDeps = {
    generateQueryVector: (query: string, searchId: string, preferredProvider: EmbeddingProvider) => Promise<{
        embedding: number[];
        actualProvider: EmbeddingProvider;
    }>;
    vectorSearch: (vector: number[], options: ProviderVectorSearchOptions, provider?: string) => Promise<VectorSearchRow[]>;
    logSearchStep: SearchStepLogger;
};
export declare function runSingleProviderVectorSearch(deps: ProviderVectorSearchDeps, provider: EmbeddingProvider, query: string, searchOptions: ProviderVectorSearchOptions, searchId: string, providerStartTime: bigint, timeoutMeta: {
    queryEmbeddingProvider?: EmbeddingProvider;
    tfidfQueryEmbeddingFallback?: boolean;
}): Promise<ProviderVectorRaceResult>;
export declare function createProviderVectorSearchTask(deps: ProviderVectorSearchDeps, provider: EmbeddingProvider, query: string, searchOptions: ProviderVectorSearchOptions, searchId: string): Promise<ProviderVectorRaceResult>;
export declare function executeProviderSearchesWithOverallTimeout(searchPromises: Promise<ProviderVectorRaceResult>[], providersToSearch: EmbeddingProvider[], searchId: string, logSearchStep: SearchStepLogger): Promise<ProviderSearchExecutionSummary>;
export {};
//# sourceMappingURL=hybrid-search-provider-parallel.d.ts.map