export declare const PROVIDER_RUNTIME_AUTH_MODE_VALUES: readonly ["api-key", "oauth", "token", "aws-sdk"];
export type ProviderRuntimeAuthMode = (typeof PROVIDER_RUNTIME_AUTH_MODE_VALUES)[number];
export declare const PROVIDER_RUNTIME_VAULT_ERROR_TYPE_VALUES: readonly ["rate_limit", "auth", "server_error", "timeout", "network", "unknown"];
export type ProviderRuntimeVaultErrorType = (typeof PROVIDER_RUNTIME_VAULT_ERROR_TYPE_VALUES)[number];
export declare const PROVIDER_RUNTIME_COMPAT_FLAG_VALUES: readonly ["requiresOpenAiAnthropicToolPayload"];
export type ProviderRuntimeCompatFlag = (typeof PROVIDER_RUNTIME_COMPAT_FLAG_VALUES)[number];
export type ProviderRuntimeResolvedAuthContract = {
    apiKey?: string;
    profileId?: string;
    source: string;
    mode: ProviderRuntimeAuthMode;
    vaultRelease?: () => void;
    vaultReportSuccess?: () => void;
    vaultReportError?: (errorType?: ProviderRuntimeVaultErrorType) => void;
};
export type ProviderRuntimeProfileRecordContract = {
    provider?: string;
    type?: string;
    [key: string]: unknown;
};
export type ProviderRuntimeProfileStoreContract = {
    profiles: Record<string, ProviderRuntimeProfileRecordContract>;
};
export type ProviderRuntimeCompatModelContract = {
    api?: unknown;
    provider?: unknown;
    compat?: unknown;
};
export interface ProviderRuntimeAdapterContract<TAuthStorage = unknown, TModelRegistry = unknown, TConfig = unknown, TModel = unknown, TAuthStore extends ProviderRuntimeProfileStoreContract = ProviderRuntimeProfileStoreContract> {
    discoverAuthStorage(agentDir: string): TAuthStorage;
    createModelRegistry(authStorage: TAuthStorage): TModelRegistry;
    ensureAuthProfileStore(agentDir: string, options?: {
        allowKeychainPrompt?: boolean;
    }): TAuthStore;
    resolveAuthProfileOrder(params: {
        cfg?: TConfig;
        store: TAuthStore;
        provider: string;
        preferredProfile?: string;
    }): string[];
    getApiKeyForModel(params: {
        model: TModel;
        cfg?: TConfig;
        profileId?: string;
        store?: TAuthStore;
        agentDir: string;
    }): Promise<ProviderRuntimeResolvedAuthContract>;
    resolveApiKeyForProvider(params: {
        provider: string;
        cfg?: TConfig;
        profileId?: string;
        preferredProfile?: string;
        store?: TAuthStore;
        agentDir?: string;
    }): Promise<ProviderRuntimeResolvedAuthContract>;
    requireApiKey(result: ProviderRuntimeResolvedAuthContract, provider: string): string;
    resolveEnvApiKey(provider: string): {
        apiKey: string;
        source: string;
    } | undefined;
    resolveModelAuthMode(provider: string, config?: TConfig): ProviderRuntimeAuthMode | undefined;
    requiresOpenAiCompatibleAnthropicToolPayload(provider: string): boolean;
    usesOpenAiFunctionAnthropicToolSchema(provider: string): boolean;
    usesOpenAiStringModeAnthropicToolChoice(provider: string): boolean;
}
export declare function readProviderRuntimeCompatFlag(compat: unknown, key: ProviderRuntimeCompatFlag): boolean;
