import { VoiceAgentController, MountVoiceAgentOptions } from '@microsoft/voice-widget-ui'; export { MountVoiceAgentOptions, VoiceAgentController, mountVoiceAgent } from '@microsoft/voice-widget-ui'; import { ClientTools, ConnectionStatus, AgentMode, UnhandledClientToolCall } from '@microsoft/voice-widget-core-client'; export { createProvider, hasProvider, listProviders, onProviderRegistered, registerProvider } from '@microsoft/voice-widget-core-client'; import { VoiceAgentError, VoiceAgentTelemetryEvent } from '@microsoft/voice-widget'; export { BrokerEndpoint, TelemetryAttemptStatus, TelemetryEnvelope, TelemetryStage, VoiceAgentTelemetryEvent } from '@microsoft/voice-widget'; /** Typed `detail` for every `voice-agent:*` DOM event the element dispatches. */ interface VoiceAgentEventMap { "voice-agent:call": CustomEvent<{ config: { clientTools?: ClientTools; }; }>; "voice-agent:connect": CustomEvent<{ sessionId?: string; }>; "voice-agent:disconnect": CustomEvent<{ reason?: string; }>; "voice-agent:statuschange": CustomEvent; "voice-agent:mode": CustomEvent; "voice-agent:transcript": CustomEvent<{ role: "user" | "agent"; text: string; final: boolean; }>; "voice-agent:muted": CustomEvent; "voice-agent:error": CustomEvent; "voice-agent:expand": CustomEvent; "voice-agent:collapse": CustomEvent; "voice-agent:unhandledtool": CustomEvent; "voice-agent:telemetry": CustomEvent; } /** The custom element tag registered by {@link register}. */ declare const TAG_NAME = "voice-agent"; /** * The `` custom element. On connect it parses its attributes and * mounts the widget — unless `provider` names a provider that has not * self-registered yet, in which case it waits and mounts as soon as that * provider registers (reporting a `provider_not_registered` error if none has * after 10s). On disconnect it tears the controller down (or, if still waiting, * cancels the wait). Connection attributes are mount-once; theme, accent, and * language strings update live. */ declare class VoiceAgentElement extends HTMLElement { #private; static get observedAttributes(): string[]; addEventListener: ((type: K, listener: (this: VoiceAgentElement, ev: VoiceAgentEventMap[K]) => void, options?: boolean | AddEventListenerOptions) => void) & ((type: K, listener: (this: VoiceAgentElement, ev: HTMLElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions) => void) & ((type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions) => void); removeEventListener: ((type: K, listener: (this: VoiceAgentElement, ev: VoiceAgentEventMap[K]) => void, options?: boolean | EventListenerOptions) => void) & ((type: K, listener: (this: VoiceAgentElement, ev: HTMLElementEventMap[K]) => void, options?: boolean | EventListenerOptions) => void) & ((type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions) => void); connectedCallback(): void; disconnectedCallback(): void; /** * Imperative UI-locale switch for hosts (e.g. Foundry Portal) driving locale * from their own i18n runtime. Preferred over the `ui-locale` attribute for * frequent in-call updates. No-op before the element has mounted. */ setUiLocale(locale: Parameters[0]): void; attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void; } /** Define `` (idempotent; safe to call more than once). */ declare function register(): void; /** * Read the connection + shell-consumable attributes off a `` element. * Attributes not yet supported (avatar, dismissible) are intentionally * ignored in this slice. */ declare function parseAttributes(el: Element): MountVoiceAgentOptions; export { TAG_NAME, VoiceAgentElement, type VoiceAgentEventMap, parseAttributes, register };