/**
 * Proxy Resolver — Concern D
 *
 * Handles proxy configuration resolution, remote proxy reachability check,
 * local-backend selection, and CLIProxy binary acquisition.
 *
 * Extracted from executor/index.ts to isolate the proxy-resolution concern.
 * All log messages, error messages, and exit semantics are byte-identical to
 * the original implementation.
 */
import { CLIProxyProvider, CLIProxyBackend, ExecutorConfig } from '../types';
import type { ResolvedProxyConfig } from '../types';
import type { UnifiedConfig } from '../../config/schemas/unified-config';
export interface ResolvedExecutorProxyConfig {
    /** Resolved proxy config after merging CLI > ENV > config.yaml > defaults */
    proxyConfig: ResolvedProxyConfig;
    /** Args after proxy-related flags are stripped out */
    argsWithoutProxy: string[];
    /** Mutated executor config (port resolved and validated) */
    cfg: ExecutorConfig;
}
/** Result returned from resolveExecutorProxy */
export interface ResolvedProxy extends ResolvedExecutorProxyConfig {
    /** Whether to use the remote proxy (vs spawning a local one) */
    useRemoteProxy: boolean;
    /** Which local backend binary to use ('original' | 'plus') */
    localBackend: CLIProxyBackend;
    /** Absolute path to CLIProxy binary; undefined when useRemoteProxy=true */
    binaryPath: string | undefined;
}
/** Dependencies injected by the orchestrator */
export interface ResolveExecutorProxyContext {
    unifiedConfig: UnifiedConfig;
    allProviders: CLIProxyProvider[];
    verbose: boolean;
    cfg: ExecutorConfig;
    log: (msg: string) => void;
}
/**
 * Resolves side-effect-free proxy configuration and strips proxy flags.
 *
 * Mutates `context.cfg.port` in-place (same as original orchestrator behaviour).
 */
export declare function resolveExecutorProxyConfig(args: string[], context: ResolveExecutorProxyContext): ResolvedExecutorProxyConfig;
/**
 * Resolves proxy configuration, checks remote reachability, selects the local
 * backend, and ensures the CLIProxy binary is present when running locally.
 */
export declare function resolveExecutorProxy(resolvedConfig: ResolvedExecutorProxyConfig, context: ResolveExecutorProxyContext): Promise<ResolvedProxy>;
//# sourceMappingURL=proxy-resolver.d.ts.map