import type { Api, AssistantMessageEventStream, Context, Model, SimpleStreamOptions, StreamFunction, StreamOptions } from "./types.js";
export type ApiStreamFunction = (model: Model<Api>, context: Context, options?: StreamOptions) => AssistantMessageEventStream;
export type ApiStreamSimpleFunction = (model: Model<Api>, context: Context, options?: SimpleStreamOptions) => AssistantMessageEventStream;
export interface ApiProvider<TApi extends Api = Api, TOptions extends StreamOptions = StreamOptions> {
    api: TApi;
    stream: StreamFunction<TApi, TOptions>;
    streamSimple: StreamFunction<TApi, SimpleStreamOptions>;
}
export interface ApiProviderMetadata {
    sourceId?: string;
    version?: string;
    enabled: boolean;
    registeredAt: number;
    updatedAt: number;
}
export interface RegisteredApiProvider {
    provider: ApiProviderInternal;
    metadata: ApiProviderMetadata;
}
export interface ApiProviderInternal {
    api: Api;
    stream: ApiStreamFunction;
    streamSimple: ApiStreamSimpleFunction;
}
export interface RegisterApiProviderOptions {
    sourceId?: string;
    version?: string;
    enabled?: boolean;
}
export declare class ProviderRegistry {
    private readonly registry;
    register<TApi extends Api, TOptions extends StreamOptions>(provider: ApiProvider<TApi, TOptions>, options?: RegisterApiProviderOptions): void;
    get(api: Api): ApiProviderInternal | undefined;
    getWithMetadata(api: Api): RegisteredApiProvider | undefined;
    list(includeDisabled?: boolean): ApiProviderInternal[];
    enable(api: Api): boolean;
    disable(api: Api): boolean;
    unregisterBySource(sourceId: string): void;
    clear(): void;
}
export declare const providerRegistry: ProviderRegistry;
export declare function registerApiProvider<TApi extends Api, TOptions extends StreamOptions>(provider: ApiProvider<TApi, TOptions>, sourceIdOrOptions?: string | RegisterApiProviderOptions): void;
export declare function getApiProvider(api: Api): ApiProviderInternal | undefined;
export declare function getApiProviderWithMetadata(api: Api): RegisteredApiProvider | undefined;
export declare function getApiProviders(includeDisabled?: boolean): ApiProviderInternal[];
export declare function enableApiProvider(api: Api): boolean;
export declare function disableApiProvider(api: Api): boolean;
export declare function unregisterApiProviders(sourceId: string): void;
export declare function clearApiProviders(): void;
