import type { LLM } from './providers.js'; /** Options for {@link EOUConfig}. */ export type EOUConfigOptions = { /** End-of-utterance detection strategy. `'ADAPTIVE'` tunes wait time to speech; `'DEFAULT'` uses fixed bounds. Defaults to `'DEFAULT'`. */ mode?: 'ADAPTIVE' | 'DEFAULT'; /** `[min, max]` seconds to wait for the user to resume speaking before treating the turn as ended. Defaults to `[0.5, 0.8]`. */ minMaxSpeechWaitTimeout?: [number, number] | number[]; }; /** Resolved end-of-utterance configuration. Build with the {@link EOUConfig} factory. */ export type EOUConfig = { mode: 'ADAPTIVE' | 'DEFAULT'; minMaxSpeechWaitTimeout: number[]; }; /** Configure end-of-utterance (turn-end) detection. See {@link EOUConfigOptions} for defaults. */ export declare function EOUConfig(opts?: EOUConfigOptions): EOUConfig; /** Options for {@link InterruptConfig}. */ export type InterruptConfigOptions = { /** Signal used to detect a barge-in: voice activity, transcription, or both. Defaults to `'HYBRID'`. */ mode?: 'VAD_ONLY' | 'STT_ONLY' | 'HYBRID'; /** Minimum seconds of user speech required to count as an interruption. Defaults to `0.5`. */ interruptMinDuration?: number; /** Minimum number of recognized words required to interrupt. Defaults to `2`. */ interruptMinWords?: number; /** Minimum STT confidence (0-1) required to interrupt. Defaults to `0.0` (no threshold). */ interruptMinConfidence?: number; /** Seconds to pause the agent after a suspected false interruption. Defaults to `2.0`. */ falseInterruptPauseDuration?: number; /** Whether to resume the agent's speech if an interruption turns out to be false. Defaults to `true`. */ resumeOnFalseInterrupt?: boolean; /** Same as {@link InterruptConfigOptions.falseInterruptPauseDuration} but in milliseconds. Defaults to `2000`. */ falseInterruptPauseDurationMs?: number; /** Seconds to fade out agent audio when interrupted. Defaults to `0.0`. */ interruptFadeDuration?: number; /** Fade-out in milliseconds; derived from {@link InterruptConfigOptions.interruptFadeDuration} when that is set. Defaults to `400`. */ interruptFadeDurationMs?: number; }; /** Resolved interruption (barge-in) configuration. Build with the {@link InterruptConfig} factory. */ export type InterruptConfig = { mode: 'VAD_ONLY' | 'STT_ONLY' | 'HYBRID'; interruptMinDuration: number; interruptMinWords: number; interruptMinConfidence: number; falseInterruptPauseDuration: number; resumeOnFalseInterrupt: boolean; falseInterruptPauseDurationMs: number; interruptFadeDuration: number; interruptFadeDurationMs: number; }; /** * Configure how the user can interrupt (barge in on) the agent while it speaks. * If {@link InterruptConfigOptions.interruptFadeDuration} is set but the ms field * is `0`, the ms field is derived from it. See {@link InterruptConfigOptions} for defaults. */ export declare function InterruptConfig(opts?: InterruptConfigOptions): InterruptConfig; /** * Realtime processing mode: `'full_s2s'` (speech-to-speech), `'hybrid_stt'` * (realtime STT only), `'hybrid_tts'` (realtime TTS only), or `'llm_only'`. */ export type RealtimeConfigMode = 'full_s2s' | 'hybrid_stt' | 'hybrid_tts' | 'llm_only'; /** Options for {@link RealtimeConfig}. */ export type RealtimeConfigOptions = { /** Realtime processing mode. See {@link RealtimeConfigMode}. Defaults to `null` (provider default). */ mode?: RealtimeConfigMode | string | null; /** Output modalities the model should produce (e.g. `['text', 'audio']`). Defaults to `null` (provider default). */ responseModalities?: string[] | null; }; /** Resolved realtime model configuration. Build with the {@link RealtimeConfig} factory. */ export type RealtimeConfig = { mode: RealtimeConfigMode | string | null; responseModalities: string[] | null; }; /** Configure a realtime (low-latency) model session. See {@link RealtimeConfigOptions}. */ export declare function RealtimeConfig(opts?: RealtimeConfigOptions): RealtimeConfig; /** Options for {@link ContextWindow}. */ export type ContextWindowOptions = { /** Maximum tokens of conversation history to keep. Defaults to `null` (no token limit). */ maxTokens?: number | null; /** Maximum number of history items (messages/turns) to keep. Defaults to `null` (no item limit). */ maxContextItems?: number | null; /** Number of most recent turns always preserved verbatim when trimming. Defaults to `3`. */ keepRecentTurns?: number; /** Maximum tool calls allowed within a single turn. Defaults to `10`. */ maxToolCallsPerTurn?: number; /** Optional {@link LLM} used to summarize older history when trimming. Defaults to `null` (no summarization). */ summaryLlm?: LLM | null; }; /** Resolved conversation context-window configuration. Build with the {@link ContextWindow} factory. */ export type ContextWindow = { maxTokens: number | null; maxContextItems: number | null; keepRecentTurns: number; maxToolCallsPerTurn: number; summaryLlm: LLM | null; }; /** Configure how conversation history is bounded and trimmed. See {@link ContextWindowOptions}. */ export declare function ContextWindow(opts?: ContextWindowOptions): ContextWindow; /** Options for {@link S3StorageConfig}. All fields default to empty/unset unless noted. */ export type S3StorageConfigOptions = { /** Target S3 bucket name. */ bucket?: string; /** AWS region of the bucket. */ region?: string; /** Key prefix prepended to uploaded objects. */ prefix?: string; /** AWS access key id. Leave empty to use the default configured credentials. */ accessKeyId?: string; /** AWS secret access key. */ secretAccessKey?: string; /** Temporary session token for STS credentials. */ sessionToken?: string; /** Custom S3-compatible endpoint URL (for non-AWS providers). */ endpointUrl?: string; /** S3 storage class (e.g. `STANDARD`, `STANDARD_IA`). */ storageClass?: string; /** Server-side encryption mode (e.g. `AES256`, `aws:kms`). */ serverSideEncryption?: string; /** KMS key id used when `serverSideEncryption` is `aws:kms`. */ kmsKeyId?: string; /** Canned ACL applied to uploaded objects. */ acl?: string; /** Whether to use multipart upload for large objects. Defaults to `true`. */ multipartUpload?: boolean; /** Part size in MB for multipart uploads. Defaults to `8`. */ multipartPartSizeMb?: number; /** Per-upload timeout in seconds. Defaults to `0` (no limit). */ uploadTimeoutSeconds?: number; /** Number of upload retry attempts. Defaults to `3`. */ maxRetryAttempts?: number; /** Object tags to attach to uploads. */ tags?: Record; /** Custom `x-amz-meta-*` metadata to attach to uploads. */ userMetadata?: Record; /** Overrides the auto-detected `Content-Type`. */ contentTypeOverride?: string; }; /** Resolved S3 storage configuration for recordings. Build with the {@link S3StorageConfig} factory. */ export type S3StorageConfig = { bucket: string; region: string; prefix: string; accessKeyId: string; secretAccessKey: string; sessionToken: string; endpointUrl: string; storageClass: string; serverSideEncryption: string; kmsKeyId: string; acl: string; multipartUpload: boolean; multipartPartSizeMb: number; uploadTimeoutSeconds: number; maxRetryAttempts: number; tags: Record; userMetadata: Record; contentTypeOverride: string; }; /** Configure an S3 (or S3-compatible) destination for recording uploads. See {@link S3StorageConfigOptions}. */ export declare function S3StorageConfig(opts?: S3StorageConfigOptions): S3StorageConfig; /** Options for {@link RecordingTranscriptConfig}. */ export type RecordingTranscriptConfigOptions = { /** Whether to produce a transcript alongside the recording. Defaults to `false`. */ enabled?: boolean; /** Transcript file format. Defaults to `'json'`. */ format?: 'json' | 'srt' | 'vtt'; /** Include per-word timestamps. Defaults to `false`. */ includeWordTimestamps?: boolean; /** Include per-segment confidence scores. Defaults to `false`. */ includeConfidence?: boolean; /** Label each segment with its speaker. Defaults to `true`. */ speakerLabels?: boolean; /** Transcript language hint (BCP-47 code). Defaults to `''` (auto-detect). */ language?: string; }; /** Resolved recording-transcript configuration. Build with the {@link RecordingTranscriptConfig} factory. */ export type RecordingTranscriptConfig = { enabled: boolean; format: 'json' | 'srt' | 'vtt'; includeWordTimestamps: boolean; includeConfidence: boolean; speakerLabels: boolean; language: string; }; /** Configure transcript generation for a recording. See {@link RecordingTranscriptConfigOptions}. */ export declare function RecordingTranscriptConfig(opts?: RecordingTranscriptConfigOptions): RecordingTranscriptConfig; /** Options for {@link RecordingConfig}. */ export type RecordingConfigOptions = { /** Master switch for session recording. Defaults to `false`. */ enabled?: boolean; /** Start recording automatically when the session begins. Defaults to `true`. */ autoStart?: boolean; /** Output audio format. Defaults to `'ogg_opus'`. */ format?: 'wav' | 'ogg_opus' | 'mp3' | 'flac'; /** `'mixed'` for a single combined track, `'dual_channel'` to separate participants. Defaults to `'dual_channel'`. */ channelMode?: 'mixed' | 'dual_channel'; /** Output sample rate in Hz. Defaults to `0` (use source rate). */ sampleRate?: number; /** Output bitrate in kbps for compressed formats. Defaults to `0` (codec default). */ bitrateKbps?: number; /** Where to upload the recording. Defaults to `null` (default storage). See {@link S3StorageConfig}. */ storage?: S3StorageConfig | null; /** Transcript settings. Defaults to `null` (no transcript). See {@link RecordingTranscriptConfig}. */ transcript?: RecordingTranscriptConfig | null; /** Maximum recording length in seconds. Defaults to `0` (no limit). */ maxDurationSeconds?: number; /** Maximum recording file size in MB. Defaults to `0` (no limit). */ maxFileSizeMb?: number; /** Play a beep to indicate recording is active. Defaults to `false`. */ recordingBeep?: boolean; /** Mute DTMF tones in the recording. Defaults to `false`. */ redactDtmf?: boolean; /** Custom metadata stored with the recording. */ customMetadata?: Record; /** Human-readable name for the recording. Defaults to `''`. */ recordingName?: string; /** Group/label used to bucket related recordings. Defaults to `''`. */ recordingGroup?: string; /** Apply denoising to recorded audio. Defaults to `false`. */ applyDenoise?: boolean; /** Normalize recorded audio loudness. Defaults to `false`. */ normalizeAudio?: boolean; /** Trim leading/trailing silence. Defaults to `false`. */ trimSilence?: boolean; /** Record participant video. Defaults to `false`. */ recordVideo?: boolean; /** Record screen-share video. Defaults to `false`. */ recordScreenShare?: boolean; /** Record screen-share audio. Defaults to `false`. */ recordScreenAudio?: boolean; }; /** Resolved session-recording configuration. Build with the {@link RecordingConfig} factory. */ export type RecordingConfig = { enabled: boolean; autoStart: boolean; format: 'wav' | 'ogg_opus' | 'mp3' | 'flac'; channelMode: 'mixed' | 'dual_channel'; sampleRate: number; bitrateKbps: number; storage: S3StorageConfig | null; transcript: RecordingTranscriptConfig | null; maxDurationSeconds: number; maxFileSizeMb: number; recordingBeep: boolean; redactDtmf: boolean; customMetadata: Record; recordingName: string; recordingGroup: string; applyDenoise: boolean; normalizeAudio: boolean; trimSilence: boolean; recordVideo: boolean; recordScreenShare: boolean; recordScreenAudio: boolean; }; /** Configure session recording (audio, video, transcript, and upload). See {@link RecordingConfigOptions}. */ export declare function RecordingConfig(opts?: RecordingConfigOptions): RecordingConfig;