import type { AgentCliEnvPrefs } from './app-config';
export interface BaseUrlValidationResult {
    parsed?: ParsedBaseUrl;
    error?: string;
    forbidden?: boolean;
}
export interface ParsedBaseUrl {
    protocol: string;
    hostname: string;
    toString(): string;
}
export declare function isLoopbackApiHost(hostname: string): boolean;
export declare function isBlockedExternalApiHostname(hostname: string): boolean;
export declare function validateBaseUrl(baseUrl: string): BaseUrlValidationResult;
export type ConnectionTestKind = 'success' | 'auth_failed' | 'forbidden' | 'not_found_model' | 'invalid_model_id' | 'invalid_base_url' | 'rate_limited' | 'upstream_unavailable' | 'timeout' | 'agent_not_installed' | 'agent_auth_required' | 'agent_spawn_failed' | 'unknown';
export type ConnectionTestProtocol = 'anthropic' | 'openai' | 'azure' | 'google' | 'ollama';
export interface ProviderTestRequest {
    protocol: ConnectionTestProtocol;
    baseUrl: string;
    apiKey: string;
    model: string;
    apiVersion?: string;
}
export interface AgentTestRequest {
    agentId: string;
    model?: string;
    reasoning?: string;
    agentCliEnv?: AgentCliEnvPrefs;
}
export type ConnectionTestRequest = ({
    mode: 'provider';
} & ProviderTestRequest) | ({
    mode: 'agent';
} & AgentTestRequest);
export interface ConnectionTestResponse {
    ok: boolean;
    kind: ConnectionTestKind;
    latencyMs: number;
    model?: string;
    sample?: string;
    status?: number;
    agentName?: string;
    detail?: string;
    configuredExecutablePath?: string;
    detectedExecutablePath?: string;
    usedExecutablePath?: string;
    usedExecutableSource?: 'configured' | 'path' | 'fallback_invalid' | 'fallback_failed';
}
//# sourceMappingURL=connectionTest.d.ts.map