/**
 * Profile and target resolution — Phase C extraction from src/ccs.ts.
 *
 * Extracted from main() lines ~136–313 (after Phase B pre-dispatch).
 * Responsible for: dynamic imports of auth modules, profile detection, target type
 * resolution, Claude CLI detection, target adapter resolution, compatibility preflight
 * checks (preserved with duplication per plan risk note 5), binary detection, and
 * per-target argument normalization (droid routing + reasoning flag stripping,
 * codex reasoning normalization, native Claude effort normalization).
 *
 * Outputs a ResolvedProfile context object consumed by Phase D (environment-builder
 * argument normalization) and Phase E (per-profile dispatch flows).
 */
import { loadSettings } from '../config/config-loader-facade';
import { getEffectiveClaudeBrowserAttachConfig } from '../utils/browser';
import { resolveTargetType } from '../targets/target-resolver';
import { resolveCliproxyBridgeMetadata } from '../api/services/cliproxy-profile-bridge';
import type ProfileDetector from '../auth/profile-detector';
import type { ProfileDetectionResult } from '../auth/profile-detector';
import type { BrowserLaunchOverride } from '../utils/browser';
import type { ResolvedBrowserExposure } from '../utils/browser/browser-policy';
import type { Logger } from '../services/logging/logger';
import type { TargetAdapter, TargetBinaryInfo } from '../targets';
export interface ProfileResolutionContext {
    args: string[];
    browserLaunchOverride: BrowserLaunchOverride | undefined;
    cliLogger: Logger;
}
export interface ResolvedProfile {
    /** Detected profile name (first positional arg or 'default') */
    profile: string;
    /** Args remaining after stripping profile token and --target flags */
    remainingArgs: string[];
    profileInfo: ProfileDetectionResult;
    resolvedTarget: ReturnType<typeof resolveTargetType>;
    claudeCli: string;
    targetAdapter: TargetAdapter | null;
    targetBinaryInfo: TargetBinaryInfo | null;
    resolvedSettingsPath: string | undefined;
    resolvedSettings: ReturnType<typeof loadSettings> | undefined;
    resolvedCliproxyBridge: ReturnType<typeof resolveCliproxyBridgeMetadata> | undefined;
    /** Per-target normalized args (droid/codex routing applied) */
    targetRemainingArgs: string[];
    /** Claude-specific args with effort normalization applied */
    nativeClaudeRemainingArgs: string[];
    runtimeReasoningOverride: string | number | undefined;
    codexRuntimeConfigOverrides: string[];
    claudeBrowserExposure: ResolvedBrowserExposure | undefined;
    codexBrowserExposure: ResolvedBrowserExposure | undefined;
    claudeAttachConfig: ReturnType<typeof getEffectiveClaudeBrowserAttachConfig> | undefined;
    /** ProfileDetector instance — Phase E account/settings flows need getAllProfiles() */
    detector: InstanceType<typeof ProfileDetector>;
}
/**
 * Resolve profile detection, target type, adapter, binary, and per-target arg normalization.
 *
 * Throws ProfileError (caught by main() try/catch) for unknown profiles.
 * Calls process.exit(1) for hard-stop conditions (adapter not found, binary not found, etc.).
 *
 * NOTE: The compatibility preflight block for non-settings profiles (else branch) is
 * INTENTIONALLY duplicated between here (Phase C) and the settings flow (Phase E).
 * Per plan risk note 5, do NOT dedupe in this PR.
 */
export declare function resolveProfileAndTarget(ctx: ProfileResolutionContext): Promise<ResolvedProfile>;
//# sourceMappingURL=profile-resolver.d.ts.map