import { type AgentSessionOptions, type InternalSessionOptions, type TurnDetectionMode, type VoiceOptions } from '../agent_session.js';
import { type EndpointingOptions } from './endpointing.js';
import { type TurnHandlingOptions } from './turn_handling.js';
export declare function migrateLegacyOptions<UserData>(legacyOptions: AgentSessionOptions<UserData>): {
    agentSessionOptions: InternalSessionOptions<UserData>;
    legacyVoiceOptions: VoiceOptions;
};
/** Remove keys whose value is `undefined` so they don't shadow defaults when spread. */
export declare function stripUndefined<T extends object>(obj: T): Partial<T>;
/**
 * Fill in default endpointing values for keys the caller did not provide.
 *
 * When `turnDetection` is a streaming ("audio model") turn detector, unset keys
 * fall back to the tighter {@link streamingEndpointingOptions}; otherwise they
 * use the legacy {@link defaultEndpointingOptions}.
 */
export declare function resolveEndpointing(overrides: Partial<EndpointingOptions>, turnDetection: TurnDetectionMode | null | undefined): EndpointingOptions;
export declare function mergeWithDefaults(config: TurnHandlingOptions): {
    readonly turnDetection: TurnDetectionMode | null | undefined;
    readonly endpointing: {
        mode: "fixed" | "dynamic";
        minDelay: number;
        maxDelay: number;
        alpha: number;
    } | {
        mode: "fixed" | "dynamic";
        minDelay: number;
        maxDelay: number;
        alpha: number;
    };
    readonly endpointingOverrides: Partial<Partial<EndpointingOptions>>;
    readonly interruption: {
        enabled: boolean;
        mode: "adaptive" | "vad" | undefined;
        discardAudioIfUninterruptible: boolean;
        minDuration: number;
        minWords: number;
        falseInterruptionTimeout: number;
        resumeFalseInterruption: boolean;
        backchannelBoundary: number | [number, number] | null;
    };
    readonly preemptiveGeneration: {
        enabled: boolean;
        preemptiveTts: boolean;
        maxSpeechDuration: number;
        maxRetries: number;
    };
    readonly userTurnLimit: {
        maxWords: number | null;
        maxDuration: number | null;
    };
};
/**
 * Build a partial {@link TurnHandlingOptions} from deprecated Agent constructor fields.
 * Mirrors the Python Agent compatibility path, but keeps the JS API surface explicit.
 */
export declare function migrateTurnHandling(opts: {
    turnDetection?: TurnDetectionMode;
    allowInterruptions?: boolean;
    preemptiveGeneration?: boolean;
    minEndpointingDelay?: number;
    maxEndpointingDelay?: number;
    turnHandling?: TurnHandlingOptions;
}): Partial<TurnHandlingOptions>;
//# sourceMappingURL=utils.d.ts.map