/**
 * Embedding Provider — True semantic search via neural embeddings.
 *
 * Provider fallback order:
 * 1. Local: @huggingface/transformers + Xenova/all-MiniLM-L6-v2 (384-dim, 23MB INT8, zero API keys)
 * 2. Google: text-embedding-004 (768-dim, free API, needs GEMINI_API_KEY)
 * 3. OpenAI: text-embedding-3-small (1536-dim, $0.02/1M tokens, needs OPENAI_API_KEY)
 *
 * Graceful degradation: if no provider is available, all exports return null/false
 * and search works exactly as before.
 */
export interface EmbeddingProvider {
    name: string;
    dimensions: number;
    embed(texts: string[]): Promise<Float32Array[]>;
}
/** Node type in the bipartite graph: tool nodes vs domain (agent) nodes */
export type GraphNodeType = "tool" | "domain";
interface EmbeddingIndexEntry {
    name: string;
    vector: Float32Array;
    /** Node type for Agent-as-a-Graph bipartite scoring */
    nodeType: GraphNodeType;
}
/**
 * Returns the best available embedding provider, or null if none is available.
 * Tries: local HuggingFace → Google → OpenAI (in that order).
 */
export declare function getEmbeddingProvider(): Promise<EmbeddingProvider | null>;
/**
 * Pre-embed all tools at startup. Reads from cache if valid, otherwise embeds fresh.
 * Call this once after tool assembly with a corpus of { name, text, nodeType? } entries.
 * nodeType defaults to "tool" for backwards compatibility.
 */
export declare function initEmbeddingIndex(corpus: Array<{
    name: string;
    text: string;
    nodeType?: GraphNodeType;
}>): Promise<void>;
/**
 * Embed a single query string. Returns null if no provider is available.
 */
export declare function embedQuery(text: string): Promise<Float32Array | null>;
/**
 * Brute-force cosine KNN over the pre-computed embedding index.
 * Returns ranked results with similarity scores and node types.
 */
export declare function embeddingSearch(queryVec: Float32Array, limit?: number): Array<{
    name: string;
    similarity: number;
    nodeType: GraphNodeType;
}>;
/**
 * Returns true when the embedding index is loaded and ready for search.
 */
export declare function isEmbeddingReady(): boolean;
/**
 * Returns the name of the active embedding provider, or null.
 */
export declare function getProviderName(): string | null;
/** Reset all state — for testing only. */
export declare function _resetForTesting(): void;
/** Inject a mock provider — for testing only. */
export declare function _setProviderForTesting(provider: EmbeddingProvider | null): void;
/** Inject a pre-built index — for testing only. */
export declare function _setIndexForTesting(index: EmbeddingIndexEntry[]): void;
export {};
