import { type LlmsProviders } from "@clinebot/llms";
import type { RpcAddProviderActionRequest, RpcOAuthProviderId, RpcProviderListItem, RpcProviderModel, RpcSaveProviderSettingsActionRequest } from "@clinebot/shared";
import type { ProviderSettingsManager } from "../storage/provider-settings-manager";
export declare function ensureCustomProvidersLoaded(manager: ProviderSettingsManager): Promise<void>;
export declare function addLocalProvider(manager: ProviderSettingsManager, request: RpcAddProviderActionRequest): Promise<{
    providerId: string;
    settingsPath: string;
    modelsPath: string;
    modelsCount: number;
}>;
export declare function listLocalProviders(manager: ProviderSettingsManager): Promise<{
    providers: RpcProviderListItem[];
    settingsPath: string;
}>;
export declare function getLocalProviderModels(providerId: string): Promise<{
    providerId: string;
    models: RpcProviderModel[];
}>;
export declare function saveLocalProviderSettings(manager: ProviderSettingsManager, request: RpcSaveProviderSettingsActionRequest): {
    providerId: string;
    enabled: boolean;
    settingsPath: string;
};
export declare function normalizeOAuthProvider(provider: string): RpcOAuthProviderId;
export declare function loginLocalProvider(providerId: RpcOAuthProviderId, existing: LlmsProviders.ProviderSettings | undefined, openUrl: (url: string) => void): Promise<{
    access: string;
    refresh: string;
    expires: number;
    accountId?: string;
}>;
export declare function saveLocalProviderOAuthCredentials(manager: ProviderSettingsManager, providerId: RpcOAuthProviderId, existing: LlmsProviders.ProviderSettings | undefined, credentials: {
    access: string;
    refresh: string;
    expires: number;
    accountId?: string;
}): LlmsProviders.ProviderSettings;
export declare function resolveLocalClineAuthToken(settings: LlmsProviders.ProviderSettings | undefined): string | undefined;
