diff --git a/.changeset/loop-stall-stacks.md b/.changeset/loop-stall-stacks.md new file mode 100644 index 0000000000..5cc9405a52 --- /dev/null +++ b/.changeset/loop-stall-stacks.md @@ -0,0 +1,5 @@ +--- +'@livekit/agents': patch +--- + +Event loop stalls now nest under the span that was running when the loop blocked (`function_tool`, `rpc_handler`, `on_user_turn_completed`, ...) and carry `lk.blocking.stack`, the loop thread's call stack sampled by the monitor's watchdog thread through an inspector session (at the warn threshold and again at ten times it). Sampling starts after a process's first stall, or from the start with `LIVEKIT_AGENTS_LOOP_BLOCK_STACKS=1`, never with `0`; it costs a one-time enumeration of the loaded scripts on the loop when it starts and about 1% of throughput afterwards. Not enabled while an inspector is attached to the process. diff --git a/agents/api-extractor.json b/agents/api-extractor.json index fca422219b..522a10d8ac 100644 --- a/agents/api-extractor.json +++ b/agents/api-extractor.json @@ -16,5 +16,17 @@ * DEFAULT VALUE: "" */ "extends": "../api-extractor-shared.json", - "mainEntryPointFilePath": "./dist/index.d.ts" + "mainEntryPointFilePath": "./dist/index.d.ts", + "messages": { + "extractorMessageReporting": { + /** + * Exports are not release-tagged in this package; the warning for every untagged symbol + * only buries the real changes in the API report. + */ + "ae-missing-release-tag": { + "logLevel": "none", + "addToApiReportFile": false + } + } + } } diff --git a/agents/etc/agents.api.md b/agents/etc/agents.api.md index c9627b1654..3cfb8fc63a 100644 --- a/agents/etc/agents.api.md +++ b/agents/etc/agents.api.md @@ -69,8 +69,6 @@ import { WebSocket as WebSocket_2 } from 'ws'; import type { WritableStreamDefaultWriter as WritableStreamDefaultWriter_2 } from 'node:stream/web'; import { z } from 'zod'; -// Warning: (ae-missing-release-tag) "Aborted" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type Aborted = { result: T; @@ -80,8 +78,6 @@ export type Aborted = { isAborted: true; }; -// Warning: (ae-missing-release-tag) "AdaptiveNoiseGate" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class AdaptiveNoiseGate implements AudioGate { constructor(options?: AdaptiveNoiseGateOptions); @@ -89,15 +85,11 @@ export class AdaptiveNoiseGate implements AudioGate { update(frame: AudioFrame): boolean; } -// Warning: (ae-missing-release-tag) "AdaptiveNoiseGateOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface AdaptiveNoiseGateOptions extends AudioGateOptions { window?: number; } -// Warning: (ae-missing-release-tag) "Agent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class Agent { constructor(input: AgentOptions); @@ -204,8 +196,6 @@ export type _AgentBackchannelOpportunityEvent = { createdAt: number; }; -// Warning: (ae-missing-release-tag) "AgentConfigUpdate" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class AgentConfigUpdate { constructor(params?: { @@ -241,8 +231,6 @@ export class AgentConfigUpdate { readonly type: "agent_config_update"; } -// Warning: (ae-missing-release-tag) "AgentContext" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface AgentContext { agent: Agent; @@ -260,14 +248,10 @@ export interface AgentContext { vad: VAD | undefined; } -// Warning: (ae-missing-release-tag) "AgentCreateOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AgentCreateOptions extends AgentOptions, AgentHooks { } -// Warning: (ae-missing-release-tag) "AgentDefinition" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface AgentDefinition> { // (undocumented) @@ -279,13 +263,10 @@ export interface AgentDefinition> { } // Warning: (ae-forgotten-export) The symbol "OverlappingSpeechEvent" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "AgentEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) export type AgentEvent = UserInputTranscribedEvent | UserTranscriptionTimeoutEvent | UserStateChangedEvent | AgentStateChangedEvent | MetricsCollectedEvent | SessionUsageUpdatedEvent | ConversationItemAddedEvent | FunctionToolsExecutedEvent | SpeechCreatedEvent | AgentFalseInterruptionEvent | OverlappingSpeechEvent | ErrorEvent_2 | CloseEvent_2; -// Warning: (ae-missing-release-tag) "AgentFalseInterruptionEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AgentFalseInterruptionEvent = { type: 'agent_false_interruption'; @@ -293,8 +274,6 @@ export type AgentFalseInterruptionEvent = { createdAt: number; }; -// Warning: (ae-missing-release-tag) "AgentHandoff" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AgentHandoff { // (undocumented) @@ -303,8 +282,6 @@ export interface AgentHandoff { returns?: any; } -// Warning: (ae-missing-release-tag) "AgentHandoffAssert" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class AgentHandoffAssert extends EventAssert { constructor(event: AgentHandoffEvent, parent: RunAssert, index: number); @@ -314,16 +291,12 @@ class AgentHandoffAssert extends EventAssert { protected _event: AgentHandoffEvent; } -// Warning: (ae-missing-release-tag) "AgentHandoffAssertOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface AgentHandoffAssertOptions { // (undocumented) newAgentType?: new (...args: any[]) => Agent; } -// Warning: (ae-missing-release-tag) "AgentHandoffEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface AgentHandoffEvent { // (undocumented) @@ -336,8 +309,6 @@ interface AgentHandoffEvent { type: 'agent_handoff'; } -// Warning: (ae-missing-release-tag) "AgentHandoffItem" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class AgentHandoffItem { constructor(params: { @@ -367,13 +338,9 @@ export class AgentHandoffItem { readonly type: "agent_handoff"; } -// Warning: (ae-missing-release-tag) "AgentHookNodeResult" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type AgentHookNodeResult = AsyncIterable | Promise | null> | null; -// Warning: (ae-missing-release-tag) "AgentHooks" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AgentHooks = AgentContext> { llmNode?: (ctx: ContextT, chatCtx: ChatContext, toolCtx: ToolContext, modelSettings: ModelSettings) => AgentHookNodeResult; @@ -386,18 +353,12 @@ export interface AgentHooks = ttsNode?: (ctx: ContextT, text: AsyncIterable, modelSettings: ModelSettings) => AgentHookNodeResult; } -// Warning: (ae-missing-release-tag) "AgentMetrics" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AgentMetrics = STTMetrics | LLMMetrics | TTSMetrics | VADMetrics | EOUMetrics | EOTInferenceMetrics | RealtimeModelMetrics | InterruptionMetrics | AvatarMetrics; -// Warning: (ae-missing-release-tag) "AgentMood" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type AgentMood = 'excited' | 'happy' | 'playful' | 'curious' | 'surprised' | 'hopeful' | 'empathetic' | 'sad' | 'angry' | 'anxious' | 'calm'; -// Warning: (ae-missing-release-tag) "AgentOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AgentOptions { // @deprecated (undocumented) @@ -433,7 +394,6 @@ export interface AgentOptions { vad?: VAD | null; } -// Warning: (ae-missing-release-tag) "AgentsConsole" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "enabled" // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "acquireIo" // @@ -459,7 +419,6 @@ export class AgentsConsole { transport?: SessionTransport; } -// Warning: (ae-missing-release-tag) "AgentServer" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver // // @public @@ -483,7 +442,6 @@ export class AgentServer { // Warning: (ae-forgotten-export) The symbol "UnknownUserData" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "AgentSession_base" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "AgentSession" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) export class AgentSession extends AgentSession_base { @@ -699,8 +657,6 @@ export class AgentSession extends AgentSession_base _warnedRealtimeAudioRedaction: boolean; } -// Warning: (ae-missing-release-tag) "AgentSessionEventTypes" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum AgentSessionEventTypes { // (undocumented) @@ -733,8 +689,6 @@ export enum AgentSessionEventTypes { UserTranscriptionTimeout = "user_transcription_timeout" } -// Warning: (ae-missing-release-tag) "AgentSessionOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AgentSessionOptions = { stt?: STT | ModelWithLanguage; @@ -761,8 +715,6 @@ export type AgentSessionOptions = { expressive?: boolean | ExpressiveOptions; }; -// Warning: (ae-missing-release-tag) "AgentSessionUpdateOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AgentSessionUpdateOptions = { expressive?: boolean | ExpressiveOptions; @@ -774,20 +726,14 @@ export type AgentSessionUpdateOptions = { keyterms?: string[]; }; -// Warning: (ae-missing-release-tag) "AgentSessionUsage" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AgentSessionUsage { modelUsage: Array>; } -// Warning: (ae-missing-release-tag) "AgentState" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AgentState = 'initializing' | 'idle' | 'listening' | 'thinking' | 'speaking'; -// Warning: (ae-missing-release-tag) "AgentStateChangedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AgentStateChangedEvent = { type: 'agent_state_changed'; @@ -796,8 +742,6 @@ export type AgentStateChangedEvent = { createdAt: number; }; -// Warning: (ae-missing-release-tag) "AgentTask" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class AgentTask extends Agent { // Warning: (ae-forgotten-export) The symbol "AgentTaskOptions" needs to be exported by the entry point index.d.ts @@ -816,22 +760,16 @@ export class AgentTask extends Agent; } -// Warning: (ae-missing-release-tag) "AgentTaskContext" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface AgentTaskContext extends AgentContext { agent: AgentTask; complete(result: ResultT | Error): void; } -// Warning: (ae-missing-release-tag) "AgentTaskCreateOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AgentTaskCreateOptions extends AgentTaskOptions, AgentHooks> { } -// Warning: (ae-missing-release-tag) "AgentUpdateOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface AgentUpdateOptions { expressive?: boolean | ExpressiveOptions; @@ -842,7 +780,6 @@ export interface AgentUpdateOptions { } // Warning: (ae-forgotten-export) The symbol "AMD_base" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "AMD" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public export class AMD extends AMD_base { @@ -864,15 +801,11 @@ export class AMD extends AMD_base { onUserSpeechStarted(): void; } -// Warning: (ae-missing-release-tag) "AMDCallbacks" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AMDCallbacks = { amd_prediction: (event: AMDPredictionEvent) => void; }; -// Warning: (ae-missing-release-tag) "AMDCategory" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum AMDCategory { // (undocumented) @@ -887,8 +820,6 @@ export enum AMDCategory { UNCERTAIN = "uncertain" } -// Warning: (ae-missing-release-tag) "AMDOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AMDOptions { detectionTimeoutMs?: number; @@ -908,8 +839,6 @@ export interface AMDOptions { waitUntilFinished?: boolean; } -// Warning: (ae-missing-release-tag) "AMDPredictionEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AMDPredictionEvent { // (undocumented) @@ -929,7 +858,6 @@ export interface AMDPredictionEvent { } // Warning: (ae-forgotten-export) The symbol "JSONObject" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "AnonFunctionTool" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The reference is ambiguous because "tool" has more than one declaration; you need to add a TSDoc member reference selector // // @public @@ -938,8 +866,6 @@ export type AnonFunctionTool, transforms: readonly TextTransform[]): ReadableStream_2; -// Warning: (ae-missing-release-tag) "_applyTextTransforms" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const _applyTextTransforms: typeof applyTextTransforms; -// Warning: (ae-missing-release-tag) "areLanguagesEquivalent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function areLanguagesEquivalent(left: string | null | undefined, right: string | null | undefined): boolean; -// Warning: (ae-missing-release-tag) "asError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function asError(maybeError: unknown): Error; -// Warning: (ae-missing-release-tag) "asLanguageCode" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function asLanguageCode(language: string): LanguageCode; -// Warning: (ae-missing-release-tag) "AssemblyaiModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type AssemblyaiModels = 'assemblyai/universal-streaming' | 'assemblyai/universal-streaming-multilingual' | 'assemblyai/u3-rt-pro' | 'assemblyai/universal-3-5-pro'; -// Warning: (ae-missing-release-tag) "AssemblyAIOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface AssemblyAIOptions { agent_context?: string; @@ -1042,15 +946,11 @@ interface AssemblyAIOptions { voice_focus_threshold?: number; } -// Warning: (ae-missing-release-tag) "AssertionError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class AssertionError extends Error { constructor(message: string); } -// Warning: (ae-missing-release-tag) "AssignmentTimeoutError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class AssignmentTimeoutError extends Error { constructor(message?: string); @@ -1074,8 +974,6 @@ export class AsyncIterableQueue implements AsyncIterableIterator { put(item: T): void; } -// Warning: (ae-missing-release-tag) "AsyncToolOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AsyncToolOptions { // (undocumented) @@ -1093,8 +991,6 @@ export interface AsyncToolOptions { updateTemplate: PromptTemplate; } -// Warning: (ae-missing-release-tag) "AsyncToolset" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class AsyncToolset extends Toolset { // (undocumented) @@ -1112,948 +1008,573 @@ export class AsyncToolset extends Toolset { readonly _executor: ToolExecutor; } -// Warning: (ae-missing-release-tag) "AsyncToolsetCreateOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AsyncToolsetCreateOptions extends ToolsetCreateOptions { // (undocumented) toolHandling?: ToolHandlingOptions; } -// Warning: (ae-missing-release-tag) "ATTR_AGENT_LABEL" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_AGENT_LABEL = "lk.agent_label"; -// Warning: (ae-missing-release-tag) "ATTR_AGENT_NAME" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_AGENT_NAME = "lk.agent_name"; -// Warning: (ae-missing-release-tag) "ATTR_AGENT_PARENT_TURN_ID" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_AGENT_PARENT_TURN_ID = "lk.parent_generation_id"; -// Warning: (ae-missing-release-tag) "ATTR_AGENT_TURN_ID" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_AGENT_TURN_ID = "lk.generation_id"; -// Warning: (ae-missing-release-tag) "ATTR_AMD_CATEGORY" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_AMD_CATEGORY = "lk.amd.category"; -// Warning: (ae-missing-release-tag) "ATTR_AMD_DELAY" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_AMD_DELAY = "lk.amd.delay"; -// Warning: (ae-missing-release-tag) "ATTR_AMD_INTERRUPT_ON_MACHINE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_AMD_INTERRUPT_ON_MACHINE = "lk.amd.interrupt_on_machine"; -// Warning: (ae-missing-release-tag) "ATTR_AMD_IS_MACHINE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_AMD_IS_MACHINE = "lk.amd.is_machine"; -// Warning: (ae-missing-release-tag) "ATTR_AMD_REASON" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_AMD_REASON = "lk.amd.reason"; -// Warning: (ae-missing-release-tag) "ATTR_AMD_SPEECH_DURATION" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_AMD_SPEECH_DURATION = "lk.amd.speech_duration"; -// Warning: (ae-missing-release-tag) "ATTR_AMD_TRANSCRIPT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_AMD_TRANSCRIPT = "lk.pii.amd.transcript"; -// Warning: (ae-missing-release-tag) "ATTR_BLOCKING_CAUSE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_BLOCKING_CAUSE = "lk.blocking.cause"; -// Warning: (ae-missing-release-tag) "ATTR_BLOCKING_COUNT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_BLOCKING_COUNT = "lk.blocking.count"; -// Warning: (ae-missing-release-tag) "ATTR_BLOCKING_CPU_TIME" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_BLOCKING_CPU_TIME = "lk.blocking.cpu_time"; -// Warning: (ae-missing-release-tag) "ATTR_BLOCKING_DURATION" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_BLOCKING_DURATION = "lk.blocking.duration"; -// Warning: (ae-missing-release-tag) "ATTR_BLOCKING_GC_TIME" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_BLOCKING_GC_TIME = "lk.blocking.gc_time"; -// Warning: (ae-missing-release-tag) "ATTR_BLOCKING_IMPORT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_BLOCKING_IMPORT = "lk.blocking.import"; -// Warning: (ae-missing-release-tag) "ATTR_BLOCKING_MAX_DURATION" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_BLOCKING_MAX_DURATION = "lk.blocking.max_duration"; -// Warning: (ae-missing-release-tag) "ATTR_BLOCKING_SEVERITY" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_BLOCKING_SEVERITY = "lk.blocking.severity"; -// Warning: (ae-missing-release-tag) "ATTR_BLOCKING_STACK" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_BLOCKING_STACK = "lk.blocking.stack"; -// Warning: (ae-missing-release-tag) "ATTR_BLOCKING_SUPPRESSED" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_BLOCKING_SUPPRESSED = "lk.blocking.suppressed"; -// Warning: (ae-missing-release-tag) "ATTR_BLOCKING_TASK" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_BLOCKING_TASK = "lk.blocking.task"; -// Warning: (ae-missing-release-tag) "ATTR_BLOCKING_THRESHOLD" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_BLOCKING_THRESHOLD = "lk.blocking.threshold"; -// Warning: (ae-missing-release-tag) "ATTR_BLOCKING_TOTAL_DURATION" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_BLOCKING_TOTAL_DURATION = "lk.blocking.total_duration"; -// Warning: (ae-missing-release-tag) "ATTR_CALLBACK_NAME" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_CALLBACK_NAME = "lk.callback.name"; -// Warning: (ae-missing-release-tag) "ATTR_CHAT_CTX" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_CHAT_CTX = "lk.pii.chat_ctx"; -// Warning: (ae-missing-release-tag) "ATTR_CLOSE_DRAIN" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_CLOSE_DRAIN = "lk.close.drain"; -// Warning: (ae-missing-release-tag) "ATTR_CLOSE_REASON" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_CLOSE_REASON = "lk.close_reason"; -// Warning: (ae-missing-release-tag) "ATTR_CLOUD_AGENT_ID" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_CLOUD_AGENT_ID = "lk.cloud_agent_id"; -// Warning: (ae-missing-release-tag) "ATTR_CONNECTION_STATE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_CONNECTION_STATE = "lk.connection_state"; -// Warning: (ae-missing-release-tag) "ATTR_DEPLOYMENT_ID" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_DEPLOYMENT_ID = "lk.deployment_id"; -// Warning: (ae-missing-release-tag) "ATTR_DISCONNECT_REASON" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_DISCONNECT_REASON = "lk.disconnect_reason"; -// Warning: (ae-missing-release-tag) "ATTR_DISPATCH_ID" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_DISPATCH_ID = "lk.dispatch_id"; -// Warning: (ae-missing-release-tag) "ATTR_E2E_LATENCY" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_E2E_LATENCY = "lk.e2e_latency"; -// Warning: (ae-missing-release-tag) "ATTR_END_OF_TURN_DELAY" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_END_OF_TURN_DELAY = "lk.end_of_turn_delay"; -// Warning: (ae-missing-release-tag) "ATTR_END_TIME" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_END_TIME = "lk.end_time"; -// Warning: (ae-missing-release-tag) "ATTR_EOU_DELAY" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_EOU_DELAY = "lk.eou.endpointing_delay"; -// Warning: (ae-missing-release-tag) "ATTR_EOU_DETECTION_DELAY" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_EOU_DETECTION_DELAY = "lk.eou.detection_delay"; -// Warning: (ae-missing-release-tag) "ATTR_EOU_FROM_CACHE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_EOU_FROM_CACHE = "lk.eou.from_cache"; -// Warning: (ae-missing-release-tag) "ATTR_EOU_LANGUAGE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_EOU_LANGUAGE = "lk.eou.language"; -// Warning: (ae-missing-release-tag) "ATTR_EOU_NOT_COMMITTED_COUNT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_EOU_NOT_COMMITTED_COUNT = "lk.eou.not_committed_count"; -// Warning: (ae-missing-release-tag) "ATTR_EOU_OUTCOME" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_EOU_OUTCOME = "lk.eou.outcome"; -// Warning: (ae-missing-release-tag) "ATTR_EOU_PROBABILITY" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_EOU_PROBABILITY = "lk.eou.probability"; -// Warning: (ae-missing-release-tag) "ATTR_EOU_REARM_COUNT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_EOU_REARM_COUNT = "lk.eou.rearm_count"; -// Warning: (ae-missing-release-tag) "ATTR_EOU_RESUME_COUNT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_EOU_RESUME_COUNT = "lk.eou.resume_count"; -// Warning: (ae-missing-release-tag) "ATTR_EOU_SOURCE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_EOU_SOURCE = "lk.eou.source"; -// Warning: (ae-missing-release-tag) "ATTR_EOU_UNLIKELY_THRESHOLD" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_EOU_UNLIKELY_THRESHOLD = "lk.eou.unlikely_threshold"; -// Warning: (ae-missing-release-tag) "ATTR_EOU_WAIT_DURATION" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_EOU_WAIT_DURATION = "lk.eou.wait_duration"; -// Warning: (ae-missing-release-tag) "ATTR_ERROR_TYPE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_ERROR_TYPE = "error.type"; -// Warning: (ae-missing-release-tag) "ATTR_EXCEPTION_MESSAGE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_EXCEPTION_MESSAGE = "exception.message"; -// Warning: (ae-missing-release-tag) "ATTR_EXCEPTION_TRACE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_EXCEPTION_TRACE = "exception.stacktrace"; -// Warning: (ae-missing-release-tag) "ATTR_EXCEPTION_TYPE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_EXCEPTION_TYPE = "exception.type"; -// Warning: (ae-missing-release-tag) "ATTR_FALLBACK_INDEX" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_FALLBACK_INDEX = "lk.fallback.index"; -// Warning: (ae-missing-release-tag) "ATTR_FALLBACK_LABEL" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_FALLBACK_LABEL = "lk.fallback.label"; -// Warning: (ae-missing-release-tag) "ATTR_FIRST_FRAME_DELAY" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_FIRST_FRAME_DELAY = "lk.first_frame_delay"; -// Warning: (ae-missing-release-tag) "ATTR_FUNCTION_TOOL_ARGS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_FUNCTION_TOOL_ARGS = "lk.pii.function_tool.arguments"; -// Warning: (ae-missing-release-tag) "ATTR_FUNCTION_TOOL_ID" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_FUNCTION_TOOL_ID = "lk.function_tool.id"; -// Warning: (ae-missing-release-tag) "ATTR_FUNCTION_TOOL_IS_ERROR" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_FUNCTION_TOOL_IS_ERROR = "lk.function_tool.is_error"; -// Warning: (ae-missing-release-tag) "ATTR_FUNCTION_TOOL_NAME" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_FUNCTION_TOOL_NAME = "lk.function_tool.name"; -// Warning: (ae-missing-release-tag) "ATTR_FUNCTION_TOOL_OUTPUT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_FUNCTION_TOOL_OUTPUT = "lk.pii.function_tool.output"; -// Warning: (ae-missing-release-tag) "ATTR_FUNCTION_TOOLS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_FUNCTION_TOOLS = "lk.function_tools"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_AGENT_NAME" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_AGENT_NAME = "gen_ai.agent.name"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_CONVERSATION_ID" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_CONVERSATION_ID = "gen_ai.conversation.id"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_EVALUATION_EXPLANATION" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_EVALUATION_EXPLANATION = "gen_ai.evaluation.explanation"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_INPUT_MESSAGES" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_INPUT_MESSAGES = "gen_ai.input.messages"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_MEMORY_QUERY_TEXT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_MEMORY_QUERY_TEXT = "gen_ai.memory.query.text"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_MEMORY_RECORDS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_MEMORY_RECORDS = "gen_ai.memory.records"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_OPERATION_NAME" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_OPERATION_NAME = "gen_ai.operation.name"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_OUTPUT_MESSAGES" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_OUTPUT_MESSAGES = "gen_ai.output.messages"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_OUTPUT_TYPE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_OUTPUT_TYPE = "gen_ai.output.type"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_PROMPT_VARIABLE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_GEN_AI_PROMPT_VARIABLE = "gen_ai.prompt.variable"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_PROVIDER_NAME" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_PROVIDER_NAME = "gen_ai.provider.name"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_REQUEST_MODEL" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_REQUEST_MODEL = "gen_ai.request.model"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_REQUEST_STREAM" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_REQUEST_STREAM = "gen_ai.request.stream"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_RESPONSE_FINISH_REASONS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_RESPONSE_FINISH_REASONS = "gen_ai.response.finish_reasons"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_RESPONSE_ID" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_RESPONSE_ID = "gen_ai.response.id"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_RESPONSE_MODEL" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_RESPONSE_MODEL = "gen_ai.response.model"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK = "gen_ai.response.time_to_first_chunk"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_RETRIEVAL_DOCUMENTS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_RETRIEVAL_DOCUMENTS = "gen_ai.retrieval.documents"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_RETRIEVAL_QUERY_TEXT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_RETRIEVAL_QUERY_TEXT = "gen_ai.retrieval.query.text"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_SYSTEM_INSTRUCTIONS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_SYSTEM_INSTRUCTIONS = "gen_ai.system_instructions"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_TOOL_CALL_ARGUMENTS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_TOOL_CALL_ARGUMENTS = "gen_ai.tool.call.arguments"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_TOOL_CALL_ID" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_TOOL_CALL_ID = "gen_ai.tool.call.id"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_TOOL_CALL_RESULT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_TOOL_CALL_RESULT = "gen_ai.tool.call.result"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_TOOL_DEFINITIONS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_TOOL_DEFINITIONS = "gen_ai.tool.definitions"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_TOOL_DESCRIPTION" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_TOOL_DESCRIPTION = "gen_ai.tool.description"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_TOOL_NAME" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_TOOL_NAME = "gen_ai.tool.name"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_TOOL_TYPE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_TOOL_TYPE = "gen_ai.tool.type"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_USAGE_AUDIO_INPUT_TOKENS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_USAGE_AUDIO_INPUT_TOKENS = "gen_ai.usage.audio.input_tokens"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_USAGE_AUDIO_OUTPUT_TOKENS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_USAGE_AUDIO_OUTPUT_TOKENS = "gen_ai.usage.audio.output_tokens"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS = "gen_ai.usage.cache_read.input_tokens"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_USAGE_CACHE_WRITE_INPUT_TOKENS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_USAGE_CACHE_WRITE_INPUT_TOKENS = "gen_ai.usage.cache_write.input_tokens"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_USAGE_INPUT_AUDIO_TOKENS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_USAGE_INPUT_AUDIO_TOKENS = "gen_ai.usage.input_audio_tokens"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_USAGE_INPUT_CACHED_TOKENS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_USAGE_INPUT_CACHED_TOKENS = "gen_ai.usage.input_cached_tokens"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_USAGE_INPUT_TEXT_TOKENS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_USAGE_INPUT_TEXT_TOKENS = "gen_ai.usage.input_text_tokens"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_USAGE_INPUT_TOKENS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_USAGE_INPUT_TOKENS = "gen_ai.usage.input_tokens"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_USAGE_OUTPUT_AUDIO_TOKENS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_USAGE_OUTPUT_AUDIO_TOKENS = "gen_ai.usage.output_audio_tokens"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_USAGE_OUTPUT_TEXT_TOKENS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_USAGE_OUTPUT_TEXT_TOKENS = "gen_ai.usage.output_text_tokens"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_USAGE_OUTPUT_TOKENS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_USAGE_OUTPUT_TOKENS = "gen_ai.usage.output_tokens"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_USAGE_REASONING_OUTPUT_TOKENS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_USAGE_REASONING_OUTPUT_TOKENS = "gen_ai.usage.reasoning.output_tokens"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_USAGE_REASONING_TOKENS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_USAGE_REASONING_TOKENS = "gen_ai.usage.reasoning_tokens"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_USAGE_TEXT_INPUT_TOKENS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_USAGE_TEXT_INPUT_TOKENS = "gen_ai.usage.text.input_tokens"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_USAGE_TEXT_OUTPUT_TOKENS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_USAGE_TEXT_OUTPUT_TOKENS = "gen_ai.usage.text.output_tokens"; -// Warning: (ae-missing-release-tag) "ATTR_GEN_AI_WORKFLOW_NAME" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_GEN_AI_WORKFLOW_NAME = "gen_ai.workflow.name"; -// Warning: (ae-missing-release-tag) "ATTR_GENERATION_COUNT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_GENERATION_COUNT = "lk.generation_count"; -// Warning: (ae-missing-release-tag) "ATTR_INSTRUCTIONS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_INSTRUCTIONS = "lk.pii.instructions"; -// Warning: (ae-missing-release-tag) "ATTR_INTERRUPTION_DETECTION_DELAY" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_INTERRUPTION_DETECTION_DELAY = "lk.interruption.detection_delay"; -// Warning: (ae-missing-release-tag) "ATTR_INTERRUPTION_PREDICTION_DURATION" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_INTERRUPTION_PREDICTION_DURATION = "lk.interruption.prediction_duration"; -// Warning: (ae-missing-release-tag) "ATTR_INTERRUPTION_PROBABILITY" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_INTERRUPTION_PROBABILITY = "lk.interruption.probability"; -// Warning: (ae-missing-release-tag) "ATTR_INTERRUPTION_SOURCE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_INTERRUPTION_SOURCE = "lk.interruption.source"; -// Warning: (ae-missing-release-tag) "ATTR_INTERRUPTION_TOTAL_DURATION" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_INTERRUPTION_TOTAL_DURATION = "lk.interruption.total_duration"; -// Warning: (ae-missing-release-tag) "ATTR_IS_INTERRUPTION" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_IS_INTERRUPTION = "lk.is_interruption"; -// Warning: (ae-missing-release-tag) "ATTR_JOB_ACCEPT_LATENCY" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_JOB_ACCEPT_LATENCY = "lk.job.accept_latency"; -// Warning: (ae-missing-release-tag) "ATTR_JOB_AGENT_ID" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_JOB_AGENT_ID = "lk.job.agent_id"; -// Warning: (ae-missing-release-tag) "ATTR_JOB_ASSIGNMENT_LATENCY" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_JOB_ASSIGNMENT_LATENCY = "lk.job.assignment_latency"; -// Warning: (ae-missing-release-tag) "ATTR_JOB_DISPATCH_LATENCY" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_JOB_DISPATCH_LATENCY = "lk.job.dispatch_latency"; -// Warning: (ae-missing-release-tag) "ATTR_JOB_ENTRYPOINT_LATENCY" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_JOB_ENTRYPOINT_LATENCY = "lk.job.entrypoint_latency"; -// Warning: (ae-missing-release-tag) "ATTR_JOB_ID" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_JOB_ID = "lk.job_id"; -// Warning: (ae-missing-release-tag) "ATTR_JOB_LAUNCH_LATENCY" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_JOB_LAUNCH_LATENCY = "lk.job.launch_latency"; -// Warning: (ae-missing-release-tag) "ATTR_KEYTERMS_ADDED" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_KEYTERMS_ADDED = "lk.keyterms.added"; -// Warning: (ae-missing-release-tag) "ATTR_KEYTERMS_COUNT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_KEYTERMS_COUNT = "lk.keyterms.count"; -// Warning: (ae-missing-release-tag) "ATTR_KEYTERMS_REMOVED" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_KEYTERMS_REMOVED = "lk.keyterms.removed"; -// Warning: (ae-missing-release-tag) "ATTR_LANGFUSE_COMPLETION_START_TIME" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_LANGFUSE_COMPLETION_START_TIME = "langfuse.observation.completion_start_time"; -// Warning: (ae-missing-release-tag) "ATTR_LLM_METRICS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_LLM_METRICS = "lk.llm_metrics"; -// Warning: (ae-missing-release-tag) "ATTR_NEW_STATE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_NEW_STATE = "lk.new_state"; -// Warning: (ae-missing-release-tag) "ATTR_OLD_STATE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_OLD_STATE = "lk.old_state"; -// Warning: (ae-missing-release-tag) "ATTR_ON_USER_TURN_COMPLETED_DELAY" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_ON_USER_TURN_COMPLETED_DELAY = "lk.on_user_turn_completed_delay"; -// Warning: (ae-missing-release-tag) "ATTR_PARTICIPANT_ID" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_PARTICIPANT_ID = "lk.participant_id"; -// Warning: (ae-missing-release-tag) "ATTR_PARTICIPANT_IDENTITY" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_PARTICIPANT_IDENTITY = "lk.pii.participant_identity"; -// Warning: (ae-missing-release-tag) "ATTR_PARTICIPANT_KIND" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_PARTICIPANT_KIND = "lk.participant_kind"; -// Warning: (ae-missing-release-tag) "ATTR_PLAYOUT_POSITION" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_PLAYOUT_POSITION = "lk.playout.position"; -// Warning: (ae-missing-release-tag) "ATTR_PRE_CONNECT_AUDIO_DURATION" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_PRE_CONNECT_AUDIO_DURATION = "lk.pre_connect_audio.duration"; -// Warning: (ae-missing-release-tag) "ATTR_PREVIOUS_AGENT_LABEL" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_PREVIOUS_AGENT_LABEL = "lk.previous_agent_label"; -// Warning: (ae-missing-release-tag) "ATTR_PROVIDER_REQUEST_IDS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_PROVIDER_REQUEST_IDS = "lk.provider_request_ids"; -// Warning: (ae-missing-release-tag) "ATTR_PROVIDER_TOOLS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_PROVIDER_TOOLS = "lk.provider_tools"; -// Warning: (ae-missing-release-tag) "ATTR_REALTIME_MODEL_METRICS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_REALTIME_MODEL_METRICS = "lk.realtime_model_metrics"; -// Warning: (ae-missing-release-tag) "ATTR_RESPONSE_FUNCTION_CALLS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_RESPONSE_FUNCTION_CALLS = "lk.pii.response.function_calls"; -// Warning: (ae-missing-release-tag) "ATTR_RESPONSE_TEXT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_RESPONSE_TEXT = "lk.pii.response.text"; -// Warning: (ae-missing-release-tag) "ATTR_RESPONSE_TTFB" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_RESPONSE_TTFB = "lk.response.ttfb"; -// Warning: (ae-missing-release-tag) "ATTR_RESPONSE_TTFT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_RESPONSE_TTFT = "lk.response.ttft"; -// Warning: (ae-missing-release-tag) "ATTR_RETRY_COUNT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_RETRY_COUNT = "lk.retry_count"; -// Warning: (ae-missing-release-tag) "ATTR_ROOM_AUTO_SUBSCRIBE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_ROOM_AUTO_SUBSCRIBE = "lk.room.auto_subscribe"; -// Warning: (ae-missing-release-tag) "ATTR_ROOM_E2EE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_ROOM_E2EE = "lk.room.e2ee"; -// Warning: (ae-missing-release-tag) "ATTR_ROOM_IO_PARTICIPANT_FILTER" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_ROOM_IO_PARTICIPANT_FILTER = "lk.room_io.participant_filter"; -// Warning: (ae-missing-release-tag) "ATTR_ROOM_NAME" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_ROOM_NAME = "lk.pii.room_name"; -// Warning: (ae-missing-release-tag) "ATTR_ROOM_REMOTE_PARTICIPANT_COUNT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_ROOM_REMOTE_PARTICIPANT_COUNT = "lk.room.remote_participant_count"; -// Warning: (ae-missing-release-tag) "ATTR_ROOM_SID" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_ROOM_SID = "lk.room_sid"; -// Warning: (ae-missing-release-tag) "ATTR_RPC_CALLER_IDENTITY" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_RPC_CALLER_IDENTITY = "lk.rpc.caller_identity"; -// Warning: (ae-missing-release-tag) "ATTR_RPC_DESTINATION_IDENTITY" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_RPC_DESTINATION_IDENTITY = "lk.rpc.destination_identity"; -// Warning: (ae-missing-release-tag) "ATTR_RPC_ERROR_CODE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_RPC_ERROR_CODE = "lk.rpc.error_code"; -// Warning: (ae-missing-release-tag) "ATTR_RPC_METHOD" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_RPC_METHOD = "rpc.method"; -// Warning: (ae-missing-release-tag) "ATTR_RPC_PAYLOAD" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_RPC_PAYLOAD = "lk.pii.rpc.payload"; -// Warning: (ae-missing-release-tag) "ATTR_RPC_PAYLOAD_SIZE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_RPC_PAYLOAD_SIZE = "lk.rpc.payload_size"; -// Warning: (ae-missing-release-tag) "ATTR_RPC_REQUEST_ID" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_RPC_REQUEST_ID = "lk.rpc.request_id"; -// Warning: (ae-missing-release-tag) "ATTR_RPC_RESPONSE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_RPC_RESPONSE = "lk.pii.rpc.response"; -// Warning: (ae-missing-release-tag) "ATTR_RPC_RESPONSE_SIZE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_RPC_RESPONSE_SIZE = "lk.rpc.response_size"; -// Warning: (ae-missing-release-tag) "ATTR_RPC_RESPONSE_TIMEOUT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_RPC_RESPONSE_TIMEOUT = "lk.rpc.response_timeout"; -// Warning: (ae-missing-release-tag) "ATTR_SESSION_OPTIONS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_SESSION_OPTIONS = "lk.session_options"; -// Warning: (ae-missing-release-tag) "ATTR_SHUTDOWN_REASON" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_SHUTDOWN_REASON = "lk.shutdown.reason"; -// Warning: (ae-missing-release-tag) "ATTR_SHUTDOWN_USER_INITIATED" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_SHUTDOWN_USER_INITIATED = "lk.shutdown.user_initiated"; -// Warning: (ae-missing-release-tag) "ATTR_SIP_PHONE_NUMBER" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_SIP_PHONE_NUMBER = "lk.pii.sip.phoneNumber"; -// Warning: (ae-missing-release-tag) "ATTR_SIP_PREFIX" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_SIP_PREFIX = "lk.sip."; -// Warning: (ae-missing-release-tag) "ATTR_SPEECH_ID" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_SPEECH_ID = "lk.speech_id"; -// Warning: (ae-missing-release-tag) "ATTR_SPEECH_INTERRUPTED" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_SPEECH_INTERRUPTED = "lk.interrupted"; -// Warning: (ae-missing-release-tag) "ATTR_SPEECH_QUEUE_WAIT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_SPEECH_QUEUE_WAIT = "lk.speech.queue_wait"; -// Warning: (ae-missing-release-tag) "ATTR_START_TIME" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_START_TIME = "lk.start_time"; -// Warning: (ae-missing-release-tag) "ATTR_TOOL_SETS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_TOOL_SETS = "lk.tool_sets"; -// Warning: (ae-missing-release-tag) "ATTR_TRACK_SID" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_TRACK_SID = "lk.track_sid"; -// Warning: (ae-missing-release-tag) "ATTR_TRACK_SOURCE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_TRACK_SOURCE = "lk.track_source"; -// Warning: (ae-missing-release-tag) "ATTR_TRANSCRIPT_CONFIDENCE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_TRANSCRIPT_CONFIDENCE = "lk.transcript_confidence"; -// Warning: (ae-missing-release-tag) "ATTR_TRANSCRIPTION_DELAY" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const ATTR_TRANSCRIPTION_DELAY = "lk.transcription_delay"; -// Warning: (ae-missing-release-tag) "ATTR_TTS_INPUT_TEXT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_TTS_INPUT_TEXT = "lk.pii.input_text"; -// Warning: (ae-missing-release-tag) "ATTR_TTS_LABEL" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_TTS_LABEL = "lk.tts.label"; -// Warning: (ae-missing-release-tag) "ATTR_TTS_METRICS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_TTS_METRICS = "lk.tts_metrics"; -// Warning: (ae-missing-release-tag) "ATTR_TTS_STREAMING" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_TTS_STREAMING = "lk.tts.streaming"; -// Warning: (ae-missing-release-tag) "ATTR_USER_INPUT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_USER_INPUT = "lk.pii.user_input"; -// Warning: (ae-missing-release-tag) "ATTR_USER_TRANSCRIPT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_USER_TRANSCRIPT = "lk.pii.user_transcript"; -// Warning: (ae-missing-release-tag) "ATTR_WORKER_ID" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ATTR_WORKER_ID = "lk.job.worker_id"; -// Warning: (ae-missing-release-tag) "ATTRIBUTE_REDACTION_ENABLED" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export const ATTRIBUTE_REDACTION_ENABLED = "lk.redaction.enabled"; -// Warning: (ae-missing-release-tag) "ATTRIBUTE_SIMULATION_ENABLED" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export const ATTRIBUTE_SIMULATION_ENABLED = "lk.simulation.enabled"; -// Warning: (ae-missing-release-tag) "ATTRIBUTE_SIMULATION_JOB_ID" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export const ATTRIBUTE_SIMULATION_JOB_ID = "lk.simulation.job_id"; -// Warning: (ae-missing-release-tag) "ATTRIBUTE_SIMULATION_RUN_ID" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export const ATTRIBUTE_SIMULATION_RUN_ID = "lk.simulation.run_id"; -// Warning: (ae-missing-release-tag) "ATTRIBUTE_SIMULATOR" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export const ATTRIBUTE_SIMULATOR = "lk.simulator"; -// Warning: (ae-missing-release-tag) "ATTRIBUTE_SIMULATOR_DISPATCH" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export const ATTRIBUTE_SIMULATOR_DISPATCH = "lk.simulator.dispatch"; -// Warning: (ae-missing-release-tag) "ATTRIBUTE_TRANSCRIPTION_EXPRESSION" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export const ATTRIBUTE_TRANSCRIPTION_EXPRESSION = "lk.expression"; -// Warning: (ae-missing-release-tag) "AudioBuffer" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "AudioFrame" // // @public type AudioBuffer_2 = AudioFrame[] | AudioFrame; export { AudioBuffer_2 as AudioBuffer } -// Warning: (ae-missing-release-tag) "AudioByteStream" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class AudioByteStream { constructor(sampleRate: number, numChannels: number, samplesPerChannel?: number | null); @@ -2063,8 +1584,6 @@ export class AudioByteStream { write(data: ArrayBufferLike | ArrayBufferView): AudioFrame[]; } -// Warning: (ae-missing-release-tag) "AudioConfig" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AudioConfig { // (undocumented) @@ -2075,8 +1594,6 @@ export interface AudioConfig { volume?: number; } -// Warning: (ae-missing-release-tag) "AudioContent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AudioContent { // (undocumented) @@ -2087,8 +1604,6 @@ export interface AudioContent { type: 'audio_content'; } -// Warning: (ae-missing-release-tag) "AudioDecodeOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AudioDecodeOptions { // (undocumented) @@ -2109,21 +1624,15 @@ export class AudioEnergyFilter { pushFrame(frame: AudioFrame): boolean; } -// Warning: (ae-missing-release-tag) "audioFramesFromFile" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function audioFramesFromFile(filePath: string, options?: AudioDecodeOptions): ReadableStream_2; -// Warning: (ae-missing-release-tag) "AudioGate" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface AudioGate { deactivate(): void; update(frame: AudioFrame): boolean; } -// Warning: (ae-missing-release-tag) "AudioGateOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface AudioGateOptions { activationRatio?: number; @@ -2131,8 +1640,6 @@ export interface AudioGateOptions { minSilenceDuration?: number; } -// Warning: (ae-missing-release-tag) "AudioInput" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export abstract class AudioInput { // (undocumented) @@ -2153,8 +1660,6 @@ export abstract class AudioInput { get stream(): ReadableStream_2; } -// Warning: (ae-missing-release-tag) "AudioOutput" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export abstract class AudioOutput extends EventEmitter_2 { constructor(sampleRate?: number | undefined, nextInChain?: AudioOutput | undefined, capabilities?: AudioOutputCapabilities); @@ -2195,15 +1700,11 @@ export abstract class AudioOutput extends EventEmitter_2 { waitForPlayout(): Promise; } -// Warning: (ae-missing-release-tag) "AudioOutputCapabilities" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AudioOutputCapabilities { pause: boolean; } -// Warning: (ae-missing-release-tag) "AudioOutputOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AudioOutputOptions { // (undocumented) @@ -2216,19 +1717,13 @@ export interface AudioOutputOptions { trackPublishOptions: TrackPublishOptions; } -// Warning: (ae-missing-release-tag) "AudioSegmentEnd" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class AudioSegmentEnd { } -// Warning: (ae-missing-release-tag) "AudioSourceType" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AudioSourceType = string | BuiltinAudioClip | AsyncIterable; -// Warning: (ae-missing-release-tag) "AutoSubscribe" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export enum AutoSubscribe { // (undocumented) @@ -2241,8 +1736,6 @@ export enum AutoSubscribe { VIDEO_ONLY = 2 } -// Warning: (ae-missing-release-tag) "AvailabilityChangedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface AvailabilityChangedEvent { // (undocumented) @@ -2251,24 +1744,18 @@ export interface AvailabilityChangedEvent { llm: LLM; } -// Warning: (ae-missing-release-tag) "AvailabilityChangedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface AvailabilityChangedEvent_2 { available: boolean; stt: STT; } -// Warning: (ae-missing-release-tag) "AvailabilityChangedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface AvailabilityChangedEvent_3 { available: boolean; tts: TTS; } -// Warning: (ae-missing-release-tag) "AvatarMetrics" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AvatarMetrics = { type: 'avatar_metrics'; @@ -2279,13 +1766,10 @@ export type AvatarMetrics = { metadata?: MetricsMetadata; }; -// Warning: (ae-missing-release-tag) "AvatarModel" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type AvatarModel = 'lemonslice' | `lemonslice/${string}` | (string & NonNullable); // Warning: (ae-forgotten-export) The symbol "AvatarSession_base" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "AvatarSession" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public export class AvatarSession extends AvatarSession_base { @@ -2302,8 +1786,6 @@ export class AvatarSession extends AvatarSession_base { }): Promise; } -// Warning: (ae-missing-release-tag) "AvatarSession" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class AvatarSession_2 extends AvatarSession { constructor(options: AvatarSessionOptions); @@ -2330,15 +1812,11 @@ class AvatarSession_2 extends AvatarSession { _terminateSession(providerSessionId: string, terminateToken: string): Promise; } -// Warning: (ae-missing-release-tag) "AvatarSessionCallbacks" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AvatarSessionCallbacks = { metrics_collected: (metrics: AvatarMetrics) => void; }; -// Warning: (ae-missing-release-tag) "AvatarSessionOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface AvatarSessionOptions { apiKey?: string; @@ -2353,8 +1831,6 @@ interface AvatarSessionOptions { model: AvatarModel; } -// Warning: (ae-missing-release-tag) "AvatarSessionStartOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface AvatarSessionStartOptions { livekitApiKey?: string; @@ -2362,8 +1838,6 @@ interface AvatarSessionStartOptions { livekitUrl?: string; } -// Warning: (ae-missing-release-tag) "BackgroundAudioPlayer" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class BackgroundAudioPlayer { constructor(options?: BackgroundAudioPlayerOptions); @@ -2374,8 +1848,6 @@ export class BackgroundAudioPlayer { start(options: BackgroundAudioStartOptions): Promise; } -// Warning: (ae-missing-release-tag) "BackgroundAudioPlayerOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface BackgroundAudioPlayerOptions { ambientSound?: AudioSourceType | AudioConfig | AudioConfig[]; @@ -2383,8 +1855,6 @@ export interface BackgroundAudioPlayerOptions { thinkingSound?: AudioSourceType | AudioConfig | AudioConfig[]; } -// Warning: (ae-missing-release-tag) "BackgroundAudioStartOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface BackgroundAudioStartOptions { // (undocumented) @@ -2395,8 +1865,6 @@ export interface BackgroundAudioStartOptions { trackPublishOptions?: TrackPublishOptions; } -// Warning: (ae-missing-release-tag) "BaseEndpointing" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class BaseEndpointing { constructor(input: { @@ -2461,25 +1929,25 @@ declare namespace beta { } } -// Warning: (ae-missing-release-tag) "BlockedReport" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface BlockedReport { cause: LoopStallCause; cpuScope: LoopCpuScope; cpuTime: number; duration: number; + endedAt: number; gcTime: number; + location?: string; // (undocumented) severity: LoopMonitorSeverity; + stack?: string; startedAt: number; // (undocumented) warnThreshold: number; watchdogGap: number; + windowStart: number; } -// Warning: (ae-missing-release-tag) "BufferedSentenceStream" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) class BufferedSentenceStream extends SentenceStream { // Warning: (ae-forgotten-export) The symbol "TokenizeFunc" needs to be exported by the entry point index.d.ts @@ -2497,8 +1965,6 @@ class BufferedSentenceStream extends SentenceStream { pushText(text: string): void; } -// Warning: (ae-missing-release-tag) "BufferedTokenStream" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) class BufferedTokenStream implements AsyncIterableIterator { // (undocumented) @@ -2519,8 +1985,6 @@ class BufferedTokenStream implements AsyncIterableIterator { protected queue: AsyncIterableQueue; } -// Warning: (ae-missing-release-tag) "BufferedWordStream" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) class BufferedWordStream extends WordStream { constructor(func: TokenizeFunc, minTokenLength: number, minContextLength: number); @@ -2536,8 +2000,6 @@ class BufferedWordStream extends WordStream { pushText(text: string): void; } -// Warning: (ae-missing-release-tag) "BuiltinAudioClip" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum BuiltinAudioClip { // (undocumented) @@ -2550,18 +2012,12 @@ export enum BuiltinAudioClip { OFFICE_AMBIENCE = "office-ambience.ogg" } -// Warning: (ae-missing-release-tag) "BuiltinTextTransform" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type BuiltinTextTransform = 'filter_markdown' | 'filter_emoji'; -// Warning: (ae-missing-release-tag) "calculateAudioDurationSeconds" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function calculateAudioDurationSeconds(frame: AudioBuffer_2): number; -// Warning: (ae-missing-release-tag) "cancelAndWait" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function cancelAndWait(tasks: Task[], timeout?: number): Promise; @@ -2588,18 +2044,12 @@ export class CancellablePromise { then(onfulfilled?: ((value: T) => TResult1 | Promise) | null, onrejected?: ((reason: E) => TResult2 | Promise) | null): Promise; } -// Warning: (ae-missing-release-tag) "CartesiaModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type CartesiaModels = 'cartesia/ink-whisper' | 'cartesia/ink-2'; -// Warning: (ae-missing-release-tag) "CartesiaModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type CartesiaModels_2 = 'cartesia/sonic-3.5' | 'cartesia/sonic-3' | 'cartesia/sonic-2' | 'cartesia/sonic-turbo' | 'cartesia/sonic' | 'cartesia/sonic-3-latest' | 'cartesia/sonic-latest'; -// Warning: (ae-missing-release-tag) "CartesiaOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface CartesiaOptions { keyterm?: string | string[]; @@ -2611,8 +2061,6 @@ interface CartesiaOptions { turn_start_threshold?: number; } -// Warning: (ae-missing-release-tag) "CartesiaOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface CartesiaOptions_2 { // (undocumented) @@ -2631,8 +2079,6 @@ interface CartesiaOptions_2 { volume?: number; } -// Warning: (ae-missing-release-tag) "ChatChunk" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ChatChunk { // (undocumented) @@ -2643,8 +2089,6 @@ export interface ChatChunk { usage?: CompletionUsage; } -// Warning: (ae-missing-release-tag) "ChatCompletionOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface ChatCompletionOptions extends Record { // (undocumented) @@ -2713,13 +2157,9 @@ interface ChatCompletionOptions extends Record { web_search_options?: WebSearchOptions; } -// Warning: (ae-missing-release-tag) "ChatContent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type ChatContent = ImageContent | AudioContent | Instructions | string; -// Warning: (ae-missing-release-tag) "ChatContext" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class ChatContext { constructor(items?: ChatItem[]); @@ -2785,8 +2225,6 @@ export class ChatContext { truncate(maxItems: number): ChatContext; } -// Warning: (ae-missing-release-tag) "ChatContextValidationIssue" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ChatContextValidationIssue { // (undocumented) @@ -2801,8 +2239,6 @@ export interface ChatContextValidationIssue { severity: ChatContextValidationSeverity; } -// Warning: (ae-missing-release-tag) "ChatContextValidationResult" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ChatContextValidationResult { // (undocumented) @@ -2815,18 +2251,12 @@ export interface ChatContextValidationResult { warnings: number; } -// Warning: (ae-missing-release-tag) "ChatContextValidationSeverity" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type ChatContextValidationSeverity = 'error' | 'warning'; -// Warning: (ae-missing-release-tag) "ChatItem" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type ChatItem = ChatMessage | FunctionCall | FunctionCallOutput | AgentHandoffItem | AgentConfigUpdate; -// Warning: (ae-missing-release-tag) "ChatMessage" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class ChatMessage { constructor(params: { @@ -2878,8 +2308,6 @@ export class ChatMessage { readonly type: "message"; } -// Warning: (ae-missing-release-tag) "ChatMessageEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface ChatMessageEvent { // (undocumented) @@ -2888,8 +2316,6 @@ interface ChatMessageEvent { type: 'message'; } -// Warning: (ae-missing-release-tag) "ChatMessagePayload" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface ChatMessagePayload { // (undocumented) @@ -2902,13 +2328,9 @@ interface ChatMessagePayload { role: string; } -// Warning: (ae-missing-release-tag) "ChatRole" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type ChatRole = 'developer' | 'system' | 'user' | 'assistant'; -// Warning: (ae-missing-release-tag) "ChoiceDelta" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ChoiceDelta { // (undocumented) @@ -2921,8 +2343,6 @@ export interface ChoiceDelta { toolCalls?: FunctionCall[]; } -// Warning: (ae-missing-release-tag) "ChunkedStream" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public abstract class ChunkedStream implements AsyncIterableIterator { // (undocumented) @@ -2970,8 +2390,6 @@ declare namespace cli { } } -// Warning: (ae-missing-release-tag) "CloseEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type CloseEvent_2 = { type: 'close'; @@ -2981,8 +2399,6 @@ type CloseEvent_2 = { }; export { CloseEvent_2 as CloseEvent } -// Warning: (ae-missing-release-tag) "CloseReason" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum CloseReason { // (undocumented) @@ -2995,8 +2411,6 @@ export enum CloseReason { USER_INITIATED = "user_initiated" } -// Warning: (ae-missing-release-tag) "CloudSpanProcessorOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface CloudSpanProcessorOptions { exporter: SpanExporter; @@ -3005,7 +2419,6 @@ interface CloudSpanProcessorOptions { } // Warning: (ae-forgotten-export) The symbol "StreamingTurnDetectionTransport" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "CloudTransport" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public class CloudTransport implements StreamingTurnDetectionTransport { @@ -3071,8 +2484,6 @@ class CloudTransport implements StreamingTurnDetectionTransport { protected _ws: CloudWebSocket | undefined; } -// Warning: (ae-missing-release-tag) "CloudTransportOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface CloudTransportOptions { // (undocumented) @@ -3085,8 +2496,6 @@ interface CloudTransportOptions { connOptions: APIConnectOptions; } -// Warning: (ae-missing-release-tag) "CollectedResponse" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface CollectedResponse { extra: Record; @@ -3098,13 +2507,9 @@ export interface CollectedResponse { usage?: CompletionUsage; } -// Warning: (ae-missing-release-tag) "combineSignals" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export const combineSignals: (a: AbortSignal, b: AbortSignal) => AbortSignal; -// Warning: (ae-missing-release-tag) "CompletionUsage" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface CompletionUsage { cacheCreationTokens?: number; @@ -3121,23 +2526,16 @@ export interface CompletionUsage { } // Warning: (ae-forgotten-export) The symbol "DiffOps" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "computeChatCtxDiff" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public export function computeChatCtxDiff(oldCtx: ChatContext, newCtx: ChatContext): DiffOps; -// Warning: (ae-missing-release-tag) "concatInstructions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function concatInstructions(...parts: Array): string | Instructions; -// Warning: (ae-missing-release-tag) "CONFIRM_DUPLICATE_PARAM" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const CONFIRM_DUPLICATE_PARAM = "lk_agents_confirm_duplicate"; -// Warning: (ae-missing-release-tag) "ConnectionPool" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class ConnectionPool { constructor(options: ConnectionPoolOptions); @@ -3153,8 +2551,6 @@ export class ConnectionPool { }): Promise; } -// Warning: (ae-missing-release-tag) "ConnectionPoolOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface ConnectionPoolOptions { closeCb?: (conn: T) => Promise; @@ -3164,13 +2560,9 @@ export interface ConnectionPoolOptions { maxSessionDuration?: number; } -// Warning: (ae-missing-release-tag) "conversationId" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function conversationId(): string | undefined; -// Warning: (ae-missing-release-tag) "ConversationItemAddedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type ConversationItemAddedEvent = { type: 'conversation_item_added'; @@ -3178,8 +2570,6 @@ export type ConversationItemAddedEvent = { createdAt: number; }; -// Warning: (ae-missing-release-tag) "convertMarkup" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function convertMarkup(provider: string, text: string): string; @@ -3193,49 +2583,33 @@ export const _createAgentBackchannelOpportunityEvent: (input: { createdAt?: number; }) => _AgentBackchannelOpportunityEvent; -// Warning: (ae-missing-release-tag) "createAgentFalseInterruptionEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const createAgentFalseInterruptionEvent: (input: { resumed: boolean; createdAt?: number; }) => AgentFalseInterruptionEvent; -// Warning: (ae-missing-release-tag) "createAgentStateChangedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const createAgentStateChangedEvent: (oldState: AgentState, newState: AgentState, createdAt?: number) => AgentStateChangedEvent; -// Warning: (ae-missing-release-tag) "createAudioContent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function createAudioContent(params: { frame: AudioFrame[]; transcript?: string; }): AudioContent; -// Warning: (ae-missing-release-tag) "createCloseEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const createCloseEvent: (reason: ShutdownReason, error?: RealtimeModelError | STTError | TTSError | LLMError | InterruptionDetectionError | null, createdAt?: number) => CloseEvent_2; -// Warning: (ae-missing-release-tag) "createConversationItemAddedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const createConversationItemAddedEvent: (item: ChatMessage | AgentHandoffItem, createdAt?: number) => ConversationItemAddedEvent; -// Warning: (ae-missing-release-tag) "createEndCallTool" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function createEndCallTool(input?: EndCallToolOptions): Toolset; -// Warning: (ae-missing-release-tag) "createEndpointing" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function createEndpointing(options: EndpointingOptions): BaseEndpointing; -// Warning: (ae-missing-release-tag) "createEotPredictionEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const createEotPredictionEvent: (input: { probability: number; @@ -3245,13 +2619,9 @@ export const createEotPredictionEvent: (input: { createdAt?: number; }) => EotPredictionEvent; -// Warning: (ae-missing-release-tag) "createErrorEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const createErrorEvent: (error: RealtimeModelError | STTError | TTSError | LLMError | InterruptionDetectionError, source?: LLM | STT | TTS | RealtimeModel, createdAt?: number) => ErrorEvent_2; -// Warning: (ae-missing-release-tag) "createFunctionToolsExecutedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const createFunctionToolsExecutedEvent: (input: { functionCalls: FunctionCall[]; @@ -3259,8 +2629,6 @@ export const createFunctionToolsExecutedEvent: (input: { createdAt?: number; }) => FunctionToolsExecutedEvent; -// Warning: (ae-missing-release-tag) "createImageContent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function createImageContent(params: { image: string | VideoFrame_2; @@ -3271,34 +2639,24 @@ export function createImageContent(params: { mimeType?: string; }): ImageContent; -// Warning: (ae-missing-release-tag) "createImmutableArray" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function createImmutableArray(array: T[], additionalErrorMessage?: string): T[]; -// Warning: (ae-missing-release-tag) "createMetricsCollectedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const createMetricsCollectedEvent: (input: { metrics: AgentMetrics; createdAt?: number; }) => MetricsCollectedEvent; -// Warning: (ae-missing-release-tag) "createSessionReport" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function createSessionReport(opts: SessionReportOptions): SessionReport; -// Warning: (ae-missing-release-tag) "createSessionUsageUpdatedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const createSessionUsageUpdatedEvent: (input: { usage: AgentSessionUsage; createdAt?: number; }) => SessionUsageUpdatedEvent; -// Warning: (ae-missing-release-tag) "createSpeechCreatedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const createSpeechCreatedEvent: (input: { userInitiated: boolean; @@ -3307,13 +2665,9 @@ export const createSpeechCreatedEvent: (input: { createdAt?: number; }) => SpeechCreatedEvent; -// Warning: (ae-missing-release-tag) "createStreamChannel" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function createStreamChannel(): StreamChannel; -// Warning: (ae-missing-release-tag) "createTimedString" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function createTimedString(opts: { text: string; @@ -3324,13 +2678,9 @@ export function createTimedString(opts: { speakerId?: string | null; }): TimedString; -// Warning: (ae-missing-release-tag) "createToolOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const createToolOptions: (toolCallId: string, userData?: UserData) => ToolOptions; -// Warning: (ae-missing-release-tag) "createUserInputTranscribedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const createUserInputTranscribedEvent: (input: { transcript: string; @@ -3341,13 +2691,9 @@ export const createUserInputTranscribedEvent: (input: { createdAt?: number; }) => UserInputTranscribedEvent; -// Warning: (ae-missing-release-tag) "createUserStateChangedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const createUserStateChangedEvent: (oldState: UserState, newState: UserState, createdAt?: number) => UserStateChangedEvent; -// Warning: (ae-missing-release-tag) "createUserTranscriptionTimeoutEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const createUserTranscriptionTimeoutEvent: (input: { speechDuration: number; @@ -3355,8 +2701,6 @@ export const createUserTranscriptionTimeoutEvent: (input: { createdAt?: number; }) => UserTranscriptionTimeoutEvent; -// Warning: (ae-missing-release-tag) "createUserTurnExceededEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const createUserTurnExceededEvent: (input: { transcript: string; @@ -3366,14 +2710,11 @@ export const createUserTurnExceededEvent: (input: { createdAt?: number; }) => UserTurnExceededEvent; -// Warning: (ae-missing-release-tag) "createWarmTransferTask" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "WarmTransferTask" // // @public function createWarmTransferTask(input?: WarmTransferTaskOptions): AgentTask; -// Warning: (ae-missing-release-tag) "DataStreamAudioOutput" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class DataStreamAudioOutput extends AudioOutput { constructor(opts: DataStreamAudioOutputOptions); @@ -3405,8 +2746,6 @@ export class DataStreamAudioOutput extends AudioOutput { }): void; } -// Warning: (ae-missing-release-tag) "DataStreamAudioOutputOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface DataStreamAudioOutputOptions { // (undocumented) @@ -3420,18 +2759,12 @@ export interface DataStreamAudioOutputOptions { waitRemoteTrack?: TrackKind; } -// Warning: (ae-missing-release-tag) "dedent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function dedent(strings: TemplateStringsArray, ...values: unknown[]): string; -// Warning: (ae-missing-release-tag) "DeepgramFluxModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type DeepgramFluxModels = 'deepgram/flux-general' | 'deepgram/flux-general-en' | 'deepgram/flux-general-multi'; -// Warning: (ae-missing-release-tag) "DeepgramFluxOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface DeepgramFluxOptions { detect_language?: boolean; @@ -3443,13 +2776,9 @@ interface DeepgramFluxOptions { mip_opt_out?: boolean; } -// Warning: (ae-missing-release-tag) "DeepgramModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type DeepgramModels = 'deepgram/nova-3' | 'deepgram/nova-3-medical' | 'deepgram/nova-2' | 'deepgram/nova-2-medical' | 'deepgram/nova-2-conversationalai' | 'deepgram/nova-2-phonecall'; -// Warning: (ae-missing-release-tag) "DeepgramOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface DeepgramOptions { diarize?: boolean; @@ -3465,76 +2794,49 @@ interface DeepgramOptions { smart_format?: boolean; } -// Warning: (ae-missing-release-tag) "DeepgramTTSModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type DeepgramTTSModels = 'deepgram/aura' | 'deepgram/aura-2'; -// Warning: (ae-missing-release-tag) "DeepgramTTSOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface DeepgramTTSOptions { mip_opt_out?: boolean; } -// Warning: (ae-missing-release-tag) "DeepSeekModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type DeepSeekModels = 'deepseek-ai/deepseek-v3' | 'deepseek-ai/deepseek-v3.2'; -// Warning: (ae-missing-release-tag) "DEFAULT_API_CONNECT_OPTIONS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const DEFAULT_API_CONNECT_OPTIONS: APIConnectOptions; -// Warning: (ae-missing-release-tag) "DEFAULT_ERROR_THRESHOLD" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const DEFAULT_ERROR_THRESHOLD = 500; -// Warning: (ae-missing-release-tag) "DEFAULT_EXPRESSIVE_OPTIONS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const DEFAULT_EXPRESSIVE_OPTIONS: ExpressiveOptions; -// Warning: (ae-missing-release-tag) "DEFAULT_MOOD" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const DEFAULT_MOOD: AgentMood; -// Warning: (ae-missing-release-tag) "DEFAULT_PARTICIPANT_KINDS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const DEFAULT_PARTICIPANT_KINDS: ParticipantKind[]; // Warning: (ae-incompatible-release-tags) The symbol "DEFAULT_SESSION_CONNECT_OPTIONS" is marked as @public, but its signature references "ResolvedSessionConnectOptions" which is marked as @internal -// Warning: (ae-missing-release-tag) "DEFAULT_SESSION_CONNECT_OPTIONS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) export const DEFAULT_SESSION_CONNECT_OPTIONS: ResolvedSessionConnectOptions; -// Warning: (ae-missing-release-tag) "DEFAULT_SPEECH_STEERING_OPTIONS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const DEFAULT_SPEECH_STEERING_OPTIONS: SpeechSteeringOptions; -// Warning: (ae-missing-release-tag) "DEFAULT_TEXT_INPUT_CALLBACK" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const DEFAULT_TEXT_INPUT_CALLBACK: TextInputCallback; -// Warning: (ae-missing-release-tag) "DEFAULT_TICK_INTERVAL" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const DEFAULT_TICK_INTERVAL = 20; -// Warning: (ae-missing-release-tag) "DEFAULT_WARN_THRESHOLD" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const DEFAULT_WARN_THRESHOLD = 100; -// Warning: (ae-missing-release-tag) "defaultEndpointingOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const defaultEndpointingOptions: { readonly mode: "fixed"; @@ -3548,18 +2850,12 @@ export const defaultEndpointingOptions: { // @internal (undocumented) export const defaultInitializeProcessFunc: (_: JobProcess) => JobProcess>; -// Warning: (ae-missing-release-tag) "defaultTextSyncOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const defaultTextSyncOptions: TextSyncOptions; -// Warning: (ae-missing-release-tag) "defaultUserTurnLimitOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const defaultUserTurnLimitOptions: UserTurnLimitOptions; -// Warning: (ae-missing-release-tag) "DeferredReadableStream" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) class DeferredReadableStream { constructor(); @@ -3571,18 +2867,12 @@ class DeferredReadableStream { get stream(): ReadableStream_2; } -// Warning: (ae-missing-release-tag) "defineAgent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function defineAgent>(agent: AgentDefinition): AgentDefinition; -// Warning: (ae-missing-release-tag) "delay" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function delay(ms: number, options?: DelayOptions_2): Promise; -// Warning: (ae-missing-release-tag) "DelayOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type DelayOptions_2 = { signal?: AbortSignal; @@ -3597,7 +2887,6 @@ interface DescribesOptions { // @internal function discardPreparedCloudTracer(jobId: string): void; -// Warning: (ae-missing-release-tag) "dropBracketCues" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "convertMarkup" // // @public @@ -3606,21 +2895,16 @@ function dropBracketCues(tokens: TimedString[], held: TimedString[], options?: { }): TimedString[]; // Warning: (ae-forgotten-export) The symbol "DTMF_EVENTS" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "DtmfEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) type DtmfEvent = (typeof DTMF_EVENTS)[number]; -// Warning: (ae-missing-release-tag) "DuplexAudioFrame" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface DuplexAudioFrame { frame: AudioFrame; startMs?: number; } -// Warning: (ae-missing-release-tag) "DuplexCapabilities" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface DuplexCapabilities { autoToolReplyGeneration: boolean; @@ -3630,8 +2914,6 @@ export interface DuplexCapabilities { userTranscription: boolean; } -// Warning: (ae-missing-release-tag) "DuplexModel" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export abstract class DuplexModel { constructor( @@ -3645,8 +2927,6 @@ export abstract class DuplexModel { abstract session(): DuplexSession; } -// Warning: (ae-missing-release-tag) "DuplexOutputTranscriptDelta" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface DuplexOutputTranscriptDelta { endMs?: number; @@ -3654,8 +2934,6 @@ export interface DuplexOutputTranscriptDelta { text: string; } -// Warning: (ae-missing-release-tag) "DuplexRealtimeAdapter" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class DuplexRealtimeAdapter extends RealtimeModel { constructor( @@ -3667,8 +2945,6 @@ export class DuplexRealtimeAdapter extends RealtimeModel { session(): RealtimeSession; } -// Warning: (ae-missing-release-tag) "DuplexRealtimeAdapterOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface DuplexRealtimeAdapterOptions { audioTimeout?: number; @@ -3676,7 +2952,6 @@ export interface DuplexRealtimeAdapterOptions { } // Warning: (ae-forgotten-export) The symbol "DuplexSession_base" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "DuplexSession" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public export abstract class DuplexSession> extends DuplexSession_base { @@ -3710,8 +2985,6 @@ export abstract class DuplexSession; } -// Warning: (ae-missing-release-tag) "DuplexSessionCallbacks" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type DuplexSessionCallbacks = { transcript_delta: (event: DuplexOutputTranscriptDelta) => void; @@ -3724,13 +2997,9 @@ export type DuplexSessionCallbacks = { error: (event: RealtimeModelError) => void; }; -// Warning: (ae-missing-release-tag) "DuplicateMode" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type DuplicateMode = 'allow' | 'reject' | 'replace' | 'confirm'; -// Warning: (ae-missing-release-tag) "DuplicatePromptArgs" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface DuplicatePromptArgs { // (undocumented) @@ -3741,8 +3010,6 @@ export interface DuplicatePromptArgs { functionName: string; } -// Warning: (ae-missing-release-tag) "DynamicEndpointing" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class DynamicEndpointing extends BaseEndpointing { constructor(input: { @@ -3774,13 +3041,9 @@ export class DynamicEndpointing extends BaseEndpointing { }): void; } -// Warning: (ae-missing-release-tag) "emitToOtel" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function emitToOtel(logObj: PinoLogObject): void; -// Warning: (ae-missing-release-tag) "emptyAudioFrame" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function emptyAudioFrame(): AudioBuffer_2; @@ -3789,23 +3052,15 @@ function emptyAudioFrame(): AudioBuffer_2; // @internal export const enableOtelLogging: () => void; -// Warning: (ae-missing-release-tag) "END_CALL_DESCRIPTION" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const END_CALL_DESCRIPTION = "\nEnds the current call and disconnects immediately.\n\nCall when:\n- The user clearly indicates they are done (e.g., \"that's all, bye\").\n\nDo not call when:\n- The user asks to pause, hold, or transfer.\n- Intent is unclear.\n\nThis is the final action the agent can take.\nOnce called, no further interaction is possible with the user.\nDon't generate any other text or response when the tool is called.\n"; -// Warning: (ae-missing-release-tag) "EndCallToolCalledEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type EndCallToolCalledEvent = ToolCalledEvent; -// Warning: (ae-missing-release-tag) "EndCallToolCompletedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type EndCallToolCompletedEvent = ToolCompletedEvent; -// Warning: (ae-missing-release-tag) "EndCallToolOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type EndCallToolOptions = { extraDescription?: string; @@ -3816,8 +3071,6 @@ type EndCallToolOptions = { onToolCompleted?: (event: EndCallToolCompletedEvent) => Promise | void; }; -// Warning: (ae-missing-release-tag) "EndpointingOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface EndpointingOptions { alpha: number; @@ -3826,13 +3079,9 @@ export interface EndpointingOptions { mode: 'fixed' | 'dynamic'; } -// Warning: (ae-missing-release-tag) "ENV_ERROR_THRESHOLD_MS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ENV_ERROR_THRESHOLD_MS = "LIVEKIT_AGENTS_LOOP_BLOCK_ERROR_MS"; -// Warning: (ae-missing-release-tag) "ENV_WARN_THRESHOLD_MS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ENV_WARN_THRESHOLD_MS = "LIVEKIT_AGENTS_LOOP_BLOCK_WARN_MS"; @@ -3852,8 +3101,6 @@ declare namespace eot { } } -// Warning: (ae-missing-release-tag) "EOTInferenceMetrics" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type EOTInferenceMetrics = { type: 'eot_inference_metrics'; @@ -3865,8 +3112,6 @@ export type EOTInferenceMetrics = { metadata?: MetricsMetadata; }; -// Warning: (ae-missing-release-tag) "EOTModelUsage" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type EOTModelUsage = { type: 'eot_usage'; @@ -3875,8 +3120,6 @@ export type EOTModelUsage = { totalRequests: number; }; -// Warning: (ae-missing-release-tag) "EotPredictionEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type EotPredictionEvent = { type: 'eot_prediction'; @@ -3887,8 +3130,6 @@ export type EotPredictionEvent = { createdAt: number; }; -// Warning: (ae-missing-release-tag) "EOUMetrics" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type EOUMetrics = { type: 'eou_metrics'; @@ -3900,8 +3141,6 @@ export type EOUMetrics = { speechId?: string; }; -// Warning: (ae-missing-release-tag) "ErrorEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type ErrorEvent_2 = { type: 'error'; @@ -3926,38 +3165,24 @@ class Event_2 { // Warning: (ae-internal-missing-underscore) The name "Event" should be prefixed with an underscore because the declaration is marked as @internal export { Event_2 as Event } -// Warning: (ae-missing-release-tag) "EVENT_GEN_AI_ASSISTANT_MESSAGE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const EVENT_GEN_AI_ASSISTANT_MESSAGE = "gen_ai.assistant.message"; -// Warning: (ae-missing-release-tag) "EVENT_GEN_AI_CHOICE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const EVENT_GEN_AI_CHOICE = "gen_ai.choice"; -// Warning: (ae-missing-release-tag) "EVENT_GEN_AI_CLIENT_INFERENCE_OPERATION_DETAILS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const EVENT_GEN_AI_CLIENT_INFERENCE_OPERATION_DETAILS = "gen_ai.client.inference.operation.details"; -// Warning: (ae-missing-release-tag) "EVENT_GEN_AI_SYSTEM_MESSAGE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const EVENT_GEN_AI_SYSTEM_MESSAGE = "gen_ai.system.message"; -// Warning: (ae-missing-release-tag) "EVENT_GEN_AI_TOOL_MESSAGE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const EVENT_GEN_AI_TOOL_MESSAGE = "gen_ai.tool.message"; -// Warning: (ae-missing-release-tag) "EVENT_GEN_AI_USER_MESSAGE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const EVENT_GEN_AI_USER_MESSAGE = "gen_ai.user.message"; -// Warning: (ae-missing-release-tag) "EventAssert" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class EventAssert { constructor(event: RunEvent, parent: RunAssert, index: number); @@ -3976,8 +3201,6 @@ class EventAssert { protected _raise(message: string): never; } -// Warning: (ae-missing-release-tag) "EventLoopMonitor" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class EventLoopMonitor { constructor(options?: EventLoopMonitorOptions); @@ -3985,6 +3208,7 @@ class EventLoopMonitor { readonly errorThreshold: number; onReport?: (report: BlockedReport) => void; setReportContext(context: Context | undefined, runner?: ReportContextRunner): void; + get stackSamplingActive(): boolean; start(): void; stop(): void; // (undocumented) @@ -3994,8 +3218,6 @@ class EventLoopMonitor { get watchdogActive(): boolean; } -// Warning: (ae-missing-release-tag) "EventLoopMonitorOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface EventLoopMonitorOptions { // (undocumented) @@ -4004,6 +3226,7 @@ interface EventLoopMonitorOptions { errorThreshold?: number; // (undocumented) name?: string; + stacks?: StackSamplingMode; // (undocumented) tickInterval?: number; // (undocumented) @@ -4011,8 +3234,6 @@ interface EventLoopMonitorOptions { watchdog?: boolean; } -// Warning: (ae-missing-release-tag) "EventRangeAssert" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class EventRangeAssert { constructor(events: RunEvent[], parent: RunAssert, range: { @@ -4025,18 +3246,12 @@ class EventRangeAssert { containsMessage(options?: MessageAssertOptions): MessageAssert; } -// Warning: (ae-missing-release-tag) "EventType" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public type EventType = 'message' | 'function_call' | 'function_call_output' | 'agent_handoff'; -// Warning: (ae-missing-release-tag) "executeToolCall" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function executeToolCall(toolCall: FunctionCall, toolCtx: ToolContext): Promise; -// Warning: (ae-missing-release-tag) "Expand" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type Expand = T extends Function ? T : T extends object ? T extends Array ? Array> : T extends Map ? Map, Expand> : T extends Set ? Set> : { [K in keyof T]: Expand; @@ -4071,13 +3286,9 @@ export class ExpFilter { get value(): number | undefined; } -// Warning: (ae-missing-release-tag) "expressionAttribute" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function expressionAttribute(tags: ExpressiveTag[]): Record | undefined; -// Warning: (ae-missing-release-tag) "ExpressiveOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface ExpressiveOptions { // (undocumented) @@ -4088,8 +3299,6 @@ export interface ExpressiveOptions { ttsInstructionsTemplate?: Instructions | string; } -// Warning: (ae-missing-release-tag) "ExpressiveTag" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface ExpressiveTag { // (undocumented) @@ -4098,8 +3307,6 @@ interface ExpressiveTag { value: string; } -// Warning: (ae-missing-release-tag) "ExtraDetailsProcessor" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class ExtraDetailsProcessor implements LogRecordProcessor { // (undocumented) @@ -4110,8 +3317,6 @@ class ExtraDetailsProcessor implements LogRecordProcessor { shutdown(): Promise; } -// Warning: (ae-missing-release-tag) "FakeLLM" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) class FakeLLM extends LLM { constructor(responses?: FakeLLMResponse[]); @@ -4130,8 +3335,6 @@ class FakeLLM extends LLM { lookup(input: string): FakeLLMResponse | undefined; } -// Warning: (ae-missing-release-tag) "FakeLLMResponse" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface FakeLLMResponse { // (undocumented) @@ -4151,7 +3354,6 @@ interface FakeLLMResponse { type?: 'llm'; } -// Warning: (ae-missing-release-tag) "FakeRecognizeStream" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "FakeSTT" // // @public @@ -4166,7 +3368,6 @@ class FakeRecognizeStream extends SpeechStream { sendFakeTranscript(transcript: string, isFinal?: boolean): void; } -// Warning: (ae-missing-release-tag) "FakeSTT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "STT" // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "FakeUserSpeech" // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "recognizeCh" @@ -4208,8 +3409,6 @@ class FakeSTT extends STT { updateOptions(opts: UpdateOptions): void; } -// Warning: (ae-missing-release-tag) "FakeSTTOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface FakeSTTOptions { // (undocumented) @@ -4228,8 +3427,6 @@ interface FakeSTTOptions { label?: string; } -// Warning: (ae-missing-release-tag) "FakeUserSpeech" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface FakeUserSpeech { // (undocumented) @@ -4244,8 +3441,6 @@ interface FakeUserSpeech { transcript: string; } -// Warning: (ae-missing-release-tag) "FallbackAdapter" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class FallbackAdapter extends LLM { constructor(options: FallbackAdapterOptions); @@ -4281,7 +3476,6 @@ export class FallbackAdapter extends LLM { _status: LLMStatus[]; } -// Warning: (ae-missing-release-tag) "FallbackAdapter" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "StreamAdapter" // // @public @@ -4320,8 +3514,6 @@ class FallbackAdapter_2 extends STT { _updateSessionKeyterms(keyterms: string[]): void; } -// Warning: (ae-missing-release-tag) "FallbackAdapter" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class FallbackAdapter_3 extends TTS { // Warning: (ae-forgotten-export) The symbol "FallbackAdapterOptions_3" needs to be exported by the entry point index.d.ts @@ -4351,8 +3543,6 @@ class FallbackAdapter_3 extends TTS { readonly ttsInstances: TTS[]; } -// Warning: (ae-missing-release-tag) "FallbackAdapterOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface FallbackAdapterOptions { attemptTimeout?: number; @@ -4362,8 +3552,6 @@ export interface FallbackAdapterOptions { retryOnChunkSent?: boolean; } -// Warning: (ae-missing-release-tag) "FallbackAdapterOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface FallbackAdapterOptions_2 { attemptTimeoutMs?: number; @@ -4374,7 +3562,6 @@ interface FallbackAdapterOptions_2 { vad?: VAD; } -// Warning: (ae-missing-release-tag) "FanoutSpanProcessor" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "FanoutSpanProcessor" // // @public @@ -4392,23 +3579,15 @@ class FanoutSpanProcessor implements SpanProcessor { shutdown(): Promise; } -// Warning: (ae-missing-release-tag) "filterEmoji" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function filterEmoji(text: ReadableStream_2): ReadableStream_2; -// Warning: (ae-missing-release-tag) "filterMarkdown" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function filterMarkdown(text: ReadableStream_2): ReadableStream_2; -// Warning: (ae-missing-release-tag) "filterZeroValues" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function filterZeroValues(usage: T): Partial; -// Warning: (ae-missing-release-tag) "FinalizeSimulationError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class FinalizeSimulationError extends Error { constructor(message: string, userVerdict?: AgentSession_2.SessionResponse_FinalizeSimulationResponse_SimulationVerdict); @@ -4416,21 +3595,15 @@ export class FinalizeSimulationError extends Error { readonly userVerdict: AgentSession_2.SessionResponse_FinalizeSimulationResponse_SimulationVerdict | undefined; } -// Warning: (ae-missing-release-tag) "finishReasonFor" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function finishReasonFor(params: { functionCalls?: readonly unknown[]; interrupted?: boolean; }): string; -// Warning: (ae-missing-release-tag) "FishAudioModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type FishAudioModels = 'fishaudio' | 'fishaudio/s2.1-pro' | 'fishaudio/s2.1-pro-free' | 'fishaudio/s2-pro'; -// Warning: (ae-missing-release-tag) "FishAudioOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface FishAudioOptions { chunk_length?: number; @@ -4447,8 +3620,6 @@ interface FishAudioOptions { volume?: number; } -// Warning: (ae-missing-release-tag) "FixedGate" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class FixedGate implements AudioGate { constructor(silence: number, options?: AudioGateOptions); @@ -4465,27 +3636,18 @@ function flushCloudTraces(): Promise; // @internal function flushOtelLogs(): Promise; -// Warning: (ae-missing-release-tag) "flushPinoLogs" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function flushPinoLogs(): Promise; -// Warning: (ae-missing-release-tag) "FlushSentinel" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// Warning: (ae-missing-release-tag) "FlushSentinel" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export const FlushSentinel: unique symbol; // @public (undocumented) export type FlushSentinel = typeof FlushSentinel; -// Warning: (ae-missing-release-tag) "formatChatHistory" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function formatChatHistory(chatCtx: ChatContext, options?: FormatChatHistoryOptions): string; -// Warning: (ae-missing-release-tag) "FormatChatHistoryOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface FormatChatHistoryOptions { // (undocumented) @@ -4499,8 +3661,6 @@ export interface FormatChatHistoryOptions { // @internal (undocumented) const formatDownloadFailureMessage: (failures: PluginDownloadFailure[]) => string; -// Warning: (ae-missing-release-tag) "FunctionCall" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class FunctionCall { constructor(params: { @@ -4544,8 +3704,6 @@ export class FunctionCall { readonly type: "function_call"; } -// Warning: (ae-missing-release-tag) "FunctionCallAssert" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class FunctionCallAssert extends EventAssert { constructor(event: FunctionCallEvent, parent: RunAssert, index: number); @@ -4555,8 +3713,6 @@ class FunctionCallAssert extends EventAssert { protected _event: FunctionCallEvent; } -// Warning: (ae-missing-release-tag) "FunctionCallAssertOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface FunctionCallAssertOptions { // (undocumented) @@ -4565,8 +3721,6 @@ interface FunctionCallAssertOptions { name?: string; } -// Warning: (ae-missing-release-tag) "FunctionCallEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface FunctionCallEvent { // (undocumented) @@ -4575,8 +3729,6 @@ interface FunctionCallEvent { type: 'function_call'; } -// Warning: (ae-missing-release-tag) "FunctionCallOutput" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class FunctionCallOutput { constructor(params: { @@ -4614,8 +3766,6 @@ export class FunctionCallOutput { readonly type: "function_call_output"; } -// Warning: (ae-missing-release-tag) "FunctionCallOutputAssert" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class FunctionCallOutputAssert extends EventAssert { constructor(event: FunctionCallOutputEvent, parent: RunAssert, index: number); @@ -4625,8 +3775,6 @@ class FunctionCallOutputAssert extends EventAssert { protected _event: FunctionCallOutputEvent; } -// Warning: (ae-missing-release-tag) "FunctionCallOutputAssertOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface FunctionCallOutputAssertOptions { // (undocumented) @@ -4635,8 +3783,6 @@ interface FunctionCallOutputAssertOptions { output?: string; } -// Warning: (ae-missing-release-tag) "FunctionCallOutputEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface FunctionCallOutputEvent { // (undocumented) @@ -4645,15 +3791,11 @@ interface FunctionCallOutputEvent { type: 'function_call_output'; } -// Warning: (ae-missing-release-tag) "FunctionExistsError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class FunctionExistsError extends Error { constructor(msg?: string); } -// Warning: (ae-missing-release-tag) "FunctionTool" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface FunctionTool extends Tool { // (undocumented) @@ -4672,8 +3814,6 @@ export interface FunctionTool { get result(): T; } -// Warning: (ae-missing-release-tag) "GatewayOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface GatewayOptions { // (undocumented) @@ -4710,8 +3848,6 @@ interface GatewayOptions { apiSecret: string; } -// Warning: (ae-missing-release-tag) "GEN_AI_PROVIDER_NAMES" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const GEN_AI_PROVIDER_NAMES: ReadonlySet; @@ -4743,8 +3879,6 @@ declare namespace genAI { } } -// Warning: (ae-missing-release-tag) "GenAIFinishReason" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const GenAIFinishReason: { readonly STOP: "stop"; @@ -4755,8 +3889,6 @@ const GenAIFinishReason: { readonly ERROR: "error"; }; -// Warning: (ae-missing-release-tag) "GenAIOperationName" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const GenAIOperationName: { readonly CHAT: "chat"; @@ -4779,8 +3911,6 @@ const GenAIOperationName: { readonly DELETE_MEMORY_STORE: "delete_memory_store"; }; -// Warning: (ae-missing-release-tag) "GenAIOutputType" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const GenAIOutputType: { readonly TEXT: "text"; @@ -4789,13 +3919,9 @@ const GenAIOutputType: { readonly SPEECH: "speech"; }; -// Warning: (ae-missing-release-tag) "genAIProviderName" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function genAIProviderName(provider: string | undefined | null): string | undefined; -// Warning: (ae-missing-release-tag) "GenerationCreatedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface GenerationCreatedEvent { // (undocumented) @@ -4807,52 +3933,33 @@ export interface GenerationCreatedEvent { userInitiated: boolean; } -// Warning: (ae-missing-release-tag) "getBaseLanguage" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function getBaseLanguage(language: string): string; -// Warning: (ae-missing-release-tag) "getBuiltinAudioPath" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function getBuiltinAudioPath(clip: BuiltinAudioClip): string; -// Warning: (ae-missing-release-tag) "getIsoLanguage" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function getIsoLanguage(language: string): string; -// Warning: (ae-missing-release-tag) "getJobContext" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// Warning: (ae-missing-release-tag) "getJobContext" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function getJobContext>(required?: true): JobContext; // @public (undocumented) export function getJobContext>(required: false): JobContext | undefined; -// Warning: (ae-missing-release-tag) "getLanguageRegion" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function getLanguageRegion(language: string): string | undefined; -// Warning: (ae-missing-release-tag) "getMonitor" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function getMonitor(): EventLoopMonitor | undefined; -// Warning: (ae-missing-release-tag) "GoogleModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type GoogleModels = 'google/gemini-3.1-pro' | 'google/gemini-3-flash' | 'google/gemini-3.1-flash-lite' | 'google/gemini-3.5-flash' | 'google/gemini-2.5-pro' | 'google/gemini-2.5-flash' | 'google/gemini-2.5-flash-lite'; -// Warning: (ae-missing-release-tag) "GoogleSTTModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type GoogleSTTModels = 'google/gemini-3.5-transcribe-live'; -// Warning: (ae-missing-release-tag) "GoogleSTTOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface GoogleSTTOptions { custom_vocabulary?: string[]; @@ -4864,45 +3971,31 @@ interface GoogleSTTOptions { // @internal (undocumented) export function gracefullyCancel(promise: CancellablePromise): Promise; -// Warning: (ae-missing-release-tag) "handoff" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function handoff(options: { agent: Agent; returns?: any; }): AgentHandoff; -// Warning: (ae-missing-release-tag) "hasAlignedTranscript" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function hasAlignedTranscript(model: string | undefined, modelOptions: Record | undefined): boolean; -// Warning: (ae-missing-release-tag) "hasResponse" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function hasResponse(chunk: ChatChunk): boolean; -// Warning: (ae-missing-release-tag) "hyphenateWord" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const hyphenateWord: (word: string) => string[]; -// Warning: (ae-missing-release-tag) "IdentityTransform" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) class IdentityTransform extends TransformStream_2 { constructor(); } -// Warning: (ae-missing-release-tag) "IdleTimeoutError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class IdleTimeoutError extends Error { constructor(message?: string); } -// Warning: (ae-missing-release-tag) "ImageContent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ImageContent { // (undocumented) @@ -4985,21 +4078,15 @@ declare namespace inference { } } -// Warning: (ae-missing-release-tag) "InferenceClass" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public type InferenceClass = 'priority' | 'standard' | 'low'; -// Warning: (ae-missing-release-tag) "InferenceExecutor" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface InferenceExecutor { // (undocumented) doInference(method: string, data: unknown): Promise; } -// Warning: (ae-missing-release-tag) "InferenceLLMOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface InferenceLLMOptions { // (undocumented) @@ -5020,8 +4107,6 @@ interface InferenceLLMOptions { strictToolSchema?: boolean; } -// Warning: (ae-missing-release-tag) "InferenceMarker" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface InferenceMarker { // (undocumented) @@ -5046,8 +4131,6 @@ export abstract class InferenceRunner abstract run(data: InputType): Promise; } -// Warning: (ae-missing-release-tag) "InferenceSTTOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface InferenceSTTOptions { // (undocumented) @@ -5072,8 +4155,6 @@ interface InferenceSTTOptions { sampleRate: number; } -// Warning: (ae-missing-release-tag) "InferenceTTSOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface InferenceTTSOptions { // (undocumented) @@ -5104,8 +4185,6 @@ interface InferenceTTSOptions { // @internal (undocumented) export const initializeLogger: (input: LoggerOptions) => void; -// Warning: (ae-missing-release-tag) "initPinoCloudExporter" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function initPinoCloudExporter(config: PinoCloudExporterConfig | PinoCloudExporterUrlConfig): void; @@ -5115,21 +4194,15 @@ export interface InputDetails { modality: 'audio' | 'text'; } -// Warning: (ae-missing-release-tag) "InputSpeechStartedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type InputSpeechStartedEvent = object; -// Warning: (ae-missing-release-tag) "InputSpeechStoppedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface InputSpeechStoppedEvent { // (undocumented) userTranscriptionEnabled: boolean; } -// Warning: (ae-missing-release-tag) "InputTranscriptionCompleted" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface InputTranscriptionCompleted { confidence?: number; @@ -5142,20 +4215,15 @@ export interface InputTranscriptionCompleted { turnStartedAt?: number; } -// Warning: (ae-missing-release-tag) "install" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function install(localParticipant: LocalParticipant | undefined, jobCtx?: JobContext): void; -// Warning: (ae-missing-release-tag) "InstructionParts" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface InstructionParts { extra?: Instructions | string; persona?: Instructions | string; } -// Warning: (ae-missing-release-tag) "Instructions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "asModality" // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "asModality" // @@ -5186,13 +4254,9 @@ export class Instructions { readonly value: string; } -// Warning: (ae-missing-release-tag) "interceptor" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const interceptor: TracingRpcInterceptor; -// Warning: (ae-missing-release-tag) "InterruptionMetrics" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type InterruptionMetrics = { type: 'interruption_metrics'; @@ -5206,8 +4270,6 @@ export type InterruptionMetrics = { metadata?: MetricsMetadata; }; -// Warning: (ae-missing-release-tag) "InterruptionModelUsage" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type InterruptionModelUsage = { type: 'interruption_usage'; @@ -5216,8 +4278,6 @@ export type InterruptionModelUsage = { totalRequests: number; }; -// Warning: (ae-missing-release-tag) "InterruptionSource" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type InterruptionSource = 'audio_activity' | 'user_turn' | 'programmatic'; @@ -5226,8 +4286,6 @@ export type InterruptionSource = 'audio_activity' | 'user_turn' | 'programmatic' // @internal export function intervalForRetry(connOptions: APIConnectOptions, numRetries: number): number; -// Warning: (ae-missing-release-tag) "InvalidErrorType" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class InvalidErrorType extends Error { constructor(error: unknown); @@ -5235,13 +4293,9 @@ export class InvalidErrorType extends Error { readonly error: unknown; } -// Warning: (ae-missing-release-tag) "InworldModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type InworldModels = 'inworld/inworld-tts-2' | 'inworld/inworld-tts-1.5-max' | 'inworld/inworld-tts-1.5-mini' | 'inworld/inworld-tts-1.5' | 'inworld/inworld-tts-1-max' | 'inworld/inworld-tts-1'; -// Warning: (ae-missing-release-tag) "InworldOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface InworldOptions { // (undocumented) @@ -5255,13 +4309,9 @@ interface InworldOptions { timestamp_type?: 'TIMESTAMP_TYPE_UNSPECIFIED' | 'WORD' | 'CHARACTER'; } -// Warning: (ae-missing-release-tag) "InworldSTTModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type InworldSTTModels = 'inworld/inworld-stt-1'; -// Warning: (ae-missing-release-tag) "InworldSTTOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface InworldSTTOptions { audio_encoding?: 'LINEAR16' | 'AUTO_DETECT'; @@ -5286,38 +4336,24 @@ declare namespace ipc { // @internal export function isAgent(obj: unknown): obj is AgentDefinition; -// Warning: (ae-missing-release-tag) "isAgentHandoffEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function isAgentHandoffEvent(event: RunEvent): event is AgentHandoffEvent; -// Warning: (ae-missing-release-tag) "isAPIError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function isAPIError(error: unknown): error is APIError; -// Warning: (ae-missing-release-tag) "isBuiltinAudioClip" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function isBuiltinAudioClip(source: AudioSourceType | AudioConfig | AudioConfig[]): source is BuiltinAudioClip; -// Warning: (ae-missing-release-tag) "isChatMessageEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function isChatMessageEvent(event: RunEvent): event is ChatMessageEvent; -// Warning: (ae-missing-release-tag) "isCloud" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const isCloud: (url: URL) => boolean; -// Warning: (ae-missing-release-tag) "isDevMode" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export const isDevMode: () => boolean; -// Warning: (ae-missing-release-tag) "isFfmpegTeardownError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function isFfmpegTeardownError(error: unknown): boolean; @@ -5326,68 +4362,42 @@ export function isFfmpegTeardownError(error: unknown): boolean; // @internal (undocumented) export function isFlushSentinel(value: unknown): value is FlushSentinel; -// Warning: (ae-missing-release-tag) "isFunctionCallEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function isFunctionCallEvent(event: RunEvent): event is FunctionCallEvent; -// Warning: (ae-missing-release-tag) "isFunctionCallOutputEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function isFunctionCallOutputEvent(event: RunEvent): event is FunctionCallOutputEvent; -// Warning: (ae-missing-release-tag) "isFunctionTool" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function isFunctionTool(tool: unknown): tool is FunctionTool; -// Warning: (ae-missing-release-tag) "isHosted" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export const isHosted: () => boolean; -// Warning: (ae-missing-release-tag) "isImmutableArray" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function isImmutableArray(array: unknown): boolean; -// Warning: (ae-missing-release-tag) "isPending" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const isPending: (promise: Promise) => Promise>; -// Warning: (ae-missing-release-tag) "isProviderTool" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function isProviderTool(tool: any): tool is ProviderTool; -// Warning: (ae-missing-release-tag) "isStreamClosedError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function isStreamClosedError(error: unknown): boolean; -// Warning: (ae-missing-release-tag) "isTimedString" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function isTimedString(value: unknown): value is TimedString; -// Warning: (ae-missing-release-tag) "isTool" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function isTool(tool: any): tool is Tool; -// Warning: (ae-missing-release-tag) "isToolset" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function isToolset(value: any): value is Toolset; -// Warning: (ae-missing-release-tag) "isWritableStreamClosedError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function isWritableStreamClosedError(error: unknown): boolean; -// Warning: (ae-missing-release-tag) "JobAcceptArguments" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type JobAcceptArguments = { name: string; @@ -5398,8 +4408,6 @@ export type JobAcceptArguments = { }; }; -// Warning: (ae-missing-release-tag) "JobContext" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class JobContext> { constructor(proc: JobProcess, info: RunningJobInfo, room: Room, onConnect: () => void, onShutdown: (s: string) => void, inferenceExecutor: InferenceExecutor); @@ -5464,8 +4472,6 @@ export class JobContext> { get workerId(): string; } -// Warning: (ae-missing-release-tag) "JobProcess" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class JobProcess> { // (undocumented) @@ -5474,8 +4480,6 @@ export class JobProcess> { userData: UserData; } -// Warning: (ae-missing-release-tag) "JobRequest" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class JobRequest { // @internal @@ -5496,8 +4500,6 @@ export class JobRequest { get room(): proto.Room | undefined; } -// Warning: (ae-missing-release-tag) "KeytermDetectionOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface KeytermDetectionOptions { enabled?: boolean; @@ -5509,7 +4511,6 @@ export interface KeytermDetectionOptions { } // Warning: (ae-forgotten-export) The symbol "KeytermDetector_base" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "KeytermDetector" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public export class KeytermDetector extends KeytermDetector_base { @@ -5537,33 +4538,23 @@ export class KeytermDetector extends KeytermDetector_base { swapStt(stt: STT | undefined): void; } -// Warning: (ae-missing-release-tag) "KeytermsOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface KeytermsOptions { keytermDetection?: KeytermDetectionOptions; keyterms?: string[]; } -// Warning: (ae-missing-release-tag) "KNOWN_LANGUAGE_CODES" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const KNOWN_LANGUAGE_CODES: readonly ["af", "am", "ar", "as", "az", "be", "bg", "bn", "bs", "ca", "cs", "cy", "da", "de", "el", "en", "es", "et", "eu", "fa", "ff", "fi", "fr", "ga", "gl", "gu", "ha", "he", "hi", "hr", "hu", "hy", "id", "ig", "is", "it", "ja", "jv", "ka", "kk", "km", "kn", "ko", "ku", "ky", "lb", "lg", "ln", "lo", "lt", "lv", "mi", "mk", "ml", "mn", "mr", "ms", "mt", "my", "ne", "nl", "no", "ny", "oc", "or", "pa", "pl", "ps", "pt", "ro", "ru", "sd", "sk", "sl", "sn", "so", "sq", "sr", "sv", "sw", "ta", "te", "tg", "th", "tl", "tr", "uk", "ur", "uz", "vi", "wo", "xh", "yo", "zh", "zu"]; -// Warning: (ae-missing-release-tag) "KnownLanguageCode" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type KnownLanguageCode = (typeof KNOWN_LANGUAGE_CODES)[number]; -// Warning: (ae-missing-release-tag) "LanguageCode" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type LanguageCode = string & { readonly [languageCodeBrand]: 'LanguageCode'; }; -// Warning: (ae-missing-release-tag) "LemonSliceOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface LemonSliceOptions { // (undocumented) @@ -5575,7 +4566,6 @@ interface LemonSliceOptions { } // Warning: (ae-forgotten-export) The symbol "LLM_base" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "LLM" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) export abstract class LLM extends LLM_base { @@ -5711,7 +4701,6 @@ declare namespace llm { } // Warning: (ae-forgotten-export) The symbol "llm_2" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "LLM" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public class LLM_2 extends llm_2.LLM { @@ -5769,22 +4758,17 @@ declare namespace llm_3 { } } -// Warning: (ae-missing-release-tag) "LLMCallbacks" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type LLMCallbacks = { ['metrics_collected']: (metrics: LLMMetrics) => void; ['error']: (error: LLMError) => void; }; -// Warning: (ae-missing-release-tag) "llmInstructions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "convertMarkup" // // @public function llmInstructions(provider: string, steering?: SpeechSteeringOptions): string | undefined; -// Warning: (ae-missing-release-tag) "LLMMetrics" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type LLMMetrics = { type: 'llm_metrics'; @@ -5806,13 +4790,10 @@ export type LLMMetrics = { }; // Warning: (ae-forgotten-export) The symbol "AnyString" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "LLMModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) type LLMModels = OpenAIModels | GoogleModels | MoonshotModels | DeepSeekModels | ZAIModels | XAIModels | AnyString; -// Warning: (ae-missing-release-tag) "LLMModelUsage" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type LLMModelUsage = { type: 'llm_usage'; @@ -5834,8 +4815,6 @@ export type LLMModelUsage = { sessionDurationMs: number; }; -// Warning: (ae-missing-release-tag) "LLMStream" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export abstract class LLMStream implements AsyncIterableIterator { // (undocumented) @@ -5880,8 +4859,6 @@ export abstract class LLMStream implements AsyncIterableIterator { get toolCtx(): ToolContext | undefined; } -// Warning: (ae-missing-release-tag) "LLMStream" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) class LLMStream_2 extends llm_2.LLMStream { constructor(llm: LLM_2, input: { @@ -5901,13 +4878,9 @@ class LLMStream_2 extends llm_2.LLMStream { protected run(): Promise; } -// Warning: (ae-missing-release-tag) "LOCAL_LANGUAGES" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const LOCAL_LANGUAGES: Readonly>; -// Warning: (ae-missing-release-tag) "LocalTransport" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class LocalTransport implements StreamingTurnDetectionTransport { constructor(opts: { @@ -5964,18 +4937,12 @@ export type LoggerOptions = { // @internal (undocumented) export const loggerOptions: () => LoggerOptions | undefined; -// Warning: (ae-missing-release-tag) "logMetrics" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const logMetrics: (metrics: AgentMetrics) => void; -// Warning: (ae-missing-release-tag) "loopAudioFramesFromFile" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function loopAudioFramesFromFile(filePath: string, options?: AudioDecodeOptions): AsyncGenerator; -// Warning: (ae-missing-release-tag) "LoopCpuScope" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public type LoopCpuScope = 'thread' | 'process'; @@ -5995,6 +4962,7 @@ declare namespace loopMonitor { LoopMonitorSeverity, LoopStallCause, LoopCpuScope, + StackSamplingMode, BlockedReport, LoopMonitorThresholds, EventLoopMonitorOptions, @@ -6004,13 +4972,9 @@ declare namespace loopMonitor { } } -// Warning: (ae-missing-release-tag) "LoopMonitorSeverity" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type LoopMonitorSeverity = 'warning' | 'error'; -// Warning: (ae-missing-release-tag) "LoopMonitorThresholds" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) class LoopMonitorThresholds { constructor(warn: number, error: number); @@ -6022,64 +4986,44 @@ class LoopMonitorThresholds { readonly warn: number; } -// Warning: (ae-missing-release-tag) "LoopStallCause" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public type LoopStallCause = 'code' | 'host'; -// Warning: (ae-missing-release-tag) "markInferenceSpanRecorded" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function markInferenceSpanRecorded(): void; -// Warning: (ae-missing-release-tag) "MarkupInfo" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface MarkupInfo { // Warning: (ae-forgotten-export) The symbol "NonverbalField" needs to be exported by the entry point index.d.ts nonverbals: Partial>; } -// Warning: (ae-missing-release-tag) "matchMood" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "DEFAULT_MOOD" // // @public function matchMood(label: string, fallback?: AgentMood | null): AgentMood | null; -// Warning: (ae-missing-release-tag) "MAX_LOGS_PER_MINUTE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const MAX_LOGS_PER_MINUTE = 5; -// Warning: (ae-missing-release-tag) "MAX_PAYLOAD_ATTR_LEN" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const MAX_PAYLOAD_ATTR_LEN = 1024; -// Warning: (ae-missing-release-tag) "MAX_SPANS_PER_MINUTE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const MAX_SPANS_PER_MINUTE = 6; -// Warning: (ae-missing-release-tag) "maxInputLen" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function maxInputLen(provider: string): number | undefined; -// Warning: (ae-missing-release-tag) "mergeFrames" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "AudioFrame" // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "AudioFrame" // // @public export const mergeFrames: (buffer: AudioBuffer_2) => AudioFrame; -// Warning: (ae-missing-release-tag) "mergeReadableStreams" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function mergeReadableStreams(...streams: ReadableStream_2[]): ReadableStream_2; -// Warning: (ae-missing-release-tag) "MessageAssert" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class MessageAssert extends EventAssert { constructor(event: ChatMessageEvent, parent: RunAssert, index: number); @@ -6092,16 +5036,12 @@ class MessageAssert extends EventAssert { }): Promise; } -// Warning: (ae-missing-release-tag) "MessageAssertOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface MessageAssertOptions { // (undocumented) role?: ChatRole; } -// Warning: (ae-missing-release-tag) "MessageGeneration" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface MessageGeneration { // (undocumented) @@ -6113,8 +5053,6 @@ export interface MessageGeneration { textStream: ReadableStream_2; } -// Warning: (ae-missing-release-tag) "MessagePart" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface MessagePart { // (undocumented) @@ -6123,8 +5061,6 @@ interface MessagePart { type: string; } -// Warning: (ae-missing-release-tag) "MetadataLogProcessor" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class MetadataLogProcessor implements LogRecordProcessor { constructor(metadata: Attributes); @@ -6136,8 +5072,6 @@ class MetadataLogProcessor implements LogRecordProcessor { shutdown(): Promise; } -// Warning: (ae-missing-release-tag) "METRIC_GEN_AI_INVOKE_AGENT_DURATION" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const METRIC_GEN_AI_INVOKE_AGENT_DURATION = "gen_ai.invoke_agent.duration"; @@ -6168,8 +5102,6 @@ declare namespace metrics { } } -// Warning: (ae-missing-release-tag) "MetricsCollectedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type MetricsCollectedEvent = { type: 'metrics_collected'; @@ -6177,16 +5109,12 @@ export type MetricsCollectedEvent = { createdAt: number; }; -// Warning: (ae-missing-release-tag) "MetricsMetadata" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type MetricsMetadata = { modelProvider?: string; modelName?: string; }; -// Warning: (ae-missing-release-tag) "MetricsReport" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface MetricsReport { // (undocumented) @@ -6209,38 +5137,27 @@ export interface MetricsReport { ttsNodeTtfb?: number; } -// Warning: (ae-missing-release-tag) "MissingCredentialsError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class MissingCredentialsError extends Error { constructor(msg?: string); } -// Warning: (ae-missing-release-tag) "MockToolFn" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public type MockToolFn = (...args: any[]) => any; // Warning: (ae-forgotten-export) The symbol "AgentConstructor" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "MockToolsMap" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public type MockToolsMap = Map>; -// Warning: (ae-missing-release-tag) "ModelSettings" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ModelSettings { toolChoice?: ToolChoice; } -// Warning: (ae-missing-release-tag) "ModelUsage" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type ModelUsage = LLMModelUsage | TTSModelUsage | STTModelUsage | InterruptionModelUsage | EOTModelUsage; -// Warning: (ae-missing-release-tag) "ModelUsageCollector" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class ModelUsageCollector { collect(metrics: AgentMetrics): void; @@ -6248,28 +5165,20 @@ export class ModelUsageCollector { flatten(): ModelUsage[]; } -// Warning: (ae-missing-release-tag) "ModelWithLanguage" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type ModelWithLanguage = `${_STTModels}:${STTLanguages}` | STTModels; // Warning: (ae-forgotten-export) The symbol "_TTSModels" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "ModelWithVoice" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) type ModelWithVoice = `${_TTSModels}:${string}` | TTSModels; -// Warning: (ae-missing-release-tag) "MOOD_PRIORITY" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const MOOD_PRIORITY: AgentMood[]; -// Warning: (ae-missing-release-tag) "MoonshotModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type MoonshotModels = 'moonshotai/kimi-k2.5' | 'moonshotai/kimi-k2.6'; -// Warning: (ae-missing-release-tag) "MultiInputStream" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "ReadableStream" // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "ReadableStream" // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "DeferredReadableStream" @@ -6290,8 +5199,6 @@ class MultiInputStream { get stream(): ReadableStream_2; } -// Warning: (ae-missing-release-tag) "NonverbalOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface NonverbalOptions { breathing?: boolean; @@ -6305,28 +5212,18 @@ export interface NonverbalOptions { vocalizing?: boolean; } -// Warning: (ae-missing-release-tag) "noop" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const noop: () => void; -// Warning: (ae-missing-release-tag) "normalizeLanguage" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function normalizeLanguage(language: string): LanguageCode; -// Warning: (ae-missing-release-tag) "normalizeMarkup" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function normalizeMarkup(provider: string, text: string): string; -// Warning: (ae-missing-release-tag) "normalizeSTTFallback" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function normalizeSTTFallback(fallback: STTFallbackModelType | STTFallbackModelType[]): STTFallbackModel[]; -// Warning: (ae-missing-release-tag) "normalizeTTSFallback" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function normalizeTTSFallback(fallback: TTSFallbackModelType | TTSFallbackModelType[]): TTSFallbackModel[]; @@ -6340,8 +5237,6 @@ export const oaiBuildFunctionInfo: (toolCtx: ToolContext, toolCallId: string, to // @internal (undocumented) export const oaiParams: (schema: any, isOpenai?: boolean) => OpenAIFunctionParameters; -// Warning: (ae-missing-release-tag) "ObservabilityEndpoint" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public type ObservabilityEndpoint = { observabilityUrl: string; @@ -6351,8 +5246,6 @@ type ObservabilityEndpoint = { cloudHostname: string; }; -// Warning: (ae-missing-release-tag) "OpenAIFunctionParameters" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type OpenAIFunctionParameters = { type: 'object'; @@ -6363,13 +5256,10 @@ export type OpenAIFunctionParameters = { additionalProperties?: boolean; }; -// Warning: (ae-missing-release-tag) "OpenAIModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type OpenAIModels = 'openai/gpt-5.5' | 'openai/gpt-5.4' | 'openai/gpt-5.4-mini' | 'openai/gpt-5.4-nano' | 'openai/gpt-5.3-chat-latest' | 'openai/gpt-5.2' | 'openai/gpt-5.2-chat-latest' | 'openai/gpt-5.1' | 'openai/gpt-5.1-chat-latest' | 'openai/gpt-5' | 'openai/gpt-5-mini' | 'openai/gpt-5-nano' | 'openai/gpt-4.1' | 'openai/gpt-4.1-mini' | 'openai/gpt-4.1-nano' | 'openai/gpt-4o' | 'openai/gpt-4o-mini' | 'openai/chat-latest' | 'openai/gpt-oss-120b'; // Warning: (ae-forgotten-export) The symbol "TextOutput" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "ParalellTextOutput" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) export class ParalellTextOutput extends TextOutput { @@ -6382,28 +5272,18 @@ export class ParalellTextOutput extends TextOutput { _sinks: TextOutput[]; } -// Warning: (ae-missing-release-tag) "parseAvatarModel" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function parseAvatarModel(model: string): [provider: string, avatarId: string | undefined]; -// Warning: (ae-missing-release-tag) "parseSimulationDispatch" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function parseSimulationDispatch(raw: string): SimulationDispatch; -// Warning: (ae-missing-release-tag) "parseSTTModelString" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function parseSTTModelString(model: string): [string, LanguageCode | undefined]; -// Warning: (ae-missing-release-tag) "parseTTSModelString" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function parseTTSModelString(model: string): [string, string | undefined]; -// Warning: (ae-missing-release-tag) "participantAttributes" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function participantAttributes(participant: { sid?: string; @@ -6414,8 +5294,6 @@ function participantAttributes(participant: { }; }): Attributes; -// Warning: (ae-missing-release-tag) "ParticipantAudioOutput" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class ParticipantAudioOutput extends AudioOutput { constructor(room: Room, options: AudioOutputOptions); @@ -6437,7 +5315,6 @@ export class ParticipantAudioOutput extends AudioOutput { } // Warning: (ae-forgotten-export) The symbol "BaseParticipantTranscriptionOutput" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "ParticipantLegacyTranscriptionOutput" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) export class ParticipantLegacyTranscriptionOutput extends BaseParticipantTranscriptionOutput { @@ -6451,8 +5328,6 @@ export class ParticipantLegacyTranscriptionOutput extends BaseParticipantTranscr protected resetState(): void; } -// Warning: (ae-missing-release-tag) "ParticipantTranscriptionOutput" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class ParticipantTranscriptionOutput extends BaseParticipantTranscriptionOutput { constructor(room: Room, isDeltaStream: boolean, participant: Participant | string | null, options?: ParticipantTranscriptionOutputOptions); @@ -6466,15 +5341,11 @@ export class ParticipantTranscriptionOutput extends BaseParticipantTranscription protected resetState(): void; } -// Warning: (ae-missing-release-tag) "ParticipantTranscriptionOutputOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ParticipantTranscriptionOutputOptions extends TranscriptionOutputOptions { jsonFormat?: boolean; } -// Warning: (ae-missing-release-tag) "PIIFilteringLogProcessor" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class PIIFilteringLogProcessor implements LogRecordProcessor { // (undocumented) @@ -6485,8 +5356,6 @@ class PIIFilteringLogProcessor implements LogRecordProcessor { shutdown(): Promise; } -// Warning: (ae-missing-release-tag) "PinoCloudExporter" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class PinoCloudExporter { constructor(config: PinoCloudExporterConfig | PinoCloudExporterUrlConfig); @@ -6498,8 +5367,6 @@ class PinoCloudExporter { shutdown(): Promise; } -// Warning: (ae-missing-release-tag) "PinoCloudExporterConfig" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface PinoCloudExporterConfig { // (undocumented) @@ -6518,8 +5385,6 @@ interface PinoCloudExporterConfig { roomId: string; } -// Warning: (ae-missing-release-tag) "PinoCloudExporterUrlConfig" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface PinoCloudExporterUrlConfig { // (undocumented) @@ -6537,8 +5402,6 @@ interface PinoCloudExporterUrlConfig { roomId: string; } -// Warning: (ae-missing-release-tag) "PinoLogObject" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface PinoLogObject { // (undocumented) @@ -6555,8 +5418,6 @@ interface PinoLogObject { time: number; } -// Warning: (ae-missing-release-tag) "PlaybackFinishedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface PlaybackFinishedEvent { interrupted: boolean; @@ -6564,8 +5425,6 @@ export interface PlaybackFinishedEvent { synchronizedTranscript?: string; } -// Warning: (ae-missing-release-tag) "PlaybackProgressedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface PlaybackProgressedEvent { duration: number; @@ -6573,15 +5432,11 @@ export interface PlaybackProgressedEvent { startedAt: number; } -// Warning: (ae-missing-release-tag) "PlaybackStartedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface PlaybackStartedEvent { createdAt: number; } -// Warning: (ae-missing-release-tag) "PlayHandle" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class PlayHandle { // (undocumented) @@ -6594,8 +5449,6 @@ export class PlayHandle { waitForPlayout(): Promise; } -// Warning: (ae-missing-release-tag) "Plugin" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) abstract class Plugin_2 { constructor(opts: { @@ -6620,15 +5473,11 @@ abstract class Plugin_2 { } export { Plugin_2 as Plugin } -// Warning: (ae-missing-release-tag) "PluginEventMap" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PluginEventMap = { [PluginEventTypes.PluginRegistered]: [Plugin_2]; }; -// Warning: (ae-missing-release-tag) "PluginEventTypes" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum PluginEventTypes { // (undocumented) @@ -6645,8 +5494,6 @@ function prepareCloudTracer(options: ObservabilityEndpoint & { agentName?: string; }): Promise; -// Warning: (ae-missing-release-tag) "ProviderFormat" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type ProviderFormat = 'openai' | 'openai.responses' | 'google' | 'mistralai'; @@ -6657,8 +5504,6 @@ const _providerTables: { byName: Record; }; -// Warning: (ae-missing-release-tag) "ProviderTool" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export abstract class ProviderTool implements Tool { // (undocumented) @@ -6689,7 +5534,6 @@ export class Queue { put(item: T): Promise; } -// Warning: (ae-missing-release-tag) "QueueAudioOutput" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "captureFrame" // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "flush" // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "clearBuffer" @@ -6711,27 +5555,20 @@ export class QueueAudioOutput extends AudioOutput { stream(): ReturnType['stream']>; } -// Warning: (ae-missing-release-tag) "QueueAudioOutputClearEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface QueueAudioOutputClearEvent { // (undocumented) wasCapturing: boolean; } -// Warning: (ae-missing-release-tag) "QueueAudioOutputItem" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "AudioFrame" // // @public export type QueueAudioOutputItem = AudioFrame | AudioSegmentEnd; -// Warning: (ae-missing-release-tag) "readStream" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function readStream(stream: ReadableStream_2, signal?: AbortSignal): AsyncGenerator; -// Warning: (ae-missing-release-tag) "RealtimeCapabilities" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface RealtimeCapabilities { audioOutput: boolean; @@ -6749,15 +5586,11 @@ export interface RealtimeCapabilities { userTranscription: boolean; } -// Warning: (ae-missing-release-tag) "RealtimeError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class RealtimeError extends Error { constructor(message: string, options?: ErrorOptions); } -// Warning: (ae-missing-release-tag) "RealtimeModel" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export abstract class RealtimeModel { constructor(capabilities: RealtimeCapabilities); @@ -6774,8 +5607,6 @@ export abstract class RealtimeModel { abstract session(): RealtimeSession; } -// Warning: (ae-missing-release-tag) "RealtimeModelError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface RealtimeModelError { // (undocumented) @@ -6790,8 +5621,6 @@ export interface RealtimeModelError { type: 'realtime_model_error'; } -// Warning: (ae-missing-release-tag) "RealtimeModelMetrics" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type RealtimeModelMetrics = { type: 'realtime_model_metrics'; @@ -6814,8 +5643,6 @@ export type RealtimeModelMetrics = { metadata?: MetricsMetadata; }; -// Warning: (ae-missing-release-tag) "RealtimeSession" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export abstract class RealtimeSession extends EventEmitter { constructor(realtimeModel: RealtimeModel); @@ -6863,19 +5690,13 @@ export abstract class RealtimeSession extends EventEmitter { abstract updateTools(tools: ToolContext): Promise; } -// Warning: (ae-missing-release-tag) "RealtimeSessionReconnectedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface RealtimeSessionReconnectedEvent { } -// Warning: (ae-missing-release-tag) "realtimeUsageAttributes" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function realtimeUsageAttributes(metrics: RealtimeModelMetrics): Attributes; -// Warning: (ae-missing-release-tag) "RecognitionUsage" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface RecognitionUsage { audioDuration: number; @@ -6883,20 +5704,15 @@ interface RecognitionUsage { outputTokens?: number; } -// Warning: (ae-missing-release-tag) "RecognizeSentinel" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "FakeSTT" // // @public class RecognizeSentinel { } -// Warning: (ae-missing-release-tag) "recordException" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function recordException(span: Span, error: Error, options?: RecordExceptionOptions): void; -// Warning: (ae-missing-release-tag) "RecordExceptionOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface RecordExceptionOptions { redacted?: boolean; @@ -6907,28 +5723,18 @@ interface RecordExceptionOptions { // @internal (undocumented) export function recordingEnabled(options: Record): boolean; -// Warning: (ae-missing-release-tag) "recordRealtimeMetrics" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function recordRealtimeMetrics(span: Span, metrics: RealtimeModelMetrics): void; -// Warning: (ae-missing-release-tag) "REDACTED_EXCEPTION_MESSAGE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const REDACTED_EXCEPTION_MESSAGE = "exception details redacted"; -// Warning: (ae-missing-release-tag) "redactionEnabled" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function redactionEnabled(spanAttributes?: Attributes): boolean; -// Warning: (ae-missing-release-tag) "rejectOnAbort" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function rejectOnAbort(signal: AbortSignal): Promise; -// Warning: (ae-missing-release-tag) "RemoteChatContext" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class RemoteChatContext { // (undocumented) @@ -6943,7 +5749,6 @@ export class RemoteChatContext { } // Warning: (ae-forgotten-export) The symbol "RemoteSession_base" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "RemoteSession" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) export class RemoteSession extends RemoteSession_base { @@ -6976,8 +5781,6 @@ export class RemoteSession extends RemoteSession_base { start(): Promise; } -// Warning: (ae-missing-release-tag) "RemoteSessionCallbacks" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type RemoteSessionCallbacks = { agent_false_interruption: (ev: AgentSession_2.AgentSessionEvent_AgentFalseInterruption) => void; @@ -6994,33 +5797,23 @@ export type RemoteSessionCallbacks = { error: (ev: AgentSession_2.AgentSessionEvent_Error) => void; }; -// Warning: (ae-missing-release-tag) "RemoteSessionEventTypes" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type RemoteSessionEventTypes = 'agent_false_interruption' | 'agent_state_changed' | 'user_state_changed' | 'conversation_item_added' | 'user_input_transcribed' | 'function_tools_executed' | 'overlapping_speech' | 'amd_prediction' | 'eot_prediction' | 'session_usage' | 'debug_message' | 'error'; -// Warning: (ae-missing-release-tag) "replace" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function replace(replacements: Record, options?: { caseSensitive?: boolean; }): (text: ReadableStream_2) => ReadableStream_2; -// Warning: (ae-missing-release-tag) "ReplyPromptArgs" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ReplyPromptArgs { // (undocumented) callIds: string[]; } -// Warning: (ae-missing-release-tag) "ReportContextRunner" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type ReportContextRunner = (fn: () => T) => T; -// Warning: (ae-missing-release-tag) "resampleStream" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function resampleStream(input: { stream: ReadableStream_2; @@ -7044,26 +5837,18 @@ export interface ResolvedSessionConnectOptions { // @public export type ResolvedSpeechHandle = Omit; -// Warning: (ae-missing-release-tag) "resolveEnvVar" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function resolveEnvVar(value: string | undefined, envVars: readonly string[], defaultValue?: string): string; -// Warning: (ae-missing-release-tag) "resolveExpressiveOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function resolveExpressiveOptions(expr: ExpressiveOptions, options: { providerKey: string; defaults: ExpressiveOptions; }): ExpressiveOptions; -// Warning: (ae-missing-release-tag) "RimeModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type RimeModels = 'rime/coda' | 'rime/mistv2' | 'rime/mistv3' | 'rime/mist'; -// Warning: (ae-missing-release-tag) "RimeOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface RimeOptions { inline_speed_alpha?: string; @@ -7075,8 +5860,6 @@ interface RimeOptions { time_scale_factor?: number; } -// Warning: (ae-missing-release-tag) "RoomInputOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface RoomInputOptions { audioEnabled: boolean; @@ -7096,8 +5879,6 @@ export interface RoomInputOptions { videoEnabled: boolean; } -// Warning: (ae-missing-release-tag) "RoomIO" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class RoomIO { constructor(input: { @@ -7127,8 +5908,6 @@ export class RoomIO { unsetParticipant(): void; } -// Warning: (ae-missing-release-tag) "RoomOutputOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface RoomOutputOptions { audioEnabled: boolean; @@ -7143,8 +5922,6 @@ export interface RoomOutputOptions { transcriptionEnabled: boolean; } -// Warning: (ae-missing-release-tag) "RoomSessionTransport" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class RoomSessionTransport extends SessionTransport { // (undocumented) @@ -7167,13 +5944,9 @@ declare namespace rpc { } } -// Warning: (ae-missing-release-tag) "runApp" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const runApp: (opts: ServerOptions) => void; -// Warning: (ae-missing-release-tag) "RunAssert" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class RunAssert { constructor(runResult: RunResult); @@ -7207,8 +5980,6 @@ class RunAssert { }): MessageAssert | FunctionCallAssert | FunctionCallOutputAssert | AgentHandoffAssert | undefined; } -// Warning: (ae-missing-release-tag) "RunContext" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class RunContext { constructor(session: AgentSession, speechHandle: SpeechHandle, functionCall: FunctionCall); @@ -7254,13 +6025,9 @@ export class RunContext { waitForPlayout(): Promise; } -// Warning: (ae-missing-release-tag) "RunEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public type RunEvent = ChatMessageEvent | FunctionCallEvent | FunctionCallOutputEvent | AgentHandoffEvent; -// Warning: (ae-missing-release-tag) "RunningJobInfo" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type RunningJobInfo = { acceptArguments: JobAcceptArguments; @@ -7277,16 +6044,12 @@ export type RunningJobInfo = { launchedAt?: number; }; -// Warning: (ae-missing-release-tag) "RunOutputOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type RunOutputOptions = { maxRetries?: number; retryInstructions?: string; }; -// Warning: (ae-missing-release-tag) "RunResult" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class RunResult { constructor(options?: { @@ -7334,22 +6097,16 @@ export { Scenario } export { ScenarioGroup } -// Warning: (ae-missing-release-tag) "ScenarioUserdata" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type ScenarioUserdata = { [key: string]: unknown; }; -// Warning: (ae-missing-release-tag) "sendDtmfEvents" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const sendDtmfEvents: FunctionTool< { events: ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "#" | "*" | "A" | "B" | "C" | "D")[]; }, unknown, string>; -// Warning: (ae-missing-release-tag) "SentenceStream" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) abstract class SentenceStream { // (undocumented) @@ -7376,8 +6133,6 @@ abstract class SentenceStream { protected queue: AsyncIterableQueue; } -// Warning: (ae-missing-release-tag) "SentenceTokenizer" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) abstract class SentenceTokenizer { // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "SentenceStream" @@ -7386,7 +6141,6 @@ abstract class SentenceTokenizer { abstract tokenize(text: string, language?: string): string[]; } -// Warning: (ae-missing-release-tag) "sentenceTokenizer" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "EXPRESSIVE_BATCH_LEN" // // @public @@ -7395,7 +6149,6 @@ function sentenceTokenizer(provider: string, options: { }): SentenceTokenizer; // Warning: (ae-forgotten-export) The symbol "tokenizer" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "SentenceTokenizer" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) class SentenceTokenizer_2 extends tokenizer.SentenceTokenizer { @@ -7407,8 +6160,6 @@ class SentenceTokenizer_2 extends tokenizer.SentenceTokenizer { tokenize(text: string, language?: string): string[]; } -// Warning: (ae-missing-release-tag) "SerializedImage" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface SerializedImage { // (undocumented) @@ -7421,12 +6172,9 @@ export interface SerializedImage { mimeType?: string; } -// Warning: (ae-missing-release-tag) "serializeImage" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function serializeImage(image: ImageContent): Promise; -// Warning: (ae-missing-release-tag) "ServerOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver // // @public @@ -7509,8 +6257,6 @@ export class ServerOptions { wsURL: string; } -// Warning: (ae-missing-release-tag) "SessionConnectOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface SessionConnectOptions { llmConnOptions?: Partial; @@ -7519,8 +6265,6 @@ export interface SessionConnectOptions { ttsConnOptions?: Partial; } -// Warning: (ae-missing-release-tag) "SessionHost" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class SessionHost { constructor(transport: SessionTransport, audioInput?: TcpAudioInput, audioOutput?: TcpAudioOutput); @@ -7536,8 +6280,6 @@ export class SessionHost { start(): Promise; } -// Warning: (ae-missing-release-tag) "SessionReport" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface SessionReport { audioRecordingPath?: string; @@ -7564,8 +6306,6 @@ export interface SessionReport { timestamp: number; } -// Warning: (ae-missing-release-tag) "SessionReportOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface SessionReportOptions { audioRecordingPath?: string; @@ -7589,13 +6329,9 @@ export interface SessionReportOptions { timestamp?: number; } -// Warning: (ae-missing-release-tag) "sessionReportToJSON" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function sessionReportToJSON(report: SessionReport): Record; -// Warning: (ae-missing-release-tag) "SessionTransport" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export abstract class SessionTransport { // (undocumented) @@ -7608,8 +6344,6 @@ export abstract class SessionTransport { start(): Promise; } -// Warning: (ae-missing-release-tag) "SessionUsageUpdatedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type SessionUsageUpdatedEvent = { type: 'session_usage_updated'; @@ -7617,8 +6351,6 @@ export type SessionUsageUpdatedEvent = { createdAt: number; }; -// Warning: (ae-missing-release-tag) "setAgentAttributes" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function setAgentAttributes(span: Span, params: { operation: string; @@ -7627,13 +6359,9 @@ function setAgentAttributes(span: Span, params: { provider?: string; }): void; -// Warning: (ae-missing-release-tag) "setCaptureContent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function setCaptureContent(enabled: boolean): void; -// Warning: (ae-missing-release-tag) "setContentAttributes" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function setContentAttributes(span: Span, content: { systemInstructions?: MessagePart[]; @@ -7642,13 +6370,9 @@ function setContentAttributes(span: Span, content: { toolDefinitions?: MessagePart[]; }): void; -// Warning: (ae-missing-release-tag) "setErrorType" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function setErrorType(span: Span, error: Error | string): void; -// Warning: (ae-missing-release-tag) "setRequestAttributes" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function setRequestAttributes(span: Span, params: { operation: string; @@ -7658,8 +6382,6 @@ function setRequestAttributes(span: Span, params: { outputType?: string; }): void; -// Warning: (ae-missing-release-tag) "setResponseAttributes" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function setResponseAttributes(span: Span, params: { responseId?: string; @@ -7668,8 +6390,6 @@ function setResponseAttributes(span: Span, params: { timeToFirstChunk?: number; }): void; -// Warning: (ae-missing-release-tag) "setToolAttributes" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function setToolAttributes(span: Span, params: { name: string; @@ -7680,22 +6400,17 @@ function setToolAttributes(span: Span, params: { agentName?: string; }): void; -// Warning: (ae-missing-release-tag) "setToolResult" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function setToolResult(span: Span, params: { result?: string; isError: boolean; }): void; -// Warning: (ae-missing-release-tag) "setTracerProvider" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "FanoutSpanProcessor" // // @public function setTracerProvider(provider: TracerProvider, options?: SetTracerProviderOptions): void; -// Warning: (ae-missing-release-tag) "SetTracerProviderOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface SetTracerProviderOptions { allowPii?: boolean; @@ -7715,8 +6430,6 @@ function setupCloudTracer(options: ObservabilityEndpoint & { metadata?: Attributes; }): Promise; -// Warning: (ae-missing-release-tag) "setUsageAttributes" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function setUsageAttributes(span: Span, usage: { promptTokens?: number; @@ -7726,25 +6439,17 @@ function setUsageAttributes(span: Span, usage: { reasoningTokens?: number; }): void; -// Warning: (ae-missing-release-tag) "setWorkflowAttributes" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function setWorkflowAttributes(span: Span, params: { name: string; }): void; -// Warning: (ae-missing-release-tag) "shortuuid" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function shortuuid(prefix?: string): string; -// Warning: (ae-missing-release-tag) "ShutdownReason" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type ShutdownReason = CloseReason | string; -// Warning: (ae-missing-release-tag) "SimpleLogRecord" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface SimpleLogRecord { attributes: Record; @@ -7754,16 +6459,12 @@ interface SimpleLogRecord { timestampMs: number; } -// Warning: (ae-missing-release-tag) "SimpleOTLPHttpLogExporter" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class SimpleOTLPHttpLogExporter { constructor(config: SimpleOTLPHttpLogExporterConfig | SimpleOTLPHttpLogExporterUrlConfig); export(records: SimpleLogRecord[]): Promise; } -// Warning: (ae-missing-release-tag) "SimpleOTLPHttpLogExporterConfig" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface SimpleOTLPHttpLogExporterConfig { // @deprecated (undocumented) @@ -7773,8 +6474,6 @@ interface SimpleOTLPHttpLogExporterConfig { scopeName: string; } -// Warning: (ae-missing-release-tag) "SimpleOTLPHttpLogExporterUrlConfig" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface SimpleOTLPHttpLogExporterUrlConfig { observabilityUrl: string; @@ -7783,7 +6482,6 @@ interface SimpleOTLPHttpLogExporterUrlConfig { scopeName: string; } -// Warning: (ae-missing-release-tag) "SimulationContext" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "simulatorVerdict" // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "userVerdict" // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "fail" @@ -7824,8 +6522,6 @@ export { SimulationRun } export { SimulationRun_Job } -// Warning: (ae-missing-release-tag) "SimulationVerdict" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface SimulationVerdict { // (undocumented) @@ -7844,18 +6540,12 @@ export function sortedToolEntries(toolCtx: ToolConte // @internal export function sortedToolNames(toolCtx: ToolContext | undefined): string[]; -// Warning: (ae-missing-release-tag) "SPAN_NAME" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const SPAN_NAME = "event_loop_blocked"; -// Warning: (ae-missing-release-tag) "SpanProcessorLike" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public @deprecated (undocumented) type SpanProcessorLike = SpanProcessor; -// Warning: (ae-missing-release-tag) "SpeechCreatedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type SpeechCreatedEvent = { type: 'speech_created'; @@ -7865,7 +6555,6 @@ export type SpeechCreatedEvent = { createdAt: number; }; -// Warning: (ae-missing-release-tag) "SpeechData" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "SpeechEvent" // // @public @@ -7884,8 +6573,6 @@ interface SpeechData { words?: TimedString[]; } -// Warning: (ae-missing-release-tag) "SpeechEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface SpeechEvent { // (undocumented) @@ -7899,8 +6586,6 @@ interface SpeechEvent { type: SpeechEventType; } -// Warning: (ae-missing-release-tag) "SpeechEventType" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public enum SpeechEventType { END_OF_SPEECH = 3, @@ -8037,20 +6722,14 @@ export class SpeechHandle { waitIfNotInterrupted(aw: Promise[]): Promise; } -// Warning: (ae-missing-release-tag) "SpeechHandleCircularWaitError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class SpeechHandleCircularWaitError extends Error { constructor(functionCallName: string); } -// Warning: (ae-missing-release-tag) "SpeechmaticsModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type SpeechmaticsModels = 'speechmatics/enhanced' | 'speechmatics/standard' | 'speechmatics/linden-1'; -// Warning: (ae-missing-release-tag) "SpeechmaticsOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface SpeechmaticsOptions { additional_vocab?: Array>; @@ -8070,13 +6749,9 @@ interface SpeechmaticsOptions { transcript_filtering_config?: Record; } -// Warning: (ae-missing-release-tag) "SpeechSource" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type SpeechSource = 'say' | 'generate_reply' | 'tool_response'; -// Warning: (ae-missing-release-tag) "SpeechSteeringOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface SpeechSteeringOptions { // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "DEFAULT_SPEECH_STEERING_OPTIONS" @@ -8086,8 +6761,6 @@ export interface SpeechSteeringOptions { pace?: 'slow' | 'normal' | 'fast'; } -// Warning: (ae-missing-release-tag) "SpeechStream" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public abstract class SpeechStream implements AsyncIterableIterator { // (undocumented) @@ -8146,8 +6819,6 @@ abstract class SpeechStream implements AsyncIterableIterator { updateInputStream(audioStream: ReadableStream_2): void; } -// Warning: (ae-missing-release-tag) "SpeechStream" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) class SpeechStream_2 extends SpeechStream { constructor(sttImpl: STT_2, opts: InferenceSTTOptions, connOptions: APIConnectOptions); @@ -8163,29 +6834,23 @@ class SpeechStream_2 extends SpeechStream { updateOptions(opts: Partial, 'model' | 'language' | 'modelOptions'>>): void; } -// Warning: (ae-missing-release-tag) "speedUpFakeUserSpeech" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function speedUpFakeUserSpeech(speech: FakeUserSpeech, factor: number): FakeUserSpeech; -// Warning: (ae-missing-release-tag) "splitAllMarkup" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "dropBracketCues" // // @public function splitAllMarkup(text: string): [string, ExpressiveTag[]]; -// Warning: (ae-missing-release-tag) "splitWords" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const splitWords: (text: string, ignorePunctuation?: boolean) => [string, number, number][]; -// Warning: (ae-missing-release-tag) "startMonitoring" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public +type StackSamplingMode = 'adaptive' | 'always' | 'never'; + // @public function startMonitoring(options?: StartMonitoringOptions): EventLoopMonitor | undefined; -// Warning: (ae-missing-release-tag) "StartMonitoringOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface StartMonitoringOptions { // (undocumented) @@ -8193,18 +6858,16 @@ interface StartMonitoringOptions { // (undocumented) name?: string; // (undocumented) + stacks?: StackSamplingMode; + // (undocumented) thresholds?: LoopMonitorThresholds; // (undocumented) watchdog?: boolean; } -// Warning: (ae-missing-release-tag) "startSoon" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function startSoon(func: () => void): void; -// Warning: (ae-missing-release-tag) "StartSpanOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface StartSpanOptions { attributes?: Attributes; @@ -8215,19 +6878,14 @@ interface StartSpanOptions { startTime?: number; } -// Warning: (ae-missing-release-tag) "steeringInstructions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "llmInstructions" // // @public function steeringInstructions(provider: string, steering: SpeechSteeringOptions): string; -// Warning: (ae-missing-release-tag) "stopMonitoring" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) function stopMonitoring(monitor?: EventLoopMonitor): void; -// Warning: (ae-missing-release-tag) "StopResponse" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class StopResponse extends Error { constructor(); @@ -8244,8 +6902,6 @@ declare namespace stream { } } -// Warning: (ae-missing-release-tag) "StreamAdapter" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) class StreamAdapter extends STT { constructor(stt: STT, vad: VAD); @@ -8263,8 +6919,6 @@ class StreamAdapter extends STT { _updateSessionKeyterms(keyterms: string[]): void; } -// Warning: (ae-missing-release-tag) "StreamAdapter" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) class StreamAdapter_2 extends TTS { constructor(tts: TTS, sentenceTokenizer: SentenceTokenizer); @@ -8280,8 +6934,6 @@ class StreamAdapter_2 extends TTS { synthesize(text: string, connOptions?: APIConnectOptions, abortSignal?: AbortSignal): ChunkedStream; } -// Warning: (ae-missing-release-tag) "StreamAdapterWrapper" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) class StreamAdapterWrapper extends SpeechStream { constructor(stt: STT, vad: VAD, connOptions?: APIConnectOptions); @@ -8295,8 +6947,6 @@ class StreamAdapterWrapper extends SpeechStream { protected run(): Promise; } -// Warning: (ae-missing-release-tag) "StreamAdapterWrapper" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) class StreamAdapterWrapper_2 extends SynthesizeStream { constructor(tts: TTS, sentenceTokenizer: SentenceTokenizer, connOptions?: APIConnectOptions); @@ -8306,8 +6956,6 @@ class StreamAdapterWrapper_2 extends SynthesizeStream { protected run(): Promise; } -// Warning: (ae-missing-release-tag) "StreamChannel" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface StreamChannel { // (undocumented) @@ -8324,8 +6972,6 @@ interface StreamChannel { write(chunk: T): Promise; } -// Warning: (ae-missing-release-tag) "streamingEndpointingOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export const streamingEndpointingOptions: { readonly mode: "fixed"; @@ -8334,20 +6980,17 @@ export const streamingEndpointingOptions: { readonly alpha: 0.9; }; -// Warning: (ae-missing-release-tag) "stripAllMarkup" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "splitAllMarkup" // // @public function stripAllMarkup(text: string): string; -// Warning: (ae-missing-release-tag) "stripExprMarkup" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "stripAllMarkup" // // @public function stripExprMarkup(text: string): string; // Warning: (ae-forgotten-export) The symbol "STT_base" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "STT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public abstract class STT extends STT_base { @@ -8394,8 +7037,6 @@ declare namespace stt { } } -// Warning: (ae-missing-release-tag) "STT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class STT_2 extends STT { constructor(opts?: { @@ -8470,16 +7111,12 @@ declare namespace stt_2 { } } -// Warning: (ae-missing-release-tag) "STTCallbacks" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type STTCallbacks = { ['metrics_collected']: (metrics: STTMetrics) => void; ['error']: (error: STTError) => void; }; -// Warning: (ae-missing-release-tag) "STTCapabilities" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface STTCapabilities { alignedTranscript?: 'word' | 'chunk' | false; @@ -8492,31 +7129,21 @@ interface STTCapabilities { streaming: boolean; } -// Warning: (ae-missing-release-tag) "STTEncoding" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type STTEncoding = 'pcm_s16le'; -// Warning: (ae-missing-release-tag) "STTFallbackModel" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface STTFallbackModel { extraKwargs?: Record; model: string; } -// Warning: (ae-missing-release-tag) "STTFallbackModelType" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type STTFallbackModelType = STTFallbackModel | string; -// Warning: (ae-missing-release-tag) "STTLanguages" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type STTLanguages = 'multi' | 'en' | 'de' | 'es' | 'fr' | 'ja' | 'pt' | 'zh' | 'hi' | AnyString; -// Warning: (ae-missing-release-tag) "STTMetrics" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type STTMetrics = { type: 'stt_metrics'; @@ -8532,13 +7159,10 @@ export type STTMetrics = { }; // Warning: (ae-forgotten-export) The symbol "_STTModels" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "STTModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) type STTModels = _STTModels | 'auto' | AnyString; -// Warning: (ae-missing-release-tag) "STTModelUsage" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type STTModelUsage = { type: 'stt_usage'; @@ -8549,18 +7173,12 @@ export type STTModelUsage = { audioDurationMs: number; }; -// Warning: (ae-missing-release-tag) "STTOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type STTOptions = TModel extends DeepgramFluxModels ? DeepgramFluxOptions : TModel extends DeepgramModels ? DeepgramOptions : TModel extends CartesiaModels ? CartesiaOptions : TModel extends AssemblyaiModels ? AssemblyAIOptions : TModel extends XaiSTTModels ? XaiOptions : TModel extends SpeechmaticsModels ? SpeechmaticsOptions : TModel extends InworldSTTModels ? InworldSTTOptions : TModel extends GoogleSTTModels ? GoogleSTTOptions : Record; -// Warning: (ae-missing-release-tag) "supportedNonverbals" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function supportedNonverbals(provider: string): Partial>; -// Warning: (ae-missing-release-tag) "SynthesizedAudio" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface SynthesizedAudio { deltaText?: string; @@ -8571,8 +7189,6 @@ interface SynthesizedAudio { timedTranscripts?: TimedString[]; } -// Warning: (ae-missing-release-tag) "SynthesizeStream" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public abstract class SynthesizeStream implements AsyncIterableIterator { // (undocumented) @@ -8636,8 +7252,6 @@ abstract class SynthesizeStream implements AsyncIterableIterator): void; } -// Warning: (ae-missing-release-tag) "SynthesizeStream" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) class SynthesizeStream_2 extends SynthesizeStream { constructor(tts: TTS_2, opts: InferenceTTSOptions, connOptions: APIConnectOptions); @@ -8649,8 +7263,6 @@ class SynthesizeStream_2 extends SynthesizeStream { updateOptions(opts: Partial, 'model' | 'voice' | 'language' | 'modelOptions'>>): void; } -// Warning: (ae-missing-release-tag) "Task" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class Task { constructor(fn: (controller: AbortController) => Promise, controller: AbortController, name?: string | undefined); @@ -8677,8 +7289,6 @@ export class Task { get result(): Promise; } -// Warning: (ae-missing-release-tag) "TaskCompletedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface TaskCompletedEvent { // (undocumented) @@ -8689,8 +7299,6 @@ interface TaskCompletedEvent { taskId: string; } -// Warning: (ae-missing-release-tag) "TaskGroup" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) class TaskGroup extends AgentTask { constructor(options?: TaskGroupOptions); @@ -8703,8 +7311,6 @@ class TaskGroup extends AgentTask { onEnter(): Promise; } -// Warning: (ae-missing-release-tag) "TaskGroupOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface TaskGroupOptions { // (undocumented) @@ -8719,16 +7325,12 @@ interface TaskGroupOptions { summarizeChatCtx?: boolean; } -// Warning: (ae-missing-release-tag) "TaskGroupResult" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface TaskGroupResult { // (undocumented) taskResults: Record; } -// Warning: (ae-missing-release-tag) "TaskResult" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum TaskResult { // (undocumented) @@ -8739,8 +7341,6 @@ export enum TaskResult { Timeout = "timeout" } -// Warning: (ae-missing-release-tag) "TcpAudioInput" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class TcpAudioInput extends AudioInput { constructor(); @@ -8750,8 +7350,6 @@ export class TcpAudioInput extends AudioInput { pushFrame(frame: AgentSession_2.AgentSessionMessage_ConsoleIO_AudioFrame): void; } -// Warning: (ae-missing-release-tag) "TcpAudioOutput" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class TcpAudioOutput extends AudioOutput { constructor(transport: SessionTransport); @@ -8764,8 +7362,6 @@ export class TcpAudioOutput extends AudioOutput { notifyPlayoutFinished(): void; } -// Warning: (ae-missing-release-tag) "TcpSessionTransport" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class TcpSessionTransport extends SessionTransport { // (undocumented) @@ -8871,7 +7467,6 @@ declare namespace testing_2 { } // Warning: (ae-forgotten-export) The symbol "TextAudioSynchronizer_base" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "TextAudioSynchronizer" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) export class TextAudioSynchronizer extends TextAudioSynchronizer_base { @@ -8894,13 +7489,9 @@ export class TextAudioSynchronizer extends TextAudioSynchronizer_base { segmentPlayoutStarted(): void; } -// Warning: (ae-missing-release-tag) "TextInputCallback" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type TextInputCallback = (session: AgentSession, ev: TextInputEvent) => void | Promise; -// Warning: (ae-missing-release-tag) "TextInputEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface TextInputEvent { // (undocumented) @@ -8911,8 +7502,6 @@ export interface TextInputEvent { text: string; } -// Warning: (ae-missing-release-tag) "TextSyncOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface TextSyncOptions { hyphenateWord: (word: string) => string[]; @@ -8923,8 +7512,6 @@ export interface TextSyncOptions { splitWords: (words: string) => [string, number, number][]; } -// Warning: (ae-missing-release-tag) "TextTransform" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type TextTransform = BuiltinTextTransform | ((text: ReadableStream_2) => ReadableStream_2); @@ -8940,8 +7527,6 @@ declare namespace textTransforms { } } -// Warning: (ae-missing-release-tag) "ThresholdOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class ThresholdOptions { constructor(model: TurnDetectorModel, overrides?: ThresholdOverride, backchannelOverrides?: ThresholdOverride); @@ -8971,13 +7556,9 @@ class ThresholdOptions { updateOverrides(overrides: ThresholdOverride): void; } -// Warning: (ae-missing-release-tag) "ThresholdOverride" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public type ThresholdOverride = number | Record | undefined; -// Warning: (ae-missing-release-tag) "TimedString" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface TimedString { // (undocumented) @@ -8996,23 +7577,15 @@ export interface TimedString { text: string; } -// Warning: (ae-missing-release-tag) "toError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function toError(error: unknown): Error; -// Warning: (ae-missing-release-tag) "toInputMessages" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function toInputMessages(chatCtx: ChatContext): ChatMessagePayload[]; -// Warning: (ae-missing-release-tag) "toJsonSchema" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function toJsonSchema(schema: ToolInputSchema, isOpenai?: boolean, strict?: boolean): JSONSchema7; -// Warning: (ae-missing-release-tag) "TokenData" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface TokenData { // (undocumented) @@ -9035,18 +7608,12 @@ declare namespace tokenize { } } -// Warning: (ae-missing-release-tag) "tokenizeParagraphs" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const tokenizeParagraphs: (text: string) => string[]; -// Warning: (ae-missing-release-tag) "toLanguageName" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function toLanguageName(language: string): string | undefined; -// Warning: (ae-missing-release-tag) "Tool" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Tool { // (undocumented) @@ -9057,8 +7624,6 @@ export interface Tool { } // Warning: (ae-forgotten-export) The symbol "ToolArgs" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "tool" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// Warning: (ae-missing-release-tag) "tool" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public export function tool | undefined = undefined, // eslint-disable-line @typescript-eslint/no-explicit-any -- Generic constraint needs to accept any JSONObject type @@ -9082,8 +7647,6 @@ Result = unknown>(input: { onDuplicate?: DuplicateMode; }): AnonFunctionTool, UserData, Result>; -// Warning: (ae-missing-release-tag) "ToolCalledEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ToolCalledEvent { // (undocumented) @@ -9092,8 +7655,6 @@ export interface ToolCalledEvent { ctx: RunContext; } -// Warning: (ae-missing-release-tag) "ToolCallLike" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface ToolCallLike { // (undocumented) @@ -9104,8 +7665,6 @@ interface ToolCallLike { name: string; } -// Warning: (ae-missing-release-tag) "ToolChoice" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type ToolChoice = 'auto' | 'none' | 'required' | { type: 'function'; @@ -9114,8 +7673,6 @@ export type ToolChoice = 'auto' | 'none' | 'required' | { }; }; -// Warning: (ae-missing-release-tag) "ToolCompletedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ToolCompletedEvent { // (undocumented) @@ -9130,8 +7687,6 @@ export interface ToolCompletedEvent { }; } -// Warning: (ae-missing-release-tag) "ToolContext" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class ToolContext { // Warning: (ae-forgotten-export) The symbol "ToolContextInit" needs to be exported by the entry point index.d.ts @@ -9159,26 +7714,17 @@ export class ToolContext { updateTools(tools: ToolContextInit): void; } -// Warning: (ae-missing-release-tag) "ToolContextEntry" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type ToolContextEntry = FunctionTool | ProviderTool | Toolset; -// Warning: (ae-missing-release-tag) "ToolContextLike" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type ToolContextLike = ToolContext | ToolContextInit; -// Warning: (ae-missing-release-tag) "ToolError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class ToolError extends Error { constructor(message: string); } -// Warning: (ae-missing-release-tag) "ToolFlag" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// Warning: (ae-missing-release-tag) "ToolFlag" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const ToolFlag: { readonly NONE: 0; @@ -9189,16 +7735,12 @@ export const ToolFlag: { // @public (undocumented) export type ToolFlag = (typeof ToolFlag)[keyof typeof ToolFlag]; -// Warning: (ae-missing-release-tag) "ToolHandlingOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ToolHandlingOptions { // (undocumented) asyncOptions?: Partial; } -// Warning: (ae-missing-release-tag) "ToolOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ToolOptions { abortSignal: AbortSignal; @@ -9206,8 +7748,6 @@ export interface ToolOptions { toolCallId: string; } -// Warning: (ae-missing-release-tag) "Toolset" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class Toolset { // (undocumented) @@ -9229,15 +7769,11 @@ export class Toolset { get tools(): readonly ToolContextEntry[]; } -// Warning: (ae-missing-release-tag) "ToolsetContext" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface ToolsetContext { updateTools(tools: readonly ToolContextEntry[]): void; } -// Warning: (ae-missing-release-tag) "ToolsetCreateOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface ToolsetCreateOptions { aclose?: () => Promise; @@ -9247,13 +7783,9 @@ export interface ToolsetCreateOptions { tools: readonly ToolContextEntry[]; } -// Warning: (ae-missing-release-tag) "ToolType" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type ToolType = 'function' | 'provider'; -// Warning: (ae-missing-release-tag) "toOutputMessages" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function toOutputMessages(params: { text?: string; @@ -9266,32 +7798,22 @@ function toOutputMessages(params: { // @internal export function toSnakeCaseDeep(value: unknown): unknown; -// Warning: (ae-missing-release-tag) "toStream" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function toStream(iterable: AsyncIterable): ReadableStream_2; -// Warning: (ae-missing-release-tag) "toSystemInstructions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function toSystemInstructions(chatCtx: ChatContext): MessagePart[]; -// Warning: (ae-missing-release-tag) "toToolContext" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// Warning: (ae-missing-release-tag) "toToolContext" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function toToolContext(input: ToolContextLike): ToolContext; // @public (undocumented) export function toToolContext(input: ToolContextLike | undefined): ToolContext | undefined; -// Warning: (ae-missing-release-tag) "toToolDefinitions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function toToolDefinitions(tools: readonly unknown[] | Record): MessagePart[]; // Warning: (ae-forgotten-export) The symbol "DynamicTracer" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "tracer" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public const tracer: DynamicTracer; @@ -9492,8 +8014,6 @@ declare namespace traceTypes { } } -// Warning: (ae-missing-release-tag) "TracingRpcInterceptor" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class TracingRpcInterceptor implements RpcInterceptor { // (undocumented) @@ -9502,15 +8022,11 @@ class TracingRpcInterceptor implements RpcInterceptor { interceptOutgoing(call: RpcCallInfo, next: OutgoingRpcNext): Promise; } -// Warning: (ae-missing-release-tag) "TranscriptionOutputOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface TranscriptionOutputOptions { expressiveEnabled?: () => boolean; } -// Warning: (ae-missing-release-tag) "TranscriptMarkupStripper" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class TranscriptMarkupStripper { expressionAttribute(): Record | undefined; @@ -9520,7 +8036,6 @@ class TranscriptMarkupStripper { } // Warning: (ae-forgotten-export) The symbol "TTS_base" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "TTS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public abstract class TTS extends TTS_base { @@ -9587,8 +8102,6 @@ declare namespace tts { } } -// Warning: (ae-missing-release-tag) "TTS" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class TTS_2 extends TTS { constructor(opts: { @@ -9666,21 +8179,15 @@ declare namespace tts_2 { } } -// Warning: (ae-missing-release-tag) "TTS_INSTRUCTIONS_PLACEHOLDER" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export const TTS_INSTRUCTIONS_PLACEHOLDER = "{tts.markup.llm_instructions}"; -// Warning: (ae-missing-release-tag) "TTSCallbacks" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type TTSCallbacks = { ['metrics_collected']: (metrics: TTSMetrics) => void; ['error']: (error: TTSError) => void; }; -// Warning: (ae-missing-release-tag) "TTSCapabilities" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface TTSCapabilities { // (undocumented) @@ -9689,8 +8196,6 @@ interface TTSCapabilities { streaming: boolean; } -// Warning: (ae-missing-release-tag) "TTSFallbackModel" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public interface TTSFallbackModel { extraKwargs?: Record; @@ -9698,12 +8203,9 @@ interface TTSFallbackModel { voice: string; } -// Warning: (ae-missing-release-tag) "TTSFallbackModelType" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type TTSFallbackModelType = TTSFallbackModel | string; -// Warning: (ae-missing-release-tag) "TTSMarkup" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "TTS" // // @public @@ -9722,8 +8224,6 @@ class TTSMarkup { get supported(): boolean; } -// Warning: (ae-missing-release-tag) "TTSMetrics" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type TTSMetrics = { type: 'tts_metrics'; @@ -9743,13 +8243,9 @@ export type TTSMetrics = { metadata?: MetricsMetadata; }; -// Warning: (ae-missing-release-tag) "TTSModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type TTSModels = CartesiaModels_2 | DeepgramTTSModels | RimeModels | InworldModels | XaiTTSModels | FishAudioModels | AnyString; -// Warning: (ae-missing-release-tag) "TTSModelUsage" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type TTSModelUsage = { type: 'tts_usage'; @@ -9761,13 +8257,10 @@ export type TTSModelUsage = { audioDurationMs: number; }; -// Warning: (ae-missing-release-tag) "TTSOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type TTSOptions = TModel extends CartesiaModels_2 ? CartesiaOptions_2 : TModel extends DeepgramTTSModels ? DeepgramTTSOptions : TModel extends RimeModels ? RimeOptions : TModel extends InworldModels ? InworldOptions : TModel extends XaiTTSModels ? XaiTTSOptions : TModel extends FishAudioModels ? FishAudioOptions : Record; // Warning: (ae-forgotten-export) The symbol "BaseStreamingTurnDetector" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "TurnDetector" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) class TurnDetector extends BaseStreamingTurnDetector { @@ -9795,13 +8288,9 @@ class TurnDetector extends BaseStreamingTurnDetector { protected _warnThresholdOverride(): void; } -// Warning: (ae-missing-release-tag) "TurnDetectorModel" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public type TurnDetectorModel = 'turn-detector-v1' | 'turn-detector-v1-mini'; -// Warning: (ae-missing-release-tag) "TurnDetectorOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface TurnDetectorOptions { // (undocumented) @@ -9820,8 +8309,6 @@ interface TurnDetectorOptions { version?: TurnDetectorVersion; } -// Warning: (ae-missing-release-tag) "TurnDetectorStreamImpl" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public class TurnDetectorStreamImpl extends BaseStreamingTurnDetectorStream { // Warning: (ae-forgotten-export) The symbol "TurnDetectorStreamImplArgs" needs to be exported by the entry point index.d.ts @@ -9861,21 +8348,16 @@ class TurnDetectorStreamImpl extends BaseStreamingTurnDetectorStream { protected _warnedLocalFailure: boolean; } -// Warning: (ae-missing-release-tag) "TurnDetectorVersion" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "TurnDetectorModel" // // @public type TurnDetectorVersion = 'v1' | 'v1-mini'; -// Warning: (ae-missing-release-tag) "UnexpectedModelBehavior" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class UnexpectedModelBehavior extends Error { constructor(message: string, options?: ErrorOptions); } -// Warning: (ae-missing-release-tag) "uploadSessionReport" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function uploadSessionReport(options: ObservabilityEndpoint & { agentName: string; @@ -9883,8 +8365,6 @@ function uploadSessionReport(options: ObservabilityEndpoint & { metadata?: Attributes; }): Promise; -// Warning: (ae-missing-release-tag) "UsageCollector" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public @deprecated (undocumented) export class UsageCollector { constructor(); @@ -9894,8 +8374,6 @@ export class UsageCollector { getSummary(): UsageSummary; } -// Warning: (ae-missing-release-tag) "UsageSummary" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public @deprecated (undocumented) export interface UsageSummary { // (undocumented) @@ -9910,18 +8388,12 @@ export interface UsageSummary { ttsCharactersCount: number; } -// Warning: (ae-missing-release-tag) "USERDATA_TIMED_TRANSCRIPT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export const USERDATA_TIMED_TRANSCRIPT = "lk.timed_transcripts"; -// Warning: (ae-missing-release-tag) "USERDATA_TTS_STARTED_TIME" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export const USERDATA_TTS_STARTED_TIME = "lk.tts_started_time"; -// Warning: (ae-missing-release-tag) "UserInputTranscribedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type UserInputTranscribedEvent = { type: 'user_input_transcribed'; @@ -9933,13 +8405,9 @@ export type UserInputTranscribedEvent = { language: LanguageCode | null; }; -// Warning: (ae-missing-release-tag) "UserState" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type UserState = 'speaking' | 'listening' | 'away'; -// Warning: (ae-missing-release-tag) "UserStateChangedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type UserStateChangedEvent = { type: 'user_state_changed'; @@ -9948,8 +8416,6 @@ export type UserStateChangedEvent = { createdAt: number; }; -// Warning: (ae-missing-release-tag) "UserTranscriptionTimeoutEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type UserTranscriptionTimeoutEvent = { type: 'user_transcription_timeout'; @@ -9958,8 +8424,6 @@ export type UserTranscriptionTimeoutEvent = { createdAt: number; }; -// Warning: (ae-missing-release-tag) "UserTurnExceededEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type UserTurnExceededEvent = { type: 'user_turn_exceeded'; @@ -9970,8 +8434,6 @@ export type UserTurnExceededEvent = { createdAt: number; }; -// Warning: (ae-missing-release-tag) "UserTurnLimitOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface UserTurnLimitOptions { maxDuration: number | null; @@ -9979,7 +8441,6 @@ export interface UserTurnLimitOptions { } // Warning: (ae-forgotten-export) The symbol "VAD_base" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "VAD" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) export abstract class VAD extends VAD_base { @@ -9994,8 +8455,6 @@ export abstract class VAD extends VAD_base { abstract stream(): VADStream; } -// Warning: (ae-missing-release-tag) "VAD" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) class VAD_2 extends VAD { constructor(opts?: Partial & { @@ -10018,22 +8477,16 @@ class VAD_2 extends VAD { updateOptions(opts: Partial): void; } -// Warning: (ae-missing-release-tag) "VADCallbacks" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type VADCallbacks = { ['metrics_collected']: (metrics: VADMetrics) => void; }; -// Warning: (ae-missing-release-tag) "VADCapabilities" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface VADCapabilities { updateInterval: number; } -// Warning: (ae-missing-release-tag) "VADEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface VADEvent { frames: AudioFrame[]; @@ -10049,8 +8502,6 @@ export interface VADEvent { type: VADEventType; } -// Warning: (ae-missing-release-tag) "VADEventType" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum VADEventType { // (undocumented) @@ -10063,8 +8514,6 @@ export enum VADEventType { START_OF_SPEECH = 0 } -// Warning: (ae-missing-release-tag) "VADMetrics" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type VADMetrics = { type: 'vad_metrics'; @@ -10075,13 +8524,9 @@ export type VADMetrics = { inferenceCount: number; }; -// Warning: (ae-missing-release-tag) "VADModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type VADModels = 'silero'; -// Warning: (ae-missing-release-tag) "VADOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface VADOptions { activationThreshold: number; @@ -10092,8 +8537,6 @@ interface VADOptions { prefixPaddingDuration: number; } -// Warning: (ae-missing-release-tag) "VADStream" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export abstract class VADStream implements AsyncIterableIterator { // (undocumented) @@ -10143,13 +8586,9 @@ export abstract class VADStream implements AsyncIterableIterator { protected vad: VAD; } -// Warning: (ae-missing-release-tag) "validateChatContextStructure" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function validateChatContextStructure(chatCtx: ChatContext): ChatContextValidationResult; -// Warning: (ae-missing-release-tag) "version" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const version: string; @@ -10300,8 +8739,6 @@ declare namespace voice { } } -// Warning: (ae-missing-release-tag) "VoiceOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public @deprecated (undocumented) export type VoiceOptions = { maxToolSteps: number; @@ -10315,19 +8752,12 @@ export type VoiceOptions = { maxEndpointingDelay?: number; }; -// Warning: (ae-missing-release-tag) "waitFor" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function waitFor(tasks: Task[]): Promise; -// Warning: (ae-missing-release-tag) "waitForAbort" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function waitForAbort(signal: AbortSignal): Promise>; -// Warning: (ae-missing-release-tag) "waitForParticipant" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// Warning: (ae-missing-release-tag) "waitForParticipant" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function waitForParticipant(input: { room: Room; @@ -10346,8 +8776,6 @@ export function waitForParticipant(input: { signal?: AbortSignal; }): Promise; -// Warning: (ae-missing-release-tag) "waitForParticipantAttribute" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function waitForParticipantAttribute(input: { room: Room; @@ -10357,9 +8785,6 @@ export function waitForParticipantAttribute(input: { signal?: AbortSignal; }): Promise; -// Warning: (ae-missing-release-tag) "waitForTrackPublication" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// Warning: (ae-missing-release-tag) "waitForTrackPublication" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function waitForTrackPublication(input: { room: Room; @@ -10385,18 +8810,12 @@ export function waitForTrackPublication(input: { // @internal (undocumented) export function waitForWebSocketOpen(ws: WebSocket_2, provider: string): Promise; -// Warning: (ae-missing-release-tag) "waitUntilAborted" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function waitUntilAborted(promise: Promise, signal: AbortSignal): Promise>; -// Warning: (ae-missing-release-tag) "waitUntilTimeout" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function waitUntilTimeout(promise: Promise, timeoutMs: number, throwError?: () => E): Promise>; -// Warning: (ae-missing-release-tag) "WarmTransferResult" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface WarmTransferResult { // (undocumented) @@ -10406,7 +8825,6 @@ interface WarmTransferResult { // @public type WarmTransferSpeech = string | ((session: AgentSession) => SpeechHandle); -// Warning: (ae-missing-release-tag) "WarmTransferTask" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "createWarmTransferTask" // // @public @@ -10416,8 +8834,6 @@ class WarmTransferTask extends AgentTask { run(): Promise; } -// Warning: (ae-missing-release-tag) "WarmTransferTaskOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface WarmTransferTaskOptions { abortSignal?: AbortSignal; @@ -10454,19 +8870,14 @@ interface WarmTransferTaskOptions { vad?: VAD | null; } -// Warning: (ae-missing-release-tag) "withInferenceTracking" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public function withInferenceTracking(fn: (marker: InferenceMarker) => T): T; -// Warning: (ae-missing-release-tag) "withMockTools" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "Disposable" // // @public function withMockTools(agent: AgentConstructor, mocks: Record): Disposable; -// Warning: (ae-missing-release-tag) "withResolvers" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function withResolvers(): { promise: ThrowsPromise; @@ -10474,8 +8885,6 @@ export function withResolvers(): { reject: (reason: Error) => void; }; -// Warning: (ae-missing-release-tag) "WordStream" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) abstract class WordStream { // (undocumented) @@ -10502,8 +8911,6 @@ abstract class WordStream { protected queue: AsyncIterableQueue; } -// Warning: (ae-missing-release-tag) "WordTokenizer" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) abstract class WordTokenizer { // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@livekit/agents" does not have an export "WordStream" @@ -10512,8 +8919,6 @@ abstract class WordTokenizer { abstract tokenize(text: string, language?: string): string[]; } -// Warning: (ae-missing-release-tag) "WordTokenizer" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) class WordTokenizer_2 extends tokenizer.WordTokenizer { constructor(ignorePunctuation?: boolean); @@ -10523,27 +8928,19 @@ class WordTokenizer_2 extends tokenizer.WordTokenizer { tokenize(text: string, language?: string): string[]; } -// Warning: (ae-missing-release-tag) "Worker" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public @deprecated (undocumented) const Worker_2: typeof AgentServer; export { Worker_2 as Worker } -// Warning: (ae-missing-release-tag) "WorkerError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class WorkerError extends Error { constructor(msg?: string); } -// Warning: (ae-missing-release-tag) "WorkerOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public @deprecated (undocumented) const WorkerOptions_2: typeof ServerOptions; export { WorkerOptions_2 as WorkerOptions } -// Warning: (ae-missing-release-tag) "WorkerPermissions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class WorkerPermissions { constructor(canPublish?: boolean, canSubscribe?: boolean, canPublishData?: boolean, canUpdateMetadata?: boolean, canPublishSources?: TrackSource[], hidden?: boolean); @@ -10576,13 +8973,9 @@ declare namespace workflows { } } -// Warning: (ae-missing-release-tag) "XAIModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type XAIModels = 'xai/grok-4-1-fast-non-reasoning' | 'xai/grok-4-1-fast-reasoning' | 'xai/grok-4.20-0309-non-reasoning' | 'xai/grok-4.20-0309-reasoning' | 'xai/grok-4.20-multi-agent-0309' | 'xai/grok-4.3' | 'xai/grok-4.5'; -// Warning: (ae-missing-release-tag) "XaiOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface XaiOptions { diarize?: boolean; @@ -10591,31 +8984,21 @@ interface XaiOptions { interim_results?: boolean; } -// Warning: (ae-missing-release-tag) "XaiSTTModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type XaiSTTModels = 'xai/stt-1'; -// Warning: (ae-missing-release-tag) "XaiTTSModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type XaiTTSModels = 'xai/tts-1'; -// Warning: (ae-missing-release-tag) "XaiTTSOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) interface XaiTTSOptions { bit_rate?: 32000 | 64000 | 96000 | 128000 | 192000; speed?: number; } -// Warning: (ae-missing-release-tag) "ZAIModels" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) type ZAIModels = 'zai/glm-5.1'; -// Warning: (ae-missing-release-tag) "zipFunctionCallsAndOutputs" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const zipFunctionCallsAndOutputs: (event: FunctionToolsExecutedEvent) => Array<[FunctionCall, FunctionCallOutput]>; diff --git a/agents/src/telemetry/blocked_span_tracker.ts b/agents/src/telemetry/blocked_span_tracker.ts new file mode 100644 index 0000000000..47c732abc8 --- /dev/null +++ b/agents/src/telemetry/blocked_span_tracker.ts @@ -0,0 +1,159 @@ +// SPDX-FileCopyrightText: 2026 LiveKit, Inc. +// +// SPDX-License-Identifier: Apache-2.0 +import { type Context, type Span, trace } from '@opentelemetry/api'; +import type { ReadableSpan, SpanProcessor } from '@opentelemetry/sdk-trace-base'; + +/** + * Which span was running when the event loop stalled, without sampling a stack. + * + * Every framework span is created and ended on the main thread, so a span created before a + * stall and ended after it (or at its end, when the blocking call returned) was current while + * the loop was blocked. The innermost such span, the one created last, is where the stall hurt: + * `function_tool` for a slow tool, `rpc_handler` for a slow RPC, `on_user_turn_completed` for a + * slow hook. The Python monitor reads the same span off the blocked task's context; Node has no + * cross-thread view of a task's context, so the span processor keeps the bookkeeping instead. + * + * Creation and end are timed by the wall clock at the processor call, not by the span's own + * timestamps: a span back-dated at creation (`eou_wait` starts at the user's last speech) must + * not claim a stall that predates it. + */ +export class BlockedSpanTracker implements SpanProcessor { + /** Spans not yet ended, by span id. */ + readonly #open = new Map(); + /** Spans ended recently: a stall's report runs a heartbeat after the blocking call returned. */ + readonly #ended: { span: Span; createdAt: number; endedAt: number }[] = []; + readonly #retention: number; + readonly #maxEnded: number; + + constructor(options: { retention?: number; maxEnded?: number } = {}) { + this.#retention = options.retention ?? 5_000; + this.#maxEnded = options.maxEnded ?? 256; + } + + onStart(span: Span): void { + this.#open.set(span.spanContext().spanId, { span, createdAt: Date.now() }); + } + + onEnd(span: ReadableSpan): void { + const id = span.spanContext().spanId; + const entry = this.#open.get(id); + if (!entry) return; + this.#open.delete(id); + const now = Date.now(); + this.#ended.push({ span: entry.span, createdAt: entry.createdAt, endedAt: now }); + this.#prune(now); + } + + async forceFlush(): Promise {} + + async shutdown(): Promise { + this.#open.clear(); + this.#ended.length = 0; + } + + /** + * The span that was current across `[startedAt, endedAt]` (epoch ms): created before the + * window opened and still open, or ended no earlier than the window closed. Spans of the given + * names are skipped (the stall span itself). `slack` widens both ends: the block's start is + * known to within a heartbeat, and its end is the late heartbeat's run, a little after the + * blocking call returned and the span it was in ended. + * + * Among the spans that qualify, the innermost of one ancestry is the answer. When two + * operations of the same kind were both in flight (two tools, two RPC handlers), timing alone + * cannot say which one blocked: the answer is then their nearest common ancestor, or nothing, + * rather than a guess at one of them. Operations of different kinds overlap all the time (a + * user turn is open while an RPC handler runs) and the newest of them is the one that blocked. + */ + blockedSpan( + startedAt: number, + endedAt: number, + exclude: ReadonlySet, + slack = 2, + ): Span | undefined { + const opened = startedAt + slack; + const closed = endedAt - slack; + const candidates = new Map(); + const consider = (entry: { span: Span; createdAt: number }) => { + if (entry.createdAt > opened) return; + if (exclude.has(spanName(entry.span))) return; + candidates.set(entry.span.spanContext().spanId, entry); + }; + for (const entry of this.#open.values()) consider(entry); + for (const entry of this.#ended) { + if (entry.endedAt >= closed) consider(entry); + } + if (!candidates.size) return undefined; + + // the leaves: candidates no other candidate descends from + const hasChild = new Set(); + for (const entry of candidates.values()) { + let parent = parentSpanId(entry.span); + while (parent !== undefined && candidates.has(parent) && !hasChild.has(parent)) { + hasChild.add(parent); + parent = parentSpanId(candidates.get(parent)!.span); + } + } + const leaves = [...candidates.entries()].filter(([id]) => !hasChild.has(id)); + // ties (same millisecond) go to the later-created span, which the maps yield last + let newest = leaves[0]!; + for (const leaf of leaves) if (leaf[1].createdAt >= newest[1].createdAt) newest = leaf; + const sameKind = leaves.filter( + ([, entry]) => spanName(entry.span) === spanName(newest[1].span), + ); + if (sameKind.length <= 1) return newest[1].span; + + // indistinguishable: the nearest ancestor (among the candidates) common to all of them + const chains = sameKind.map(([id]) => { + const chain: string[] = []; + let current: string | undefined = id; + while (current !== undefined && candidates.has(current)) { + chain.push(current); + current = parentSpanId(candidates.get(current)!.span); + } + return chain; + }); + const shared = chains[0]!.find((id) => chains.every((chain) => chain.includes(id))); + if (shared === undefined) return undefined; + // the common ancestor is the deepest one of that kind that is not itself ambiguous + return candidates.get(shared)!.span; + } + + /** The context carrying {@link blockedSpan}, or undefined. */ + blockedContext( + startedAt: number, + endedAt: number, + exclude: ReadonlySet, + base: Context, + slack = 2, + ): Context | undefined { + const span = this.blockedSpan(startedAt, endedAt, exclude, slack); + return span ? trace.setSpan(base, span) : undefined; + } + + /** @internal test hook */ + get openCount(): number { + return this.#open.size; + } + + #prune(now: number): void { + const cutoff = now - this.#retention; + while ( + this.#ended.length && + (this.#ended[0]!.endedAt < cutoff || this.#ended.length > this.#maxEnded) + ) { + this.#ended.shift(); + } + } +} + +function spanName(span: Span): string { + return (span as { name?: string }).name ?? ''; +} + +function parentSpanId(span: Span): string | undefined { + return (span as { parentSpanContext?: { spanId: string } }).parentSpanContext?.spanId; +} + +/** The one tracker the loop monitor consults; installed on every provider the framework owns. */ +export const blockedSpanTracker = new BlockedSpanTracker(); diff --git a/agents/src/telemetry/loop_monitor.test.ts b/agents/src/telemetry/loop_monitor.test.ts index f90c8d3892..06e4e73b04 100644 --- a/agents/src/telemetry/loop_monitor.test.ts +++ b/agents/src/telemetry/loop_monitor.test.ts @@ -99,6 +99,7 @@ describe.sequential('event loop monitor', () => { warnThreshold: WARN, errorThreshold: ERROR, tickInterval: TICK, + stacks: 'never', // sampled stacks have their own tests; reports stay synchronous here }); monitor.onReport = (report) => reports.push(report); sessionRoot = tracer.startSpan({ name: 'agent_session' }); @@ -303,6 +304,7 @@ describe.sequential('event loop monitor', () => { errorThreshold: ERROR, tickInterval: TICK, emitSpans: false, + stacks: 'never', }); const workerReports: BlockedReport[] = []; workerMonitor.onReport = (report) => workerReports.push(report); @@ -416,6 +418,7 @@ describe.sequential('event loop monitor', () => { errorThreshold: ERROR, tickInterval: TICK, watchdog: false, + stacks: 'never', }); bare.start(); expect(bare.watchdogActive).toBe(false); diff --git a/agents/src/telemetry/loop_monitor.ts b/agents/src/telemetry/loop_monitor.ts index d84e82db29..caf43bf8a5 100644 --- a/agents/src/telemetry/loop_monitor.ts +++ b/agents/src/telemetry/loop_monitor.ts @@ -7,19 +7,36 @@ import { SpanStatusCode, context as otelContext, } from '@opentelemetry/api'; +import { url as inspectorUrl } from 'node:inspector'; import { PerformanceObserver } from 'node:perf_hooks'; import { Worker } from 'node:worker_threads'; import { getJobContext } from '../job.js'; import { log } from '../log.js'; +import { blockedSpanTracker } from './blocked_span_tracker.js'; +import { + LATE_SAMPLE_FACTOR, + type StackSample, + WATCHDOG_SOURCE, + WD_LAST_WAKE, + WD_LATE_AT, + WD_LATE_GAP, + WD_MAIN_LAST_TICK, + WD_SLOTS, + type WatchdogMessage, + formatSample, + innermostLocation, + stackSamplingModeFromEnv, +} from './loop_stack_sampler.js'; import { recordEventLoopBlocked } from './otel_metrics.js'; import { RateLimiter } from './rate_limiter.js'; -import { recordLoopStall, sessionRootContext } from './session_context.js'; +import { jobRootContext, recordLoopStall, sessionRootContext } from './session_context.js'; import { ATTR_BLOCKING_CAUSE, ATTR_BLOCKING_CPU_TIME, ATTR_BLOCKING_DURATION, ATTR_BLOCKING_GC_TIME, ATTR_BLOCKING_SEVERITY, + ATTR_BLOCKING_STACK, ATTR_BLOCKING_SUPPRESSED, ATTR_BLOCKING_THRESHOLD, } from './trace_types.js'; @@ -37,6 +54,8 @@ export const ENV_ERROR_THRESHOLD_MS = 'LIVEKIT_AGENTS_LOOP_BLOCK_ERROR_MS'; export const MAX_SPANS_PER_MINUTE = 6; export const MAX_LOGS_PER_MINUTE = 5; export const SPAN_NAME = 'event_loop_blocked'; +/** Spans a stall must not nest under: itself, from an earlier heartbeat. */ +const STALL_PARENT_EXCLUDES: ReadonlySet = new Set([SPAN_NAME]); export type LoopMonitorSeverity = 'warning' | 'error'; @@ -49,11 +68,22 @@ export type LoopStallCause = 'code' | 'host'; /** What a report's `cpuTime` covers: the event-loop thread, or the whole process on older Node. */ export type LoopCpuScope = 'thread' | 'process'; +/** + * When the loop thread's stack is sampled (see loop_stack_sampler): `adaptive` from the + * process's first code-caused stall on (a healthy process never enables the debugger domain), + * `always` from the start, `never` not at all. + */ +export type StackSamplingMode = 'adaptive' | 'always' | 'never'; + export interface BlockedReport { /** Heartbeat lag in milliseconds. */ duration: number; /** Approximate wall-clock start in milliseconds since the Unix epoch. */ startedAt: number; + /** The last on-time heartbeat before the block, epoch ms: the block began within one tick after it. */ + windowStart: number; + /** When the loop ran again (the late heartbeat), epoch ms. */ + endedAt: number; warnThreshold: number; severity: LoopMonitorSeverity; /** @@ -78,6 +108,15 @@ export interface BlockedReport { * attributed to `code`. */ cause: LoopStallCause; + /** + * Sampled stacks of the loop thread during the stall, formatted like the Python monitor's: + * one block per sample (`# loop thread sampled Nms into the stall` then the innermost frames), + * blocks joined by `\n---\n`; or a one-line note saying why there is none. Absent for + * host-caused stalls and when sampling is off. + */ + stack?: string; + /** The innermost frame of the agent's own code in the last sample, for the log line. */ + location?: string; } export class LoopMonitorThresholds { @@ -127,36 +166,18 @@ export interface EventLoopMonitorOptions { * code on the loop. Default true. */ watchdog?: boolean; + /** + * When to sample the loop thread's stack through the inspector (see `loop_stack_sampler`): + * `adaptive` (default) after the process's first code-caused stall, `always` from the start, + * `never` not at all. The sampler runs on the watchdog thread, so `watchdog: false` means + * `never`. Sampling is not started, and is stopped, while an inspector is attached to the + * process: its pauses would land in the debugger's session. + */ + stacks?: StackSamplingMode; } export type ReportContextRunner = (fn: () => T) => T; -// Slots of the SharedArrayBuffer shared with the watchdog thread. Values are Date.now() -// milliseconds as BigInt, since performance.now() has a different origin in every thread. -const WD_LAST_WAKE = 0; -const WD_LATE_AT = 1; -const WD_LATE_GAP = 2; - -// The watchdog is an independent event loop, so a synchronous block on the main thread does not -// delay it. When it wakes late too, the process itself was not running. It keeps the latest -// wake-up time and the largest late wake-up it has seen since the main thread last looked. -const WATCHDOG_SOURCE = ` -const { workerData } = require('node:worker_threads'); -const state = new BigInt64Array(workerData.shared); -const interval = workerData.interval; -let before = Date.now(); -setInterval(() => { - const now = Date.now(); - const gap = now - before - interval; - before = now; - if (gap > Number(Atomics.load(state, ${WD_LATE_GAP}))) { - Atomics.store(state, ${WD_LATE_AT}, BigInt(now)); - Atomics.store(state, ${WD_LATE_GAP}, BigInt(gap)); - } - Atomics.store(state, ${WD_LAST_WAKE}, BigInt(now)); -}, interval); -`; - // Per-thread CPU accounting (Node 22.15 / 23.9+). Older runtimes fall back to the process total. const threadCpuUsage: (() => NodeJS.CpuUsage) | undefined = ( process as { threadCpuUsage?: () => NodeJS.CpuUsage } @@ -170,6 +191,16 @@ export class EventLoopMonitor { readonly #name: string; readonly #emitSpans: boolean; readonly #useWatchdog: boolean; + readonly #stackMode: StackSamplingMode; + #samplingRequested = false; + #samplingActive = false; + /** An inspector attached to the process: sampling was stopped (or never started) for it. */ + #inspectorAttached = false; + /** When the watchdog enabled the debugger domain (epoch ms): a stall overlapping it is that. */ + #samplingStarted?: [number, number]; + /** Stack samples the watchdog posted, by the stall's window start, until the report is emitted. */ + readonly #samples = new Map(); + #lastTickWall = 0; readonly #spanLimiter = new RateLimiter(MAX_SPANS_PER_MINUTE); readonly #logLimiter = new RateLimiter(MAX_LOGS_PER_MINUTE); readonly #hostLogLimiter = new RateLimiter(MAX_LOGS_PER_MINUTE); @@ -198,6 +229,12 @@ export class EventLoopMonitor { this.#name = options.name ?? 'event-loop'; this.#emitSpans = options.emitSpans ?? true; this.#useWatchdog = options.watchdog ?? true; + this.#stackMode = options.stacks ?? stackSamplingModeFromEnv(); + if (!this.#useWatchdog && this.#stackMode !== 'never') { + // the sampler is the watchdog thread's: without it there is nothing to sample with + log().debug('event loop stack sampling is off: it needs the watchdog thread'); + this.#stackMode = 'never'; + } if (!Number.isFinite(this.warnThreshold) || this.warnThreshold <= 0) { throw new Error('warnThreshold must be finite and > 0'); } @@ -218,6 +255,11 @@ export class EventLoopMonitor { return this.#watchdogState !== undefined; } + /** Whether the stack sampler is running, i.e. the next stall will carry a stack. */ + get stackSamplingActive(): boolean { + return this.#samplingActive; + } + /** Set the OTel parent and, optionally, a runner that restores job AsyncLocalStorage. */ setReportContext(context: Context | undefined, runner?: ReportContextRunner): void { this.#reportContext = context; @@ -229,12 +271,46 @@ export class EventLoopMonitor { if (this.#started || this.#closed) return; this.#started = true; this.#lastTickAt = performance.now(); + this.#lastTickWall = Date.now(); this.#lastCpuUsage = this.#cpuUsage(); this.#startGcObserver(); + if (this.#stackMode === 'always') this.#samplingRequested = true; if (this.#useWatchdog) this.#startWatchdog(); this.#scheduleTick(); } + /** + * Have the watchdog sample the loop thread's stack from now on (see loop_stack_sampler). Not + * while a debugger is attached to the process: our pauses would land in its session too. + */ + #requestSampling(): void { + if (this.#samplingRequested || this.#closed) return; + if (this.#inspectorAttached || inspectorUrl() !== undefined) { + if (!this.#inspectorAttached) { + this.#inspectorAttached = true; + log().debug('event loop stack sampling left off: an inspector is attached to the process'); + } + return; + } + this.#samplingRequested = true; + this.#watchdog?.postMessage({ type: 'enable_sampling' }); + } + + /** + * An inspector attached after sampling started: stop, or its breakpoints would reach the + * sampler's session as pauses to resume. Checked on every heartbeat; off for good afterwards. + */ + #stopSamplingForInspector(): void { + if (this.#inspectorAttached) return; + if (inspectorUrl() === undefined) return; + this.#inspectorAttached = true; + if (!this.#samplingRequested) return; + this.#samplingRequested = false; + this.#samplingActive = false; + this.#watchdog?.postMessage({ type: 'disable_sampling' }); + log().debug('event loop stack sampling stopped: an inspector attached to the process'); + } + /** Stop the heartbeat and the watchdog. Idempotent. */ stop(): void { if (this.#closed) return; @@ -250,6 +326,8 @@ export class EventLoopMonitor { this.#watchdog = undefined; this.#watchdogState = undefined; void watchdog?.terminate().catch(() => undefined); + this.#samplingActive = false; + this.#samples.clear(); } #startGcObserver(): void { @@ -265,12 +343,24 @@ export class EventLoopMonitor { } #startWatchdog(): void { - const shared = new SharedArrayBuffer(3 * BigInt64Array.BYTES_PER_ELEMENT); + const shared = new SharedArrayBuffer(WD_SLOTS * BigInt64Array.BYTES_PER_ELEMENT); + const state = new BigInt64Array(shared); + Atomics.store(state, WD_MAIN_LAST_TICK, BigInt(this.#lastTickWall)); + if (this.#samplingRequested && inspectorUrl() !== undefined) { + log().debug('event loop stack sampling left off: an inspector is attached to the process'); + this.#samplingRequested = false; + } try { const watchdog = new Worker(WATCHDOG_SOURCE, { eval: true, name: `livekit-loop-monitor-${this.#name}`, - workerData: { shared, interval: this.tickInterval }, + workerData: { + shared, + interval: this.tickInterval, + warnThreshold: this.warnThreshold, + lateFactor: LATE_SAMPLE_FACTOR, + samplingEnabled: this.#samplingRequested, + }, }); // the watchdog must not keep the process alive, nor take it down watchdog.unref(); @@ -279,17 +369,49 @@ export class EventLoopMonitor { this.#dropWatchdog(watchdog); }); watchdog.on('exit', () => this.#dropWatchdog(watchdog)); + watchdog.on('message', (message: WatchdogMessage) => this.#onWatchdogMessage(message)); this.#watchdog = watchdog; - this.#watchdogState = new BigInt64Array(shared); + this.#watchdogState = state; } catch (error) { log().debug({ error }, 'event loop watchdog could not start'); } } + #onWatchdogMessage(message: WatchdogMessage): void { + switch (message.type) { + case 'sampling_started': + this.#samplingActive = true; + this.#samplingStarted = [message.from, message.to]; + log().debug( + { enableDuration: message.to - message.from }, + 'event loop stack sampling started', + ); + break; + case 'sampling_unavailable': + this.#samplingRequested = false; + log().debug({ reason: message.reason }, 'event loop stack sampling unavailable'); + break; + case 'sampling_stopped': + this.#samplingActive = false; + break; + case 'stall_sample': { + const samples = this.#samples.get(message.windowStart) ?? []; + samples.push(message.sample); + this.#samples.set(message.windowStart, samples); + // a stall whose report never came (the monitor stopped) must not pin its samples + for (const key of this.#samples.keys()) { + if (key < message.windowStart - 60_000) this.#samples.delete(key); + } + break; + } + } + } + #dropWatchdog(watchdog: Worker): void { if (this.#watchdog !== watchdog) return; this.#watchdog = undefined; this.#watchdogState = undefined; + this.#samplingActive = false; } #scheduleTick(): void { @@ -310,21 +432,26 @@ export class EventLoopMonitor { (cpu.user - this.#lastCpuUsage.user + cpu.system - this.#lastCpuUsage.system) / 1000; const gcTime = this.#gcTime; this.#gcTime = 0; - // the window opens at the last on-time tick, expressed on the watchdog's wall clock - const windowStart = Date.now() - (now - this.#lastTickAt); + // the window opens at the last on-time tick, on the wall clock the watchdog shares + const nowWall = Date.now(); + const windowStart = this.#lastTickWall; this.#lastTickAt = now; + this.#lastTickWall = nowWall; this.#lastCpuUsage = cpu; + const state = this.#watchdogState; + if (state) Atomics.store(state, WD_MAIN_LAST_TICK, BigInt(nowWall)); const watchdogGap = this.#consumeWatchdogGap(windowStart); this.#scheduleTick(); + if (this.#stackMode !== 'never') this.#stopSamplingForInspector(); // GC entries for the previous stall reach the observer through two immediates, which the // late tick can run ahead of; they have landed by now, so the previous stall gets them const gcClaimed = this.#flushPending(gcTime); if (lag < this.warnThreshold) return; - this.#pending = this.buildReport(lag, { - cpuTime, - gcTime: gcClaimed ? 0 : gcTime, - watchdogGap, - }); + this.#pending = this.buildReport( + lag, + { cpuTime, gcTime: gcClaimed ? 0 : gcTime, watchdogGap }, + { start: windowStart, end: nowWall }, + ); } /** Emit the stall held from the previous tick, crediting it the GC time seen since. */ @@ -333,6 +460,10 @@ export class EventLoopMonitor { if (!pending) return false; this.#pending = undefined; pending.gcTime = Math.min(pending.gcTime + gcTime, pending.duration); + // the watchdog's samples for this stall arrived on the message port between the two ticks + const samples = this.#samples.get(pending.windowStart); + this.#samples.delete(pending.windowStart); + if (pending.cause === 'code') this.attachStack(pending, samples); this.report(pending); return true; } @@ -360,7 +491,9 @@ export class EventLoopMonitor { private buildReport( lag: number, timings: { cpuTime: number; gcTime: number; watchdogGap: number }, + window?: { start: number; end: number }, ): BlockedReport { + const endedAt = window?.end ?? Date.now(); // the watchdog is an independent thread: if it too woke late by most of the stall, the // process was not being scheduled (host contention, CPU quota, a suspended machine). Under // contention the scheduler can also starve only the watchdog while the loop thread runs @@ -373,7 +506,9 @@ export class EventLoopMonitor { return { duration: lag, // the block started no earlier than the last on-time tick - startedAt: Date.now() - lag, + startedAt: endedAt - lag, + windowStart: window?.start ?? endedAt - lag - this.tickInterval, + endedAt, warnThreshold: this.warnThreshold, // severity measures the impact on the session, whatever the cause: audio and turn handling // were delayed either way. The cause says who can fix it. @@ -406,6 +541,13 @@ export class EventLoopMonitor { // an idle child before its job, or of the worker process, must not use up the job's budget const spanEligible = this.#emitSpans && getJobContext(false) !== undefined; const emitSpan = spanEligible && this.#spanLimiter.allow(now); + // a code stall turns sampling on for the stalls that follow (adaptive), in every process: + // the worker's and an idle child's stalls are logged, and a log with a stack names the + // blocking code just as a span does. This one is reported without a stack, like the + // Python monitor's unsampled stalls + if (report.cause === 'code' && this.#stackMode === 'adaptive') { + this.#requestSampling(); + } if (!emitSpan && !emitLog) return; if (emitSpan) this.#emitSpan(report, this.#spanLimiter.takeSuppressed()); if (emitLog) this.#emitLog(report); @@ -421,6 +563,44 @@ export class EventLoopMonitor { } } + /** + * Set `stack` and `location` from the watchdog's samples of this stall, or a note saying why + * there are none, worded like the Python monitor's. + */ + private attachStack(report: BlockedReport, samples: StackSample[] | undefined): void { + const started = this.#samplingStarted; + if (started && started[0] <= report.endedAt && started[1] >= report.windowStart) { + // enabling the debugger domain enumerates every loaded script on the loop: this stall is + // that, whatever the pause then saw + report.stack = + '# no sample: the stack sampler was starting (enabling the debugger domain blocks the loop for the size of the loaded code)'; + return; + } + // a pause that landed after the loop ran again saw whatever ran next, not the block + const inStall = (samples ?? []).filter((sample) => sample.pausedAt <= report.endedAt + 2); + if (inStall.length) { + report.stack = inStall.map(formatSample).join('\n---\n'); + report.location = innermostLocation(inStall[inStall.length - 1]!); + return; + } + if (this.#stackMode === 'never') return; + if (samples?.length) { + const late = Math.max(samples[0]!.pausedAt - report.endedAt, 0); + report.stack = + '# no sample: the loop thread was in a native call for the whole stall, which the ' + + `pause could not interrupt (it landed ${late.toFixed(0)}ms after the call returned)`; + return; + } + if (this.#inspectorAttached) { + report.stack = + '# no sample: an inspector is attached to the process, so stacks are not sampled'; + return; + } + report.stack = this.#samplingActive + ? '# no sample: the block ended before the watchdog looked' + : "# no sample: stack sampling starts after a process's first stall"; + } + #emitSpan(report: BlockedReport, suppressed: number): void { const attributes: Attributes = { [ATTR_BLOCKING_DURATION]: report.duration / 1000, @@ -431,9 +611,20 @@ export class EventLoopMonitor { [ATTR_BLOCKING_CPU_TIME]: report.cpuTime / 1000, }; if (suppressed) attributes[ATTR_BLOCKING_SUPPRESSED] = suppressed; + if (report.stack) attributes[ATTR_BLOCKING_STACK] = report.stack; + // under the span that was blocked (see BlockedSpanTracker), else the session root, else the + // job's root: the heartbeat's own context predates all of them + const fallback = sessionRootContext() ?? jobRootContext() ?? this.#reportContext; + const blocked = blockedSpanTracker.blockedContext( + report.startedAt, + report.endedAt, + STALL_PARENT_EXCLUDES, + fallback ?? otelContext.active(), + this.tickInterval, + ); const span = tracer.startSpan({ name: SPAN_NAME, - context: sessionRootContext() ?? this.#reportContext, + context: blocked ?? fallback, startTime: report.startedAt, attributes, }); @@ -460,6 +651,8 @@ export class EventLoopMonitor { watchdogGap: round(report.watchdogGap), cause: report.cause, loop: this.#name, + ...(report.location ? { location: report.location } : {}), + ...(report.stack ? { stack: report.stack } : {}), }; if (report.cause === 'host') { log().warn( @@ -467,15 +660,17 @@ export class EventLoopMonitor { 'process not scheduled; the host did not run the agent for the whole stall (CPU contention or a container CPU quota), which delays audio and turn handling like blocking code would. Check the CPU limit and co-located load', ); } else if (this.watchdogActive) { + const where = report.location ? ` at ${report.location}` : ''; log().warn( fields, - 'event loop blocked; synchronous work on the agent loop delays audio and turn handling, move it to a worker thread or an async API', + `event loop blocked${where}; synchronous work on the agent loop delays audio and turn handling, move it to a worker thread or an async API`, ); } else { // without the watchdog a stall could as well be the host not scheduling the process + const where = report.location ? ` at ${report.location}` : ''; log().warn( fields, - 'event loop stalled; either synchronous work on the agent loop (move it to a worker thread or an async API) or the host did not schedule the process (CPU contention or quota)', + `event loop stalled${where}; either synchronous work on the agent loop (move it to a worker thread or an async API) or the host did not schedule the process (CPU contention or quota)`, ); } } @@ -501,6 +696,7 @@ export interface StartMonitoringOptions { name?: string; emitSpans?: boolean; watchdog?: boolean; + stacks?: StackSamplingMode; } /** Start the process event-loop monitor, or return undefined if disabled/already running. */ @@ -526,6 +722,7 @@ export function startMonitoring( name: options.name, emitSpans: options.emitSpans, watchdog: options.watchdog, + stacks: options.stacks, }); monitorState.monitor = monitor; monitor.start(); diff --git a/agents/src/telemetry/loop_monitor_stacks.test.ts b/agents/src/telemetry/loop_monitor_stacks.test.ts new file mode 100644 index 0000000000..f2adadae31 --- /dev/null +++ b/agents/src/telemetry/loop_monitor_stacks.test.ts @@ -0,0 +1,577 @@ +// SPDX-FileCopyrightText: 2026 LiveKit, Inc. +// +// SPDX-License-Identifier: Apache-2.0 + +/** + * Where a stall lands and what it says: the `event_loop_blocked` span nests under the span that + * was running when the loop blocked, and carries the loop thread's sampled stack. + */ +import { ROOT_CONTEXT, trace } from '@opentelemetry/api'; +import { InMemorySpanExporter, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base'; +import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; +import { execSync } from 'node:child_process'; +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; +import { type JobContext, runWithJobContext } from '../job.js'; +import { log } from '../log.js'; +import { BlockedSpanTracker, blockedSpanTracker } from './blocked_span_tracker.js'; +import { type BlockedReport, EventLoopMonitor, SPAN_NAME } from './loop_monitor.js'; +import { + ENV_STACKS, + MAX_STACK_FRAMES, + type StackSample, + formatSample, + innermostLocation, + stackSamplingModeFromEnv, +} from './loop_stack_sampler.js'; +import { ATTR_BLOCKING_STACK } from './trace_types.js'; +import { setTracerProvider, tracer } from './traces.js'; + +const WARN = 30; +const ERROR = 150; +const TICK = 5; + +/** Named so the sampled stack can be checked for it. */ +function burnCpuForTest(duration: number): number { + const until = performance.now() + duration; + let hash = 0; + while (performance.now() < until) { + for (let i = 0; i < 1000; i++) hash = (hash * 31 + i) | 0; + } + return hash; +} + +async function waitFor(condition: () => boolean, timeout = 3000): Promise { + const deadline = Date.now() + timeout; + while (!condition()) { + if (Date.now() > deadline) throw new Error('timed out waiting'); + await new Promise((resolve) => setTimeout(resolve, 5)); + } +} + +function fakeJob(session?: unknown, jobSpanContext?: unknown): JobContext { + return { + _primaryAgentSession: session, + _jobSpanContext: jobSpanContext, + job: { id: 'AJ_test', room: { sid: 'RM_test' } }, + } as unknown as JobContext; +} + +describe.sequential('event loop stall parent', () => { + let exporter: InMemorySpanExporter; + let provider: NodeTracerProvider; + let originalProvider: ReturnType; + let monitor: EventLoopMonitor; + let reports: BlockedReport[]; + + beforeEach(async () => { + originalProvider = tracer.getProvider(); + exporter = new InMemorySpanExporter(); + provider = new NodeTracerProvider({ + spanProcessors: [blockedSpanTracker, new SimpleSpanProcessor(exporter)], + }); + setTracerProvider(provider); + reports = []; + monitor = new EventLoopMonitor({ + warnThreshold: WARN, + errorThreshold: ERROR, + tickInterval: TICK, + watchdog: false, + stacks: 'never', + }); + monitor.onReport = (report) => reports.push(report); + }); + + afterEach(async () => { + monitor.stop(); + setTracerProvider(originalProvider); + await provider.shutdown(); + vi.restoreAllMocks(); + }); + + function stalls() { + return exporter.getFinishedSpans().filter((span) => span.name === SPAN_NAME); + } + + it('nests under the span that was running when the loop blocked', async () => { + const sessionRoot = tracer.startSpan({ name: 'agent_session' }); + const rootCtx = trace.setSpan(ROOT_CONTEXT, sessionRoot); + monitor.setReportContext(rootCtx, (fn) => + runWithJobContext(fakeJob({ rootSpanContext: rootCtx }), fn), + ); + monitor.start(); + await new Promise((resolve) => setTimeout(resolve, WARN)); + + // a tool that blocks: its span is open across the stall and ends when the call returns + const tool = tracer.startSpan({ name: 'function_tool', context: rootCtx }); + burnCpuForTest(70); + tool.end(); + await waitFor(() => stalls().length > 0); + sessionRoot.end(); + + const [stall] = stalls(); + expect(stall!.parentSpanContext?.spanId).toBe(tool.spanContext().spanId); + }); + + it('falls back to the session root, then the job root', async () => { + const sessionRoot = tracer.startSpan({ name: 'agent_session' }); + const rootCtx = trace.setSpan(ROOT_CONTEXT, sessionRoot); + monitor.setReportContext(rootCtx, (fn) => + runWithJobContext(fakeJob({ rootSpanContext: rootCtx }), fn), + ); + monitor.start(); + await new Promise((resolve) => setTimeout(resolve, WARN)); + burnCpuForTest(70); + await waitFor(() => stalls().length > 0); + expect(stalls()[0]!.parentSpanContext?.spanId).toBe(sessionRoot.spanContext().spanId); + sessionRoot.end(); + exporter.reset(); + + // no session: the job's root + const jobRoot = tracer.startSpan({ name: 'job_entrypoint' }); + const jobCtx = trace.setSpan(ROOT_CONTEXT, jobRoot); + monitor.setReportContext(undefined, (fn) => runWithJobContext(fakeJob(undefined, jobCtx), fn)); + burnCpuForTest(70); + await waitFor(() => stalls().length > 0); + expect(stalls()[0]!.parentSpanContext?.spanId).toBe(jobRoot.spanContext().spanId); + jobRoot.end(); + }); +}); + +describe('BlockedSpanTracker', () => { + afterEach(() => { + vi.useRealTimers(); + }); + + it('picks the innermost span current across the window and forgets ended ones', () => { + vi.useFakeTimers(); + const T = 1_000_000; + vi.setSystemTime(T); + const tracker = new BlockedSpanTracker({ retention: 60_000 }); + const provider = new NodeTracerProvider({ spanProcessors: [tracker] }); + const t = provider.getTracer('test'); + const outer = t.startSpan('outer'); + const inner = t.startSpan('inner'); + const early = t.startSpan('early'); + const late = t.startSpan('late'); + vi.setSystemTime(T + 40); + early.end(); // over before the window opens + vi.setSystemTime(T + 90); + late.end(); // ended after the window closed: it was current during it + vi.setSystemTime(T + 100); + // the window: [T+50, T+80]. Open spans and `late` were current; the innermost is the one + // created last, `late`; excluding it, `inner` + expect(tracker.blockedSpan(T + 50, T + 80, new Set())).toBe(late); + expect(tracker.blockedSpan(T + 50, T + 80, new Set(['late']))).toBe(inner); + expect(tracker.blockedSpan(T + 50, T + 80, new Set(['late', 'inner']))).toBe(outer); + expect( + tracker.blockedSpan(T + 50, T + 80, new Set(['late', 'inner', 'outer'])), + ).toBeUndefined(); + // a later window: only the spans still open qualify + expect(tracker.blockedSpan(T + 95, T + 99, new Set())).toBe(inner); + inner.end(); + outer.end(); + expect(tracker.openCount).toBe(0); + // ended spans are forgotten after the retention + vi.setSystemTime(T + 100 + 60_000 + 1); + t.startSpan('tick').end(); + expect(tracker.blockedSpan(T + 50, T + 80, new Set())).toBeUndefined(); + }); + + it('does not guess between two operations of the same kind', () => { + // two tools of one turn were both in flight when the loop blocked: timing cannot say which + // one spun, so the stall lands on the turn that contains both, not on the newer tool + vi.useFakeTimers(); + const T = 2_000_000; + vi.setSystemTime(T); + const tracker = new BlockedSpanTracker({ retention: 60_000 }); + const provider = new NodeTracerProvider({ spanProcessors: [tracker] }); + const t = provider.getTracer('test'); + const session = t.startSpan('agent_session'); + const turn = t.startSpan('agent_turn', {}, trace.setSpan(ROOT_CONTEXT, session)); + const turnCtx = trace.setSpan(ROOT_CONTEXT, turn); + const toolA = t.startSpan('function_tool', {}, turnCtx); + vi.setSystemTime(T + 10); + const toolB = t.startSpan('function_tool', {}, turnCtx); + vi.setSystemTime(T + 100); + expect(tracker.blockedSpan(T + 50, T + 80, new Set())).toBe(turn); + // once one of them is over before the window, the other is the one that blocked + toolA.end(); + vi.setSystemTime(T + 200); + expect(tracker.blockedSpan(T + 150, T + 180, new Set())).toBe(toolB); + toolB.end(); + + // operations of different kinds overlap all the time: the newest is the one that blocked + const userTurn = t.startSpan('user_turn', {}, trace.setSpan(ROOT_CONTEXT, session)); + vi.setSystemTime(T + 210); + const rpc = t.startSpan('rpc_handler', {}, trace.setSpan(ROOT_CONTEXT, session)); + vi.setSystemTime(T + 300); + expect(tracker.blockedSpan(T + 250, T + 280, new Set())).toBe(rpc); + rpc.end(); + userTurn.end(); + + // two of a kind with no common ancestor in sight: nothing, rather than a wrong parent + const rootA = t.startSpan('rpc_handler'); + vi.setSystemTime(T + 310); + const rootB = t.startSpan('rpc_handler'); + vi.setSystemTime(T + 400); + expect(tracker.blockedSpan(T + 350, T + 380, new Set())).toBeUndefined(); + rootA.end(); + rootB.end(); + turn.end(); + session.end(); + }); + + it('ignores a span created after the window, whatever its start time claims', () => { + const tracker = new BlockedSpanTracker(); + const provider = new NodeTracerProvider({ spanProcessors: [tracker] }); + const t = provider.getTracer('test'); + const windowStart = Date.now() - 500; + // back-dated like eou_wait: created now, starts in the past + const backdated = t.startSpan('eou_wait', { startTime: windowStart - 1000 }); + expect(tracker.blockedSpan(windowStart, windowStart + 100, new Set())).toBeUndefined(); + backdated.end(); + }); +}); + +describe.sequential('event loop stall stacks', () => { + let exporter: InMemorySpanExporter; + let provider: NodeTracerProvider; + let originalProvider: ReturnType; + let sessionRoot: ReturnType; + let monitors: EventLoopMonitor[]; + + beforeEach(() => { + originalProvider = tracer.getProvider(); + exporter = new InMemorySpanExporter(); + provider = new NodeTracerProvider({ spanProcessors: [new SimpleSpanProcessor(exporter)] }); + setTracerProvider(provider); + sessionRoot = tracer.startSpan({ name: 'agent_session' }); + monitors = []; + }); + + afterEach(async () => { + for (const monitor of monitors) monitor.stop(); + sessionRoot.end(); + setTracerProvider(originalProvider); + await provider.shutdown(); + vi.restoreAllMocks(); + vi.unstubAllEnvs(); + }); + + function startMonitor(stacks: 'adaptive' | 'always' | 'never'): { + monitor: EventLoopMonitor; + reports: BlockedReport[]; + } { + const reports: BlockedReport[] = []; + const monitor = new EventLoopMonitor({ + warnThreshold: WARN, + errorThreshold: ERROR, + tickInterval: TICK, + stacks, + }); + monitor.onReport = (report) => reports.push(report); + const rootCtx = trace.setSpan(ROOT_CONTEXT, sessionRoot); + monitor.setReportContext(rootCtx, (fn) => + runWithJobContext(fakeJob({ rootSpanContext: rootCtx }), fn), + ); + monitor.start(); + monitors.push(monitor); + return { monitor, reports }; + } + + function stalls() { + return exporter.getFinishedSpans().filter((span) => span.name === SPAN_NAME); + } + + /** The watchdog is up (it vouches for the process) and, if asked, sampling too. */ + async function watchdogReady(monitor: EventLoopMonitor, sampling: boolean): Promise { + await waitFor(() => monitor.watchdogActive); + if (sampling) await waitFor(() => monitor.stackSamplingActive); + // enabling the debugger domain blocks the loop for a moment: let that stall be reported + await new Promise((resolve) => setTimeout(resolve, WARN + TICK * 4)); + } + + /** + * The report of `block`'s stall whose sampled stack names `needle`. On a loaded host (CI runs + * every test file at once) the block's stall can be preceded by stalls of the host's own, and + * a pause can land in one of those instead: the block is retried a few times rather than + * trusting the first report after it. + */ + async function sampledStall( + reports: BlockedReport[], + block: () => void, + needle: string, + attempts = 3, + ): Promise { + for (let attempt = 0; attempt < attempts; attempt++) { + const before = codeReports(reports).length; + block(); + const found = () => + codeReports(reports) + .slice(before) + .find((r) => r.stack?.includes(needle)); + try { + await waitFor(() => found() !== undefined, 1_500); + } catch { + continue; + } + return found()!; + } + throw new Error(`no sampled stall naming ${needle} in ${attempts} attempts`); + } + + /** Reports of the loop's own code (a loaded host can add host stalls around a test's block). */ + function codeReports(reports: BlockedReport[]): BlockedReport[] { + return reports.filter((report) => report.cause === 'code'); + } + + it('samples after the first stall by default, and names the blocking function', async () => { + const { monitor, reports } = startMonitor('adaptive'); + await watchdogReady(monitor, false); + expect(monitor.stackSamplingActive).toBe(false); + + burnCpuForTest(70); + await waitFor(() => codeReports(reports).length >= 1); + // the first stall turned sampling on but was itself reported without a stack + expect(codeReports(reports)[0]!.stack).toBe( + "# no sample: stack sampling starts after a process's first stall", + ); + expect(codeReports(reports)[0]!.location).toBeUndefined(); + await watchdogReady(monitor, true); + // enabling the debugger domain blocks the loop itself (see samplingStarted): with this + // test's 30 ms threshold that is a stall of its own, and it is reported as such + for (const report of codeReports(reports).slice(1)) { + expect(report.stack).toContain('the stack sampler was starting'); + } + + const report = await sampledStall(reports, () => burnCpuForTest(80), 'at burnCpuForTest ('); + expect(report.stack).toMatch(/^# loop thread sampled \d+ms into the stall\n/); + expect(report.location).toMatch(/^burnCpuForTest \(.*loop_monitor_stacks\.test\.ts:\d+\)$/); + expect(stalls().some((span) => span.attributes[ATTR_BLOCKING_STACK] === report.stack)).toBe( + true, + ); + }); + + it('has no stacks to offer without the watchdog thread, and says nothing', async () => { + // the sampler is the watchdog thread's: `always` without it would promise stacks that + // never come, and note on every stall that sampling starts after the first one + const reports: BlockedReport[] = []; + const monitor = new EventLoopMonitor({ + warnThreshold: WARN, + errorThreshold: ERROR, + tickInterval: TICK, + watchdog: false, + stacks: 'always', + }); + monitor.onReport = (report) => reports.push(report); + monitor.start(); + monitors.push(monitor); + burnCpuForTest(70); + await waitFor(() => codeReports(reports).length >= 1); + expect(monitor.stackSamplingActive).toBe(false); + expect(codeReports(reports)[0]!.stack).toBeUndefined(); + }); + + it('stops sampling when an inspector attaches, and says why', async () => { + const inspector = await import('node:inspector'); + const { monitor, reports } = startMonitor('always'); + await watchdogReady(monitor, true); + expect(monitor.stackSamplingActive).toBe(true); + // an operator enables the inspector on the running process + inspector.open(0, '127.0.0.1', false); + try { + expect(inspector.url()).toBeDefined(); + await waitFor(() => !monitor.stackSamplingActive); + const before = codeReports(reports).length; + burnCpuForTest(70); + await waitFor(() => codeReports(reports).length >= before + 1); + const report = codeReports(reports)[before]!; + expect(report.stack).toContain('an inspector is attached'); + expect(report.location).toBeUndefined(); + } finally { + inspector.close(); + } + }); + + it('samples in the worker process too, into the log', async () => { + // no spans and no job in the worker: the stack still names the blocking code in the log, + // as the Python monitor's does in every process + const warn = vi.spyOn(log(), 'warn').mockImplementation(() => undefined); + const reports: BlockedReport[] = []; + const monitor = new EventLoopMonitor({ + warnThreshold: WARN, + errorThreshold: ERROR, + tickInterval: TICK, + emitSpans: false, + stacks: 'adaptive', + }); + monitor.onReport = (report) => reports.push(report); + monitor.start(); + monitors.push(monitor); + await watchdogReady(monitor, false); + + burnCpuForTest(70); + await waitFor(() => codeReports(reports).length >= 1); + expect(codeReports(reports)[0]!.stack).toBe( + "# no sample: stack sampling starts after a process's first stall", + ); + await watchdogReady(monitor, true); + + const report = await sampledStall(reports, () => burnCpuForTest(80), 'at burnCpuForTest ('); + expect(stalls()).toEqual([]); + const logged = warn.mock.calls.map((call) => call[0] as { stack?: string }); + expect(logged.some((fields) => fields.stack === report.stack)).toBe(true); + }); + + it('samples from the start with always, and never with never', async () => { + const always = startMonitor('always'); + await watchdogReady(always.monitor, true); + await sampledStall(always.reports, () => burnCpuForTest(80), 'at burnCpuForTest ('); + always.monitor.stop(); + + exporter.reset(); + const never = startMonitor('never'); + await watchdogReady(never.monitor, false); + burnCpuForTest(70); + await waitFor(() => codeReports(never.reports).length >= 1); + expect(never.monitor.stackSamplingActive).toBe(false); + expect(codeReports(never.reports)[0]!.stack).toBeUndefined(); + expect(stalls().every((span) => span.attributes[ATTR_BLOCKING_STACK] === undefined)).toBe(true); + }); + + it('takes a second look at a long stall', async () => { + const { monitor, reports } = startMonitor('always'); + await watchdogReady(monitor, true); + // past LATE_SAMPLE_FACTOR x the threshold + const report = await sampledStall( + reports, + () => burnCpuForTest(WARN * 12), + 'at burnCpuForTest (', + ); + const stack = report.stack!; + const headers = stack.split('\n').filter((line) => line.startsWith('# loop thread sampled')); + expect(headers).toHaveLength(2); + const offsets = headers.map((line) => Number(/(\d+)ms/.exec(line)![1])); + expect(offsets[0]).toBeLessThan(offsets[1]!); + expect(offsets[1]).toBeGreaterThanOrEqual(WARN * 10 - TICK); + expect(stack.split('\n---\n')).toHaveLength(2); + }); + + it('samples a native call in its caller once it returns', async () => { + const { monitor, reports } = startMonitor('always'); + await watchdogReady(monitor, true); + // a synchronous child process: V8 services the pause only when the call returns, so the + // sample is taken at the end of the stall, in the frame that made the call (Atomics.wait, + // by contrast, checks for interrupts and is sampled while waiting) + const report = await sampledStall( + reports, + () => execSync('sleep 0.08'), + 'loop_monitor_stacks.test.ts', + ); + const offset = Number(/sampled (\d+)ms/.exec(report.stack!)![1]); + // the call started up to a heartbeat before the stall is dated from + expect(offset).toBeGreaterThanOrEqual(75 - TICK); + }); + + it('discards a pause that landed after the loop had moved on', () => { + const { monitor } = startMonitor('adaptive'); + const report = monitor['buildReport'](100, { cpuTime: 5, gcTime: 0, watchdogGap: 0 }); + const late = { offset: 150, pausedAt: report.endedAt + 50, frames: [] }; + monitor['attachStack'](report, [late]); + expect(report.stack).toContain('native call'); + expect(report.stack).toContain('50ms after the call returned'); + expect(report.location).toBeUndefined(); + // and with no sample at all while sampling is off, the note says when it starts + const short = monitor['buildReport'](100, { cpuTime: 5, gcTime: 0, watchdogGap: 0 }); + monitor['attachStack'](short, undefined); + expect(short.stack).toBe("# no sample: stack sampling starts after a process's first stall"); + }); + + it('puts the location in the warning', async () => { + const warn = vi.spyOn(log(), 'warn').mockImplementation(() => undefined); + const { monitor, reports } = startMonitor('always'); + await watchdogReady(monitor, true); + await sampledStall(reports, () => burnCpuForTest(80), 'at burnCpuForTest ('); + const call = warn.mock.calls.find((args) => String(args[1]).includes('at burnCpuForTest')); + expect(call).toBeDefined(); + expect(String(call![1])).toMatch(/^event loop blocked at burnCpuForTest \(/); + expect((call![0] as { location?: string }).location).toContain('burnCpuForTest'); + expect((call![0] as { stack?: string }).stack).toContain('at burnCpuForTest ('); + }); + + it('reads env: adaptive by default, 1/always, 0/never', () => { + expect(stackSamplingModeFromEnv({})).toBe('adaptive'); + expect(stackSamplingModeFromEnv({ [ENV_STACKS]: '1' })).toBe('always'); + expect(stackSamplingModeFromEnv({ [ENV_STACKS]: 'always' })).toBe('always'); + expect(stackSamplingModeFromEnv({ [ENV_STACKS]: '0' })).toBe('never'); + expect(stackSamplingModeFromEnv({ [ENV_STACKS]: 'never' })).toBe('never'); + expect(stackSamplingModeFromEnv({ [ENV_STACKS]: 'sometimes' })).toBe('adaptive'); + }); +}); + +describe('stack formatting', () => { + const frame = (functionName: string, url: string, line = 1) => ({ + functionName, + url, + line, + column: 1, + }); + const sample = (offset: number, frames: StackSample['frames']): StackSample => ({ + offset, + pausedAt: 0, + frames, + }); + + it('formats like the Python monitor and cuts internals and the job runner', () => { + const text = formatSample( + sample(42.4, [ + frame('slowTool', 'file:///app/tools.js', 12), + frame('processTimers', 'node:internal/timers', 500), + frame('runEntry', 'file:///app/node_modules/@livekit/agents/dist/voice/x.js', 1), + frame( + 'startJob', + 'file:///app/node_modules/@livekit/agents/dist/ipc/job_proc_lazy_main.js', + 7, + ), + frame('bootstrap', 'node:internal/main', 1), + ]), + ); + expect(text.split('\n')[0]).toBe('# loop thread sampled 42ms into the stall'); + expect(text).toContain('at slowTool (/app/tools.js:12:1)'); + expect(text).not.toContain('processTimers'); + expect(text).not.toContain('startJob'); + expect(text).not.toContain('bootstrap'); + expect(text).toContain('runEntry'); + // the innermost frame is kept even when it is Node's own + expect(formatSample(sample(0, [frame('wait', '', 0)]))).toContain('at wait (native)'); + expect(formatSample(sample(0, [frame('read', 'node:fs', 3)]))).toContain( + 'at read (node:fs:3:1)', + ); + // and the frame budget is the innermost 20 + const deep = sample( + 0, + Array.from({ length: 30 }, (_, i) => frame(`f${i}`, 'file:///x.js', i)), + ); + const lines = formatSample(deep).split('\n').slice(1); + expect(lines).toHaveLength(MAX_STACK_FRAMES); + expect(lines[0]).toContain('f0'); + }); + + it('names the innermost frame of the agent’s own code', () => { + expect( + innermostLocation( + sample(0, [ + frame('wait', '', 0), + frame( + 'recordException', + 'file:///app/node_modules/@livekit/agents/dist/telemetry/utils.js', + 3, + ), + frame('myTool', 'file:///app/src/agent.ts', 42), + ]), + ), + ).toBe('myTool (/app/src/agent.ts:42)'); + expect(innermostLocation(sample(0, [frame('wait', '', 0)]))).toBe('wait (native)'); + expect(innermostLocation(sample(0, []))).toBeUndefined(); + }); +}); diff --git a/agents/src/telemetry/loop_stack_sampler.ts b/agents/src/telemetry/loop_stack_sampler.ts new file mode 100644 index 0000000000..1a5aa556a6 --- /dev/null +++ b/agents/src/telemetry/loop_stack_sampler.ts @@ -0,0 +1,282 @@ +// SPDX-FileCopyrightText: 2026 LiveKit, Inc. +// +// SPDX-License-Identifier: Apache-2.0 + +/** + * Stack samples for event loop stalls, taken from the watchdog thread. + * + * The Python monitor's watchdog thread reads the loop thread's stack with + * `sys._current_frames()`. Node has no cross-thread stack read, but a worker thread can attach an + * inspector session to the main thread (`Session.connectToMainThread`) and, with the debugger + * domain enabled, ask it to pause: V8 honours `Debugger.pause` at the next interrupt check even + * inside a spinning script, hands the session the full call stack (function names, files, lines, + * for optimized code too), and resumes on request about a millisecond later. Enabling the + * debugger domain costs a one-time enumeration of the loaded scripts on the main thread (tens of + * milliseconds with the framework loaded) and about 1% of throughput afterwards; a pause costs + * only when a stall is under way. + * + * What it cannot see: a native call that does not check for interrupts (a sync file or + * child-process call, a native addon; `Atomics.wait` does check) keeps the pause waiting until + * the call returns. The sample then shows the caller, still in the frame that made the call, + * which is what the Python watchdog sees once a native call releases the GIL. Only a pause that + * lands after the loop has moved on to other work is discarded, with a note. + * + * V8's sampling profiler was the first choice and does capture native calls, but on Node 24 + * only the first profile of a process names code optimized before it started: every later + * profile attributes a hot function's samples to its caller, and reading samples means + * restarting the profile. Not usable for repeated captures. + */ +import { log } from '../log.js'; +import type { StackSamplingMode } from './loop_monitor.js'; + +/** Innermost frames kept per sample, as in the Python monitor. */ +export const MAX_STACK_FRAMES = 20; +/** A second sample this many warn thresholds into a stall, so a long block gets a second look. */ +export const LATE_SAMPLE_FACTOR = 10; + +export const ENV_STACKS = 'LIVEKIT_AGENTS_LOOP_BLOCK_STACKS'; + +export function stackSamplingModeFromEnv(env: NodeJS.ProcessEnv = process.env): StackSamplingMode { + const raw = env[ENV_STACKS]?.trim().toLowerCase(); + if (raw === undefined || raw === '') return 'adaptive'; + if (raw === '1' || raw === 'always' || raw === 'true') return 'always'; + if (raw === '0' || raw === 'never' || raw === 'false') return 'never'; + if (raw === 'adaptive') return 'adaptive'; + log().warn( + { value: raw }, + `invalid ${ENV_STACKS}, expected adaptive, always or never; using adaptive`, + ); + return 'adaptive'; +} + +/** One frame of a sampled stack, innermost first in {@link StackSample.frames}. */ +export interface StackFrame { + functionName: string; + url: string; + /** 1-based, 0 when unknown. */ + line: number; + column: number; +} + +export interface StackSample { + /** Milliseconds into the stall the loop thread was paused. */ + offset: number; + /** When the pause landed, epoch ms: past the stall's end, the loop was in a native call. */ + pausedAt: number; + /** Innermost first. */ + frames: StackFrame[]; +} + +// -- the worker side ------------------------------------------------------------------------ + +/** Slots of the SharedArrayBuffer shared with the watchdog thread (Date.now() ms as BigInt). */ +export const WD_LAST_WAKE = 0; +export const WD_LATE_AT = 1; +export const WD_LATE_GAP = 2; +/** The main thread's last heartbeat, written by the monitor: the watchdog measures the lag from it. */ +export const WD_MAIN_LAST_TICK = 3; +export const WD_SLOTS = 4; + +/** Messages from the watchdog thread. */ +export type WatchdogMessage = + | { type: 'sampling_started'; from: number; to: number } + | { type: 'sampling_unavailable'; reason: string } + | { type: 'sampling_stopped' } + | { type: 'stall_sample'; windowStart: number; sample: StackSample }; + +/** Messages to the watchdog thread. */ +export type WatchdogCommand = { type: 'enable_sampling' } | { type: 'disable_sampling' }; + +/** + * The watchdog thread. Every `interval` ms it records its own wake-up (late wake-ups mean the + * process was not scheduled) and, once sampling is enabled, checks how late the main thread's + * heartbeat is: at the warn threshold it pauses the main thread through the inspector and posts + * the stack, and again at {@link LATE_SAMPLE_FACTOR} times the threshold if the stall goes on. + * Written as a plain script for `new Worker(source, { eval: true })`, so it bundles with the + * package as a string. + */ +export const WATCHDOG_SOURCE = ` +const { workerData, parentPort } = require('node:worker_threads'); +const state = new BigInt64Array(workerData.shared); +const { interval, warnThreshold, lateFactor } = workerData; +let before = Date.now(); + +// -- host contention: the watchdog's own late wake-ups +setInterval(() => { + const now = Date.now(); + const gap = now - before - interval; + before = now; + if (gap > Number(Atomics.load(state, ${WD_LATE_GAP}))) { + Atomics.store(state, ${WD_LATE_AT}, BigInt(now)); + Atomics.store(state, ${WD_LATE_GAP}, BigInt(gap)); + } + Atomics.store(state, ${WD_LAST_WAKE}, BigInt(now)); + if (session) void checkStall(now); +}, interval); + +// -- stack sampling: pause the main thread at the warn threshold, and once more much later +let session; +let pausing; // the sample being taken +let incident; // { windowStart, first: boolean, late: boolean } +const scripts = new Map(); // script id -> url, for frames whose url V8 leaves empty (vm scripts) + +function post(method, params) { + return new Promise((resolve, reject) => + session.post(method, params, (error, result) => (error ? reject(error) : resolve(result))), + ); +} + +async function enable() { + if (session) return; + const inspector = require('node:inspector'); + const s = new inspector.Session(); + s.connectToMainThread(); + s.on('Debugger.scriptParsed', (event) => { + if (event.params.url) scripts.set(event.params.scriptId, event.params.url); + }); + s.on('Debugger.paused', (event) => { + if (pausing) { + pausing.resolve(event.params); + } else { + // a debugger statement in user code, which only pauses because this session enabled + // the domain: resume, as it would have been a no-op without it. Breakpoints of a real + // debugger never reach here: the monitor disables sampling as soon as one attaches + s.post('Debugger.resume', () => undefined); + } + }); + const from = Date.now(); + session = s; + try { + await post('Debugger.enable'); + parentPort.postMessage({ type: 'sampling_started', from, to: Date.now() }); + } catch (error) { + session = undefined; + parentPort.postMessage({ type: 'sampling_unavailable', reason: String(error) }); + } +} + +async function checkStall(now) { + if (pausing) return; + const mainLastTick = Number(Atomics.load(state, ${WD_MAIN_LAST_TICK})); + if (!mainLastTick) return; + const lag = now - (mainLastTick + interval); + if (lag < warnThreshold) { + incident = undefined; + return; + } + if (!incident || incident.windowStart !== mainLastTick) { + incident = { windowStart: mainLastTick, first: false, late: false }; + } + const wantFirst = !incident.first; + const wantLate = !incident.late && lag >= warnThreshold * lateFactor; + if (!wantFirst && !wantLate) return; + if (wantFirst) incident.first = true; + if (wantLate) incident.late = true; + const sample = await pauseMainThread(); + if (sample) { + parentPort.postMessage({ + type: 'stall_sample', + windowStart: incident.windowStart, + // measured from the stall's start as the report dates it: the tick that was due one + // interval after the last on-time one + sample: { ...sample, offset: sample.pausedAt - incident.windowStart - interval }, + }); + } +} + +// an inspector attached to the process: get out of its way, its pauses are not ours to resume +async function disable() { + const s = session; + if (!s) return; + session = undefined; + incident = undefined; + if (pausing) pausing.resolve(undefined); + try { + await new Promise((resolve) => s.post('Debugger.disable', () => resolve())); + } catch {} + s.disconnect(); + parentPort.postMessage({ type: 'sampling_stopped' }); +} + +async function pauseMainThread() { + let resolve; + const paused = new Promise((r) => (resolve = r)); + pausing = { resolve }; + try { + await post('Debugger.pause'); + const params = await paused; + if (!params) return undefined; // sampling was disabled while the pause was pending + const pausedAt = Date.now(); + const frames = params.callFrames.slice(0, ${MAX_STACK_FRAMES}).map((frame) => ({ + functionName: frame.functionName || '', + url: frame.url || scripts.get(frame.location.scriptId) || '', + line: frame.location.lineNumber >= 0 ? frame.location.lineNumber + 1 : 0, + column: frame.location.columnNumber >= 0 ? frame.location.columnNumber + 1 : 0, + })); + await post('Debugger.resume'); + return { pausedAt, frames }; + } catch { + return undefined; + } finally { + pausing = undefined; + } +} + +parentPort.on('message', (command) => { + if (command && command.type === 'enable_sampling') void enable(); + if (command && command.type === 'disable_sampling') void disable(); +}); +if (workerData.samplingEnabled) void enable(); +`; + +// -- formatting ----------------------------------------------------------------------------- + +// the framework's job runner: everything outer than its innermost frame is the same in every +// sample (the process bootstrap, the entrypoint wrapper), like the Python monitor's `ipc/` cut. +// The framework is recognised by its built package path (installed, or linked from a workspace +// checkout); its own tests run from source and count as user code +const RUNNER_PATH = /[/\\](agents[/\\]dist|@livekit[/\\]agents[/\\]dist)[/\\]ipc[/\\]/; +const FRAMEWORK_PATH = /[/\\](agents[/\\]dist|@livekit[/\\]agents[/\\]dist)[/\\]/; + +function isNodeInternal(frame: StackFrame): boolean { + return frame.url.startsWith('node:'); +} + +function fileOf(frame: StackFrame): string { + return frame.url.startsWith('file://') ? decodeURIComponent(frame.url.slice(7)) : frame.url; +} + +function formatFrame(frame: StackFrame): string { + const name = frame.functionName || '(anonymous)'; + if (!frame.url) return ` at ${name} (native)`; + return ` at ${name} (${fileOf(frame)}:${frame.line}:${frame.column})`; +} + +/** + * Format one sample like the Python monitor formats one of its: a header saying when in the + * stall it was taken, then the innermost {@link MAX_STACK_FRAMES} frames, innermost first. + * Node's own internals (the timer and promise machinery, the same in every sample) are dropped + * except as the innermost frame, and everything outer than the framework's job runner is cut. + */ +export function formatSample(sample: StackSample): string { + let frames = sample.frames.filter((frame, i) => i === 0 || !isNodeInternal(frame)); + const runner = frames.findIndex((frame) => RUNNER_PATH.test(frame.url)); + if (runner > 0) frames = frames.slice(0, runner); + const lines = frames.slice(0, MAX_STACK_FRAMES).map(formatFrame); + return `# loop thread sampled ${sample.offset.toFixed(0)}ms into the stall\n${lines.join('\n')}`; +} + +/** + * The innermost frame of a sample that is the agent's or a library's own code, skipping Node's + * internals and the framework: the actionable location, for the log line. + */ +export function innermostLocation(sample: StackSample): string | undefined { + const own = sample.frames.find( + (frame) => frame.url && !isNodeInternal(frame) && !FRAMEWORK_PATH.test(frame.url), + ); + const frame = own ?? sample.frames.find((frame) => frame.url) ?? sample.frames[0]; + if (!frame) return undefined; + const name = frame.functionName || '(anonymous)'; + if (!frame.url) return `${name} (native)`; + return `${name} (${fileOf(frame)}:${frame.line})`; +} diff --git a/agents/src/telemetry/trace_types.ts b/agents/src/telemetry/trace_types.ts index ca9a4957a2..a1b074d0fd 100644 --- a/agents/src/telemetry/trace_types.ts +++ b/agents/src/telemetry/trace_types.ts @@ -246,9 +246,13 @@ export const ATTR_BLOCKING_THRESHOLD = 'lk.blocking.threshold'; export const ATTR_BLOCKING_SEVERITY = 'lk.blocking.severity'; /** `code` for synchronous work on the loop, `host` when the process itself was not scheduled. */ export const ATTR_BLOCKING_CAUSE = 'lk.blocking.cause'; -/** Not populated by the Node runtime: it cannot sample another thread's JavaScript stack. */ +/** Not populated by the Node runtime: it has no named tasks to attribute a stall to. */ export const ATTR_BLOCKING_TASK = 'lk.blocking.task'; -/** Not populated by the Node runtime: it cannot sample another thread's JavaScript stack. */ +/** + * Stacks of the loop thread sampled during the stall by V8's profiler, one block per sample + * headed by when in the stall it was taken, innermost frames first; or a one-line note saying + * why there is none. + */ export const ATTR_BLOCKING_STACK = 'lk.blocking.stack'; /** Garbage-collection pause time inside the stall, in seconds. */ export const ATTR_BLOCKING_GC_TIME = 'lk.blocking.gc_time'; diff --git a/agents/src/telemetry/traces.otel2.type.test.ts b/agents/src/telemetry/traces.otel2.type.test.ts index 2cae5c813f..eed6d626d2 100644 --- a/agents/src/telemetry/traces.otel2.type.test.ts +++ b/agents/src/telemetry/traces.otel2.type.test.ts @@ -171,9 +171,10 @@ describe('setupCloudTracer with an OpenTelemetry SDK 2.x provider', () => { }); expect(tracer.getProvider()).toBe(provider); - // PII stripper + session metadata processor + built-in cloud span processor - expect(registered).toHaveLength(3); + // PII stripper + the loop monitor's blocked-span tracker + session metadata processor + + // built-in cloud span processor + expect(registered).toHaveLength(4); expect(registered[0]).toBeInstanceOf(PIIFilteringSpanProcessor); - expect(registered[2]).toBeInstanceOf(BatchSpanProcessor); + expect(registered[3]).toBeInstanceOf(BatchSpanProcessor); }); }); diff --git a/agents/src/telemetry/traces.test.ts b/agents/src/telemetry/traces.test.ts index c91ee9babb..2725293fc8 100644 --- a/agents/src/telemetry/traces.test.ts +++ b/agents/src/telemetry/traces.test.ts @@ -507,13 +507,13 @@ describe('setupCloudTracer with a user-configured provider', () => { // No span is created/ended here so the newly attached cloud BatchSpanProcessor has // nothing to flush over the network on shutdown. expect(tracer.getProvider()).toBe(userProvider); - // setTracerProvider registers the user metadata processor and the in-process PII - // stripper; setupCloudTracer registers the session metadata processor plus the built-in - // (SDK 2.x) cloud exporter. - expect(registeredProcessors).toHaveLength(4); + // setTracerProvider registers the user metadata processor, the in-process PII stripper + // and the loop monitor's blocked-span tracker; setupCloudTracer registers the session + // metadata processor plus the built-in (SDK 2.x) cloud exporter. + expect(registeredProcessors).toHaveLength(5); expect(registeredProcessors[1]).toBeInstanceOf(PIIFilteringSpanProcessor); const setAttributes = vi.fn(); - registeredProcessors[2]!.onStart({ setAttributes } as never, otelContext.active()); + registeredProcessors[3]!.onStart({ setAttributes } as never, otelContext.active()); // agent_name rides the session metadata so spans (and logs) carry it even on // the custom-provider path, where the resource is left untouched. expect(setAttributes).toHaveBeenCalledWith({ @@ -521,7 +521,7 @@ describe('setupCloudTracer with a user-configured provider', () => { job_id: 'job1', 'lk.agent_name': 'my-agent', }); - expect(registeredProcessors[3]).toBeInstanceOf(BatchSpanProcessor); + expect(registeredProcessors[4]).toBeInstanceOf(BatchSpanProcessor); }); it('passes the gated exporter to a user-supplied cloud processor factory', async () => { @@ -545,10 +545,11 @@ describe('setupCloudTracer with a user-configured provider', () => { }); expect(createCloudSpanProcessor).toHaveBeenCalledOnce(); - // the PII stripper, the session metadata processor, then the factory's cloud processor - expect(registeredProcessors).toHaveLength(3); + // the PII stripper, the loop monitor's blocked-span tracker, the session metadata + // processor, then the factory's cloud processor + expect(registeredProcessors).toHaveLength(4); expect(registeredProcessors[0]).toBeInstanceOf(PIIFilteringSpanProcessor); - expect(registeredProcessors[2]).toBe(factoryProcessor); + expect(registeredProcessors[3]).toBe(factoryProcessor); }); it('requires registerSpanProcessor and never calls addSpanProcessor', async () => { diff --git a/agents/src/telemetry/traces.ts b/agents/src/telemetry/traces.ts index 27c3a26627..abd61e8b92 100644 --- a/agents/src/telemetry/traces.ts +++ b/agents/src/telemetry/traces.ts @@ -51,6 +51,7 @@ import { } from '../types.js'; import { version } from '../version.js'; import { type SessionReport, sessionReportToJSON } from '../voice/report.js'; +import { blockedSpanTracker } from './blocked_span_tracker.js'; import type { ObservabilityEndpoint } from './observability_endpoint.js'; import { resolveObservabilityUrl } from './observability_endpoint.js'; import { type SimpleLogRecord, SimpleOTLPHttpLogExporter } from './otel_http_exporter.js'; @@ -332,6 +333,22 @@ interface CustomProviderConfig { const customProviderConfigs = new WeakMap(); /** Providers that already carry the in-process PII stripper — installed at most once. */ const piiRedactionInstalled = new WeakSet(); +/** Providers already reporting their spans to the loop monitor's blocked-span tracker. */ +const blockedSpanTrackerInstalled = new WeakSet(); + +/** + * Report the provider's spans to the loop monitor's {@link blockedSpanTracker}, so a stall + * nests under the span that was running. Once per provider; a user's provider needs a + * registrar, like PII redaction. + */ +function installBlockedSpanTracker( + provider: TracerProvider, + registerSpanProcessor: SpanProcessorRegistrar | undefined, +): void { + if (blockedSpanTrackerInstalled.has(provider) || !registerSpanProcessor) return; + blockedSpanTrackerInstalled.add(provider); + registerSpanProcessor(blockedSpanTracker); +} let cloudMeterProvider: MeterProvider | undefined; let cloudMetricsUnavailable = false; @@ -528,6 +545,7 @@ export function setTracerProvider( } installPIIRedaction(provider, registerSpanProcessor, options?.allowPii); + installBlockedSpanTracker(provider, registerSpanProcessor); if (registerSpanProcessor) { customProviderConfigs.set(provider, { @@ -635,10 +653,13 @@ export async function prepareCloudTracer( // strips PII while the span is still mutable, ahead of every exporter's onEnd new PIIFilteringSpanProcessor(allowPiiFromEnv() ?? true), metadata, + // which span a loop stall happened under (see BlockedSpanTracker) + blockedSpanTracker, new BatchSpanProcessor(gate), ], }); piiRedactionInstalled.add(provider); + blockedSpanTrackerInstalled.add(provider); gate.openJob(options.jobId); preparedCloud = { provider, gate, metadata, observabilityUrl }; // register() installs an AsyncLocalStorageContextManager (needed for span nesting) and sets @@ -762,6 +783,7 @@ export async function setupCloudTracer( // strips PII while the span is still mutable, ahead of every exporter's onEnd new PIIFilteringSpanProcessor(allowPiiFromEnv() ?? true), new MetadataSpanProcessor(sessionMetadata), + blockedSpanTracker, new BatchSpanProcessor(createCloudExporter()), ], }); @@ -769,6 +791,7 @@ export async function setupCloudTracer( // setTracerProvider call below finds no registrar and warns that redaction could // not be installed, on the default path where it demonstrably was piiRedactionInstalled.add(tracerProvider); + blockedSpanTrackerInstalled.add(tracerProvider); // register() installs an AsyncLocalStorageContextManager (needed for span nesting) // and sets the global tracer provider. Both use set-once semantics in the OTel API, // so if the user already called NodeSDK.start(), these are safe no-ops. @@ -798,6 +821,7 @@ export async function setupCloudTracer( // the spans going to the user's own backend. room_id/job_id — the keys Cloud // correlates on — still ride along as span attributes via MetadataSpanProcessor. installPIIRedaction(existingProvider, config.registerSpanProcessor, undefined); + installBlockedSpanTracker(existingProvider, config.registerSpanProcessor); config.registerSpanProcessor(new MetadataSpanProcessor(sessionMetadata)); config.registerSpanProcessor(cloudSpanProcessor); } diff --git a/turbo.json b/turbo.json index e288e54913..85174b414c 100644 --- a/turbo.json +++ b/turbo.json @@ -37,6 +37,7 @@ "LIVEAVATAR_API_KEY", "LIVEAVATAR_API_URL", "LIVEAVATAR_AVATAR_ID", + "LIVEKIT_AGENTS_LOOP_BLOCK_STACKS", "LIVEKIT_API_KEY", "LIVEKIT_API_SECRET", "LIVEKIT_INFERENCE_TESTS",