import type { DaoCoreConfig } from "../config/types.daocore.js";
import type { SecretInput } from "../config/types.secrets.js";
export type EmbeddingInput = string | {
    text: string;
    parts?: Array<{
        type: "text";
        text: string;
    } | {
        type: "inline-data";
        mimeType: string;
        data: string;
    }>;
};
export type EmbeddingProviderCallOptions = {
    signal?: AbortSignal;
    inputType?: "query" | "document" | "semantic" | "classification" | "clustering";
};
export type EmbeddingProviderRuntime = {
    id: string;
    cacheKeyData?: Record<string, unknown>;
    inlineQueryTimeoutMs?: number;
    inlineBatchTimeoutMs?: number;
};
export type EmbeddingProvider = {
    id: string;
    model: string;
    dimensions?: number;
    maxInputTokens?: number;
    embed: (input: EmbeddingInput, options?: EmbeddingProviderCallOptions) => Promise<number[]>;
    embedBatch: (inputs: EmbeddingInput[], options?: EmbeddingProviderCallOptions) => Promise<number[][]>;
    close?: () => Promise<void> | void;
};
export type EmbeddingProviderCreateOptions = {
    config: DaoCoreConfig;
    agentDir?: string;
    provider?: string;
    remote?: {
        baseUrl?: string;
        apiKey?: SecretInput;
        headers?: Record<string, string>;
    };
    model: string;
    local?: {
        modelPath?: string;
        modelCacheDir?: string;
    };
    dimensions?: number;
    taskType?: string;
};
export type EmbeddingProviderCreateResult = {
    provider: EmbeddingProvider | null;
    runtime?: EmbeddingProviderRuntime;
};
export type EmbeddingProviderAdapter = {
    id: string;
    defaultModel?: string;
    transport?: "local" | "remote";
    authProviderId?: string;
    create: (options: EmbeddingProviderCreateOptions) => Promise<EmbeddingProviderCreateResult>;
    formatSetupError?: (err: unknown) => string;
};
export type RegisteredEmbeddingProvider = {
    adapter: EmbeddingProviderAdapter;
    ownerPluginId?: string;
};
export declare function registerEmbeddingProvider(adapter: EmbeddingProviderAdapter, options?: {
    ownerPluginId?: string;
}): void;
export declare function getRegisteredEmbeddingProvider(id: string): RegisteredEmbeddingProvider | undefined;
export declare function getEmbeddingProvider(id: string): EmbeddingProviderAdapter | undefined;
export declare function listRegisteredEmbeddingProviders(): RegisteredEmbeddingProvider[];
export declare function listEmbeddingProviders(): EmbeddingProviderAdapter[];
export declare function restoreEmbeddingProviders(adapters: EmbeddingProviderAdapter[]): void;
export declare function restoreRegisteredEmbeddingProviders(entries: RegisteredEmbeddingProvider[]): void;
export declare function clearEmbeddingProviders(): void;
export declare const resetEmbeddingProviders: typeof clearEmbeddingProviders;
