@pipedog/core 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +25 -0
- package/NOTICE +9 -0
- package/dist/adapters/base_llm_adapter.d.ts +266 -0
- package/dist/adapters/base_llm_adapter.js +489 -0
- package/dist/adapters/index.d.ts +2 -0
- package/dist/adapters/index.js +8 -0
- package/dist/adapters/schemas/direct_function.d.ts +202 -0
- package/dist/adapters/schemas/direct_function.js +302 -0
- package/dist/adapters/schemas/function_schema.d.ts +67 -0
- package/dist/adapters/schemas/function_schema.js +72 -0
- package/dist/adapters/schemas/index.d.ts +2 -0
- package/dist/adapters/schemas/index.js +8 -0
- package/dist/adapters/schemas/tools_schema.d.ts +57 -0
- package/dist/adapters/schemas/tools_schema.js +79 -0
- package/dist/adapters/services/index.d.ts +2 -0
- package/dist/adapters/services/index.js +8 -0
- package/dist/adapters/services/open_ai_adapter.d.ts +147 -0
- package/dist/adapters/services/open_ai_adapter.js +250 -0
- package/dist/audio/dtmf/dtmf_data.d.ts +3 -0
- package/dist/audio/dtmf/dtmf_data.js +22 -0
- package/dist/audio/dtmf/index.d.ts +2 -0
- package/dist/audio/dtmf/index.js +8 -0
- package/dist/audio/dtmf/types.d.ts +31 -0
- package/dist/audio/dtmf/types.js +35 -0
- package/dist/audio/dtmf/utils.d.ts +13 -0
- package/dist/audio/dtmf/utils.js +62 -0
- package/dist/audio/filters/base_audio_filter.d.ts +51 -0
- package/dist/audio/filters/base_audio_filter.js +17 -0
- package/dist/audio/filters/index.d.ts +2 -0
- package/dist/audio/filters/index.js +8 -0
- package/dist/audio/index.d.ts +2 -0
- package/dist/audio/index.js +8 -0
- package/dist/audio/krisp_instance.d.ts +95 -0
- package/dist/audio/krisp_instance.js +229 -0
- package/dist/audio/mixers/base_audio_mixer.d.ts +56 -0
- package/dist/audio/mixers/base_audio_mixer.js +16 -0
- package/dist/audio/mixers/index.d.ts +2 -0
- package/dist/audio/mixers/index.js +8 -0
- package/dist/audio/resamplers/base_audio_resampler.d.ts +46 -0
- package/dist/audio/resamplers/base_audio_resampler.js +35 -0
- package/dist/audio/resamplers/index.d.ts +2 -0
- package/dist/audio/resamplers/index.js +8 -0
- package/dist/audio/resamplers/resampy_resampler.d.ts +10 -0
- package/dist/audio/resamplers/resampy_resampler.js +15 -0
- package/dist/audio/resamplers/soxr_resampler.d.ts +54 -0
- package/dist/audio/resamplers/soxr_resampler.js +69 -0
- package/dist/audio/resamplers/soxr_stream_resampler.d.ts +75 -0
- package/dist/audio/resamplers/soxr_stream_resampler.js +146 -0
- package/dist/audio/turn/base_turn_analyzer.d.ts +84 -0
- package/dist/audio/turn/base_turn_analyzer.js +61 -0
- package/dist/audio/turn/index.d.ts +2 -0
- package/dist/audio/turn/index.js +8 -0
- package/dist/audio/turn/smart_turn/_whisper_features.d.ts +30 -0
- package/dist/audio/turn/smart_turn/_whisper_features.js +225 -0
- package/dist/audio/turn/smart_turn/base_smart_turn.d.ts +94 -0
- package/dist/audio/turn/smart_turn/base_smart_turn.js +239 -0
- package/dist/audio/turn/smart_turn/local_smart_turn_v3.d.ts +76 -0
- package/dist/audio/turn/smart_turn/local_smart_turn_v3.js +143 -0
- package/dist/audio/utils.d.ts +224 -0
- package/dist/audio/utils.js +634 -0
- package/dist/audio/vad/data/index.d.ts +2 -0
- package/dist/audio/vad/data/index.js +8 -0
- package/dist/audio/vad/index.d.ts +2 -0
- package/dist/audio/vad/index.js +8 -0
- package/dist/audio/vad/vad_analyzer.d.ts +126 -0
- package/dist/audio/vad/vad_analyzer.js +211 -0
- package/dist/audio/vad/vad_controller.d.ts +143 -0
- package/dist/audio/vad/vad_controller.js +228 -0
- package/dist/audio/volume.d.ts +38 -0
- package/dist/audio/volume.js +75 -0
- package/dist/bus/adapters/base.d.ts +35 -0
- package/dist/bus/adapters/base.js +19 -0
- package/dist/bus/adapters/index.d.ts +10 -0
- package/dist/bus/adapters/index.js +15 -0
- package/dist/bus/adapters/llm_context_adapter.d.ts +36 -0
- package/dist/bus/adapters/llm_context_adapter.js +82 -0
- package/dist/bus/adapters/tools_schema_adapter.d.ts +25 -0
- package/dist/bus/adapters/tools_schema_adapter.js +70 -0
- package/dist/bus/bridge_processor.d.ts +111 -0
- package/dist/bus/bridge_processor.js +166 -0
- package/dist/bus/bus.d.ts +110 -0
- package/dist/bus/bus.js +200 -0
- package/dist/bus/index.d.ts +22 -0
- package/dist/bus/index.js +27 -0
- package/dist/bus/local/async_queue.d.ts +12 -0
- package/dist/bus/local/async_queue.js +21 -0
- package/dist/bus/local/index.d.ts +3 -0
- package/dist/bus/local/index.js +8 -0
- package/dist/bus/messages.d.ts +378 -0
- package/dist/bus/messages.js +357 -0
- package/dist/bus/network/index.d.ts +16 -0
- package/dist/bus/network/index.js +21 -0
- package/dist/bus/queue.d.ts +27 -0
- package/dist/bus/queue.js +51 -0
- package/dist/bus/serializers/base.d.ts +25 -0
- package/dist/bus/serializers/base.js +14 -0
- package/dist/bus/serializers/index.d.ts +9 -0
- package/dist/bus/serializers/index.js +14 -0
- package/dist/bus/serializers/json.d.ts +77 -0
- package/dist/bus/serializers/json.js +367 -0
- package/dist/bus/subscriber.d.ts +46 -0
- package/dist/bus/subscriber.js +27 -0
- package/dist/bus/ui/index.d.ts +3 -0
- package/dist/bus/ui/index.js +8 -0
- package/dist/bus/ui/messages.d.ts +186 -0
- package/dist/bus/ui/messages.js +171 -0
- package/dist/classifiers/base_classifier.d.ts +263 -0
- package/dist/classifiers/base_classifier.js +346 -0
- package/dist/classifiers/cloudflare/clef/classifier.d.ts +70 -0
- package/dist/classifiers/cloudflare/clef/classifier.js +204 -0
- package/dist/classifiers/cloudflare/clef/client.d.ts +104 -0
- package/dist/classifiers/cloudflare/clef/client.js +234 -0
- package/dist/classifiers/cloudflare/clef/index.d.ts +2 -0
- package/dist/classifiers/cloudflare/clef/index.js +8 -0
- package/dist/classifiers/cloudflare/index.d.ts +2 -0
- package/dist/classifiers/cloudflare/index.js +8 -0
- package/dist/classifiers/http_client.d.ts +70 -0
- package/dist/classifiers/http_client.js +161 -0
- package/dist/classifiers/index.d.ts +2 -0
- package/dist/classifiers/index.js +8 -0
- package/dist/classifiers/jev/classifier.d.ts +8 -0
- package/dist/classifiers/jev/classifier.js +13 -0
- package/dist/classifiers/jev/client.d.ts +8 -0
- package/dist/classifiers/jev/client.js +13 -0
- package/dist/classifiers/jev/index.d.ts +2 -0
- package/dist/classifiers/jev/index.js +8 -0
- package/dist/classifiers/llm/classifier.d.ts +72 -0
- package/dist/classifiers/llm/classifier.js +304 -0
- package/dist/classifiers/llm/index.d.ts +2 -0
- package/dist/classifiers/llm/index.js +8 -0
- package/dist/classifiers/openai/decisions/classifier.d.ts +77 -0
- package/dist/classifiers/openai/decisions/classifier.js +241 -0
- package/dist/classifiers/openai/decisions/client.d.ts +108 -0
- package/dist/classifiers/openai/decisions/client.js +234 -0
- package/dist/classifiers/openai/decisions/index.d.ts +2 -0
- package/dist/classifiers/openai/decisions/index.js +8 -0
- package/dist/classifiers/openai/index.d.ts +2 -0
- package/dist/classifiers/openai/index.js +8 -0
- package/dist/classifiers/typesafe/index.d.ts +2 -0
- package/dist/classifiers/typesafe/index.js +8 -0
- package/dist/classifiers/typesafe/jev/classifier.d.ts +70 -0
- package/dist/classifiers/typesafe/jev/classifier.js +220 -0
- package/dist/classifiers/typesafe/jev/client.d.ts +105 -0
- package/dist/classifiers/typesafe/jev/client.js +233 -0
- package/dist/classifiers/typesafe/jev/index.d.ts +2 -0
- package/dist/classifiers/typesafe/jev/index.js +8 -0
- package/dist/clocks/base_clock.d.ts +13 -0
- package/dist/clocks/base_clock.js +14 -0
- package/dist/clocks/index.d.ts +2 -0
- package/dist/clocks/index.js +8 -0
- package/dist/clocks/system_clock.d.ts +15 -0
- package/dist/clocks/system_clock.js +25 -0
- package/dist/frames/frames.d.ts +2533 -0
- package/dist/frames/frames.js +2485 -0
- package/dist/frames/index.d.ts +2 -0
- package/dist/frames/index.js +8 -0
- package/dist/frames/protobufs/frames_pb2.d.ts +229 -0
- package/dist/frames/protobufs/frames_pb2.js +466 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +56 -0
- package/dist/metrics/index.d.ts +2 -0
- package/dist/metrics/index.js +8 -0
- package/dist/metrics/metrics.d.ts +276 -0
- package/dist/metrics/metrics.js +254 -0
- package/dist/observers/base_observer.d.ts +173 -0
- package/dist/observers/base_observer.js +151 -0
- package/dist/observers/error_observer.d.ts +75 -0
- package/dist/observers/error_observer.js +87 -0
- package/dist/observers/function_call_observer.d.ts +157 -0
- package/dist/observers/function_call_observer.js +222 -0
- package/dist/observers/index.d.ts +2 -0
- package/dist/observers/index.js +8 -0
- package/dist/observers/loggers/debug_log_observer.d.ts +91 -0
- package/dist/observers/loggers/debug_log_observer.js +228 -0
- package/dist/observers/loggers/index.d.ts +2 -0
- package/dist/observers/loggers/index.js +8 -0
- package/dist/observers/loggers/llm_log_observer.d.ts +24 -0
- package/dist/observers/loggers/llm_log_observer.js +110 -0
- package/dist/observers/loggers/metrics_log_observer.d.ts +85 -0
- package/dist/observers/loggers/metrics_log_observer.js +186 -0
- package/dist/observers/loggers/transcription_log_observer.d.ts +23 -0
- package/dist/observers/loggers/transcription_log_observer.js +74 -0
- package/dist/observers/service_metrics_observer.d.ts +168 -0
- package/dist/observers/service_metrics_observer.js +236 -0
- package/dist/observers/speaking_observer.d.ts +104 -0
- package/dist/observers/speaking_observer.js +150 -0
- package/dist/observers/startup_timing_observer.d.ts +221 -0
- package/dist/observers/startup_timing_observer.js +365 -0
- package/dist/observers/turn_tracking_observer.d.ts +78 -0
- package/dist/observers/turn_tracking_observer.js +189 -0
- package/dist/observers/user_bot_latency_observer.d.ts +411 -0
- package/dist/observers/user_bot_latency_observer.js +974 -0
- package/dist/pipeline/base_pipeline.d.ts +49 -0
- package/dist/pipeline/base_pipeline.js +101 -0
- package/dist/pipeline/capabilities.d.ts +76 -0
- package/dist/pipeline/capabilities.js +97 -0
- package/dist/pipeline/index.d.ts +2 -0
- package/dist/pipeline/index.js +8 -0
- package/dist/pipeline/job_context.d.ts +317 -0
- package/dist/pipeline/job_context.js +450 -0
- package/dist/pipeline/job_decorator.d.ts +54 -0
- package/dist/pipeline/job_decorator.js +92 -0
- package/dist/pipeline/llm_switcher.d.ts +84 -0
- package/dist/pipeline/llm_switcher.js +107 -0
- package/dist/pipeline/llm_with_backend.d.ts +435 -0
- package/dist/pipeline/llm_with_backend.js +806 -0
- package/dist/pipeline/parallel_pipeline.d.ts +83 -0
- package/dist/pipeline/parallel_pipeline.js +200 -0
- package/dist/pipeline/pipeline.d.ts +126 -0
- package/dist/pipeline/pipeline.js +196 -0
- package/dist/pipeline/service_switcher.d.ts +287 -0
- package/dist/pipeline/service_switcher.js +509 -0
- package/dist/pipeline/sync_parallel_pipeline.d.ts +192 -0
- package/dist/pipeline/sync_parallel_pipeline.js +387 -0
- package/dist/pipeline/worker.d.ts +814 -0
- package/dist/pipeline/worker.js +1639 -0
- package/dist/pipeline/worker_observer.d.ts +131 -0
- package/dist/pipeline/worker_observer.js +274 -0
- package/dist/pipeline/worker_ready_decorator.d.ts +45 -0
- package/dist/pipeline/worker_ready_decorator.js +76 -0
- package/dist/processors/aggregators/async_tool_messages.d.ts +146 -0
- package/dist/processors/aggregators/async_tool_messages.js +291 -0
- package/dist/processors/aggregators/dtmf_aggregator.d.ts +61 -0
- package/dist/processors/aggregators/dtmf_aggregator.js +144 -0
- package/dist/processors/aggregators/gated.d.ts +43 -0
- package/dist/processors/aggregators/gated.js +86 -0
- package/dist/processors/aggregators/gated_llm_context.d.ts +42 -0
- package/dist/processors/aggregators/gated_llm_context.js +86 -0
- package/dist/processors/aggregators/index.d.ts +2 -0
- package/dist/processors/aggregators/index.js +8 -0
- package/dist/processors/aggregators/llm_context.d.ts +370 -0
- package/dist/processors/aggregators/llm_context.js +580 -0
- package/dist/processors/aggregators/llm_context_summarizer.d.ts +219 -0
- package/dist/processors/aggregators/llm_context_summarizer.js +447 -0
- package/dist/processors/aggregators/llm_response.d.ts +37 -0
- package/dist/processors/aggregators/llm_response.js +71 -0
- package/dist/processors/aggregators/llm_response_universal.d.ts +966 -0
- package/dist/processors/aggregators/llm_response_universal.js +2394 -0
- package/dist/processors/aggregators/llm_text_processor.d.ts +53 -0
- package/dist/processors/aggregators/llm_text_processor.js +102 -0
- package/dist/processors/aggregators/sentence.d.ts +39 -0
- package/dist/processors/aggregators/sentence.js +69 -0
- package/dist/processors/async_generator.d.ts +42 -0
- package/dist/processors/async_generator.js +76 -0
- package/dist/processors/audio/audio_buffer_processor.d.ts +241 -0
- package/dist/processors/audio/audio_buffer_processor.js +565 -0
- package/dist/processors/audio/index.d.ts +2 -0
- package/dist/processors/audio/index.js +8 -0
- package/dist/processors/audio/vad_processor.d.ts +67 -0
- package/dist/processors/audio/vad_processor.js +103 -0
- package/dist/processors/consumer_processor.d.ts +49 -0
- package/dist/processors/consumer_processor.js +85 -0
- package/dist/processors/filters/frame_filter.d.ts +39 -0
- package/dist/processors/filters/frame_filter.js +52 -0
- package/dist/processors/filters/function_filter.d.ts +59 -0
- package/dist/processors/filters/function_filter.js +78 -0
- package/dist/processors/filters/identity_filter.d.ts +33 -0
- package/dist/processors/filters/identity_filter.js +37 -0
- package/dist/processors/filters/index.d.ts +2 -0
- package/dist/processors/filters/index.js +8 -0
- package/dist/processors/filters/null_filter.d.ts +34 -0
- package/dist/processors/filters/null_filter.js +47 -0
- package/dist/processors/filters/wake_notifier_filter.d.ts +48 -0
- package/dist/processors/filters/wake_notifier_filter.js +49 -0
- package/dist/processors/frame_processor.d.ts +360 -0
- package/dist/processors/frame_processor.js +932 -0
- package/dist/processors/frameworks/index.d.ts +2 -0
- package/dist/processors/frameworks/index.js +8 -0
- package/dist/processors/frameworks/rtvi/frames.d.ts +241 -0
- package/dist/processors/frameworks/rtvi/frames.js +259 -0
- package/dist/processors/frameworks/rtvi/index.d.ts +6 -0
- package/dist/processors/frameworks/rtvi/index.js +11 -0
- package/dist/processors/frameworks/rtvi/models.d.ts +1741 -0
- package/dist/processors/frameworks/rtvi/models.js +1807 -0
- package/dist/processors/frameworks/rtvi/observer.d.ts +340 -0
- package/dist/processors/frameworks/rtvi/observer.js +1113 -0
- package/dist/processors/frameworks/rtvi/processor.d.ts +182 -0
- package/dist/processors/frameworks/rtvi/processor.js +676 -0
- package/dist/processors/idle_frame_processor.d.ts +44 -0
- package/dist/processors/idle_frame_processor.js +86 -0
- package/dist/processors/index.d.ts +2 -0
- package/dist/processors/index.js +8 -0
- package/dist/processors/logger.d.ts +42 -0
- package/dist/processors/logger.js +87 -0
- package/dist/processors/metrics/frame_processor_metrics.d.ts +172 -0
- package/dist/processors/metrics/frame_processor_metrics.js +372 -0
- package/dist/processors/metrics/index.d.ts +2 -0
- package/dist/processors/metrics/index.js +8 -0
- package/dist/processors/producer_processor.d.ts +68 -0
- package/dist/processors/producer_processor.js +78 -0
- package/dist/processors/text_transformer.d.ts +30 -0
- package/dist/processors/text_transformer.js +48 -0
- package/dist/registry/index.d.ts +3 -0
- package/dist/registry/index.js +8 -0
- package/dist/registry/registry.d.ts +69 -0
- package/dist/registry/registry.js +149 -0
- package/dist/registry/types.d.ts +47 -0
- package/dist/registry/types.js +39 -0
- package/dist/serializers/base_serializer.d.ts +94 -0
- package/dist/serializers/base_serializer.js +82 -0
- package/dist/serializers/index.d.ts +2 -0
- package/dist/serializers/index.js +8 -0
- package/dist/services/ai_service.d.ts +145 -0
- package/dist/services/ai_service.js +262 -0
- package/dist/services/anthropic/index.d.ts +2 -0
- package/dist/services/anthropic/index.js +7 -0
- package/dist/services/assemblyai/index.d.ts +2 -0
- package/dist/services/assemblyai/index.js +7 -0
- package/dist/services/asyncai/index.d.ts +2 -0
- package/dist/services/asyncai/index.js +7 -0
- package/dist/services/aws/index.d.ts +2 -0
- package/dist/services/aws/index.js +7 -0
- package/dist/services/azure/index.d.ts +2 -0
- package/dist/services/azure/index.js +7 -0
- package/dist/services/baseten/index.d.ts +2 -0
- package/dist/services/baseten/index.js +7 -0
- package/dist/services/bland/index.d.ts +2 -0
- package/dist/services/bland/index.js +7 -0
- package/dist/services/camb/index.d.ts +2 -0
- package/dist/services/camb/index.js +7 -0
- package/dist/services/cartesia/index.d.ts +2 -0
- package/dist/services/cartesia/index.js +7 -0
- package/dist/services/cerebras/index.d.ts +2 -0
- package/dist/services/cerebras/index.js +7 -0
- package/dist/services/crusoe/index.d.ts +2 -0
- package/dist/services/crusoe/index.js +7 -0
- package/dist/services/deepgram/index.d.ts +2 -0
- package/dist/services/deepgram/index.js +7 -0
- package/dist/services/deepseek/index.d.ts +2 -0
- package/dist/services/deepseek/index.js +7 -0
- package/dist/services/elevenlabs/index.d.ts +2 -0
- package/dist/services/elevenlabs/index.js +7 -0
- package/dist/services/fal/index.d.ts +2 -0
- package/dist/services/fal/index.js +7 -0
- package/dist/services/fireworks/index.d.ts +2 -0
- package/dist/services/fireworks/index.js +7 -0
- package/dist/services/fish/index.d.ts +2 -0
- package/dist/services/fish/index.js +7 -0
- package/dist/services/funasr/index.d.ts +3 -0
- package/dist/services/funasr/index.js +8 -0
- package/dist/services/gladia/index.d.ts +2 -0
- package/dist/services/gladia/index.js +7 -0
- package/dist/services/google/index.d.ts +2 -0
- package/dist/services/google/index.js +7 -0
- package/dist/services/gradium/index.d.ts +2 -0
- package/dist/services/gradium/index.js +7 -0
- package/dist/services/grok/index.d.ts +2 -0
- package/dist/services/grok/index.js +7 -0
- package/dist/services/groq/index.d.ts +2 -0
- package/dist/services/groq/index.js +7 -0
- package/dist/services/heygen/index.d.ts +2 -0
- package/dist/services/heygen/index.js +7 -0
- package/dist/services/hume/index.d.ts +2 -0
- package/dist/services/hume/index.js +7 -0
- package/dist/services/image_service.d.ts +52 -0
- package/dist/services/image_service.js +60 -0
- package/dist/services/inception/index.d.ts +2 -0
- package/dist/services/inception/index.js +7 -0
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.js +8 -0
- package/dist/services/inworld/index.d.ts +2 -0
- package/dist/services/inworld/index.js +7 -0
- package/dist/services/keenable/index.d.ts +2 -0
- package/dist/services/keenable/index.js +7 -0
- package/dist/services/kokoro/index.d.ts +2 -0
- package/dist/services/kokoro/index.js +7 -0
- package/dist/services/llm_service.d.ts +1106 -0
- package/dist/services/llm_service.js +2231 -0
- package/dist/services/mem0/index.d.ts +2 -0
- package/dist/services/mem0/index.js +7 -0
- package/dist/services/meta/index.d.ts +2 -0
- package/dist/services/meta/index.js +7 -0
- package/dist/services/minimax/index.d.ts +2 -0
- package/dist/services/minimax/index.js +7 -0
- package/dist/services/mistral/index.d.ts +2 -0
- package/dist/services/mistral/index.js +7 -0
- package/dist/services/moondream/index.d.ts +2 -0
- package/dist/services/moondream/index.js +7 -0
- package/dist/services/moonshine/index.d.ts +2 -0
- package/dist/services/moonshine/index.js +7 -0
- package/dist/services/nebius/index.d.ts +2 -0
- package/dist/services/nebius/index.js +7 -0
- package/dist/services/neuphonic/index.d.ts +2 -0
- package/dist/services/neuphonic/index.js +7 -0
- package/dist/services/novita/index.d.ts +2 -0
- package/dist/services/novita/index.js +7 -0
- package/dist/services/nvidia/index.d.ts +2 -0
- package/dist/services/nvidia/index.js +11 -0
- package/dist/services/ollama/index.d.ts +2 -0
- package/dist/services/ollama/index.js +7 -0
- package/dist/services/openai/index.d.ts +2 -0
- package/dist/services/openai/index.js +7 -0
- package/dist/services/openclaw/index.d.ts +14 -0
- package/dist/services/openclaw/index.js +19 -0
- package/dist/services/openrouter/index.d.ts +2 -0
- package/dist/services/openrouter/index.js +7 -0
- package/dist/services/perplexity/index.d.ts +2 -0
- package/dist/services/perplexity/index.js +7 -0
- package/dist/services/piper/index.d.ts +2 -0
- package/dist/services/piper/index.js +7 -0
- package/dist/services/pocket_tts/index.d.ts +2 -0
- package/dist/services/pocket_tts/index.js +7 -0
- package/dist/services/qwen/index.d.ts +2 -0
- package/dist/services/qwen/index.js +7 -0
- package/dist/services/resembleai/index.d.ts +2 -0
- package/dist/services/resembleai/index.js +7 -0
- package/dist/services/rime/index.d.ts +2 -0
- package/dist/services/rime/index.js +7 -0
- package/dist/services/sambanova/index.d.ts +2 -0
- package/dist/services/sambanova/index.js +7 -0
- package/dist/services/sarvam/index.d.ts +2 -0
- package/dist/services/sarvam/index.js +7 -0
- package/dist/services/settings.d.ts +356 -0
- package/dist/services/settings.js +437 -0
- package/dist/services/simli/index.d.ts +2 -0
- package/dist/services/simli/index.js +7 -0
- package/dist/services/smallest/index.d.ts +2 -0
- package/dist/services/smallest/index.js +7 -0
- package/dist/services/soniox/index.d.ts +2 -0
- package/dist/services/soniox/index.js +7 -0
- package/dist/services/speechify/index.d.ts +2 -0
- package/dist/services/speechify/index.js +7 -0
- package/dist/services/speechmatics/index.d.ts +2 -0
- package/dist/services/speechmatics/index.js +7 -0
- package/dist/services/stt_latency.d.ts +62 -0
- package/dist/services/stt_latency.js +71 -0
- package/dist/services/stt_service.d.ts +601 -0
- package/dist/services/stt_service.js +1044 -0
- package/dist/services/tavus/index.d.ts +2 -0
- package/dist/services/tavus/index.js +7 -0
- package/dist/services/together/index.d.ts +2 -0
- package/dist/services/together/index.js +7 -0
- package/dist/services/tts_service.d.ts +909 -0
- package/dist/services/tts_service.js +2018 -0
- package/dist/services/ultravox/index.d.ts +2 -0
- package/dist/services/ultravox/index.js +9 -0
- package/dist/services/vision_service.d.ts +56 -0
- package/dist/services/vision_service.js +62 -0
- package/dist/services/websocket_service.d.ts +213 -0
- package/dist/services/websocket_service.js +654 -0
- package/dist/services/whisper/index.d.ts +2 -0
- package/dist/services/whisper/index.js +9 -0
- package/dist/services/xai/index.d.ts +2 -0
- package/dist/services/xai/index.js +9 -0
- package/dist/services/xtts/index.d.ts +2 -0
- package/dist/services/xtts/index.js +9 -0
- package/dist/tests/index.d.ts +2 -0
- package/dist/tests/index.js +8 -0
- package/dist/tests/utils.d.ts +123 -0
- package/dist/tests/utils.js +212 -0
- package/dist/transcriptions/index.d.ts +2 -0
- package/dist/transcriptions/index.js +8 -0
- package/dist/transcriptions/language.d.ts +376 -0
- package/dist/transcriptions/language.js +543 -0
- package/dist/transports/base_input.d.ts +149 -0
- package/dist/transports/base_input.js +338 -0
- package/dist/transports/base_output.d.ts +432 -0
- package/dist/transports/base_output.js +1231 -0
- package/dist/transports/base_transport.d.ts +223 -0
- package/dist/transports/base_transport.js +167 -0
- package/dist/transports/daily/index.d.ts +2 -0
- package/dist/transports/daily/index.js +9 -0
- package/dist/transports/heygen/index.d.ts +2 -0
- package/dist/transports/heygen/index.js +9 -0
- package/dist/transports/index.d.ts +2 -0
- package/dist/transports/index.js +8 -0
- package/dist/transports/lemonslice/index.d.ts +2 -0
- package/dist/transports/lemonslice/index.js +9 -0
- package/dist/transports/livekit/index.d.ts +2 -0
- package/dist/transports/livekit/index.js +9 -0
- package/dist/transports/local/index.d.ts +2 -0
- package/dist/transports/local/index.js +9 -0
- package/dist/transports/moq/index.d.ts +2 -0
- package/dist/transports/moq/index.js +9 -0
- package/dist/transports/smallwebrtc/index.d.ts +2 -0
- package/dist/transports/smallwebrtc/index.js +9 -0
- package/dist/transports/tavus/index.d.ts +2 -0
- package/dist/transports/tavus/index.js +9 -0
- package/dist/transports/video_in_sampler.d.ts +157 -0
- package/dist/transports/video_in_sampler.js +258 -0
- package/dist/transports/vonage/index.d.ts +2 -0
- package/dist/transports/vonage/index.js +9 -0
- package/dist/transports/websocket/index.d.ts +2 -0
- package/dist/transports/websocket/index.js +9 -0
- package/dist/transports/whatsapp/index.d.ts +2 -0
- package/dist/transports/whatsapp/index.js +9 -0
- package/dist/turns/eager_end_of_turn_mixin.d.ts +70 -0
- package/dist/turns/eager_end_of_turn_mixin.js +122 -0
- package/dist/turns/empty_user_turn.d.ts +55 -0
- package/dist/turns/empty_user_turn.js +53 -0
- package/dist/turns/index.d.ts +2 -0
- package/dist/turns/index.js +8 -0
- package/dist/turns/speculation_gate.d.ts +169 -0
- package/dist/turns/speculation_gate.js +294 -0
- package/dist/turns/types.d.ts +33 -0
- package/dist/turns/types.js +35 -0
- package/dist/turns/user_idle_controller.d.ts +94 -0
- package/dist/turns/user_idle_controller.js +187 -0
- package/dist/turns/user_mute/always_user_mute_strategy.d.ts +15 -0
- package/dist/turns/user_mute/always_user_mute_strategy.js +29 -0
- package/dist/turns/user_mute/base_user_mute_strategy.d.ts +39 -0
- package/dist/turns/user_mute/base_user_mute_strategy.js +45 -0
- package/dist/turns/user_mute/first_speech_user_mute_strategy.d.ts +28 -0
- package/dist/turns/user_mute/first_speech_user_mute_strategy.js +52 -0
- package/dist/turns/user_mute/function_call_user_mute_strategy.d.ts +25 -0
- package/dist/turns/user_mute/function_call_user_mute_strategy.js +50 -0
- package/dist/turns/user_mute/index.d.ts +6 -0
- package/dist/turns/user_mute/index.js +11 -0
- package/dist/turns/user_mute/mute_until_first_bot_complete_user_mute_strategy.d.ts +43 -0
- package/dist/turns/user_mute/mute_until_first_bot_complete_user_mute_strategy.js +76 -0
- package/dist/turns/user_start/base_user_turn_start_strategy.d.ts +135 -0
- package/dist/turns/user_start/base_user_turn_start_strategy.js +134 -0
- package/dist/turns/user_start/external_user_turn_start_strategy.d.ts +45 -0
- package/dist/turns/user_start/external_user_turn_start_strategy.js +64 -0
- package/dist/turns/user_start/index.d.ts +8 -0
- package/dist/turns/user_start/index.js +16 -0
- package/dist/turns/user_start/krisp_viva_ip_user_turn_start_strategy.d.ts +133 -0
- package/dist/turns/user_start/krisp_viva_ip_user_turn_start_strategy.js +243 -0
- package/dist/turns/user_start/min_words_user_turn_start_strategy.d.ts +60 -0
- package/dist/turns/user_start/min_words_user_turn_start_strategy.js +102 -0
- package/dist/turns/user_start/transcription_user_turn_start_strategy.d.ts +29 -0
- package/dist/turns/user_start/transcription_user_turn_start_strategy.js +43 -0
- package/dist/turns/user_start/vad_user_turn_start_strategy.d.ts +20 -0
- package/dist/turns/user_start/vad_user_turn_start_strategy.js +31 -0
- package/dist/turns/user_start/wake_phrase_user_turn_start_strategy.d.ts +141 -0
- package/dist/turns/user_start/wake_phrase_user_turn_start_strategy.js +238 -0
- package/dist/turns/user_stop/base_user_turn_stop_strategy.d.ts +174 -0
- package/dist/turns/user_stop/base_user_turn_stop_strategy.js +170 -0
- package/dist/turns/user_stop/deferred_user_turn_stop_strategy.d.ts +81 -0
- package/dist/turns/user_stop/deferred_user_turn_stop_strategy.js +107 -0
- package/dist/turns/user_stop/eager_match_policy.d.ts +36 -0
- package/dist/turns/user_stop/eager_match_policy.js +50 -0
- package/dist/turns/user_stop/eager_user_turn_stop_strategy.d.ts +84 -0
- package/dist/turns/user_stop/eager_user_turn_stop_strategy.js +154 -0
- package/dist/turns/user_stop/external_user_turn_completion_stop_strategy.d.ts +45 -0
- package/dist/turns/user_stop/external_user_turn_completion_stop_strategy.js +55 -0
- package/dist/turns/user_stop/external_user_turn_stop_strategy.d.ts +115 -0
- package/dist/turns/user_stop/external_user_turn_stop_strategy.js +205 -0
- package/dist/turns/user_stop/index.d.ts +10 -0
- package/dist/turns/user_stop/index.js +15 -0
- package/dist/turns/user_stop/llm_turn_completion_user_turn_stop_strategy.d.ts +44 -0
- package/dist/turns/user_stop/llm_turn_completion_user_turn_stop_strategy.js +59 -0
- package/dist/turns/user_stop/speech_timeout_user_turn_stop_strategy.d.ts +140 -0
- package/dist/turns/user_stop/speech_timeout_user_turn_stop_strategy.js +303 -0
- package/dist/turns/user_stop/turn_analyzer_user_turn_stop_strategy.d.ts +135 -0
- package/dist/turns/user_stop/turn_analyzer_user_turn_stop_strategy.js +332 -0
- package/dist/turns/user_turn_completion_mixin.d.ts +147 -0
- package/dist/turns/user_turn_completion_mixin.js +591 -0
- package/dist/turns/user_turn_controller.d.ts +134 -0
- package/dist/turns/user_turn_controller.js +335 -0
- package/dist/turns/user_turn_processor.d.ts +87 -0
- package/dist/turns/user_turn_processor.js +180 -0
- package/dist/turns/user_turn_strategies.d.ts +187 -0
- package/dist/turns/user_turn_strategies.js +222 -0
- package/dist/utils/async_tool_cancellation.d.ts +35 -0
- package/dist/utils/async_tool_cancellation.js +78 -0
- package/dist/utils/asyncio/index.d.ts +2 -0
- package/dist/utils/asyncio/index.js +7 -0
- package/dist/utils/asyncio/task_manager.d.ts +49 -0
- package/dist/utils/asyncio/task_manager.js +105 -0
- package/dist/utils/base_object.d.ts +76 -0
- package/dist/utils/base_object.js +154 -0
- package/dist/utils/context/aggregated_frame_sequencer.d.ts +491 -0
- package/dist/utils/context/aggregated_frame_sequencer.js +803 -0
- package/dist/utils/context/audio_context_manager.d.ts +131 -0
- package/dist/utils/context/audio_context_manager.js +233 -0
- package/dist/utils/context/index.d.ts +2 -0
- package/dist/utils/context/index.js +7 -0
- package/dist/utils/context/llm_context_summarization.d.ts +258 -0
- package/dist/utils/context/llm_context_summarization.js +511 -0
- package/dist/utils/context/text_segment_map.d.ts +611 -0
- package/dist/utils/context/text_segment_map.js +1132 -0
- package/dist/utils/context/word_completion_tracker.d.ts +273 -0
- package/dist/utils/context/word_completion_tracker.js +441 -0
- package/dist/utils/context/word_timestamp_tracker.d.ts +72 -0
- package/dist/utils/context/word_timestamp_tracker.js +98 -0
- package/dist/utils/deprecation.d.ts +28 -0
- package/dist/utils/deprecation.js +75 -0
- package/dist/utils/env.d.ts +38 -0
- package/dist/utils/env.js +62 -0
- package/dist/utils/errors.d.ts +75 -0
- package/dist/utils/errors.js +202 -0
- package/dist/utils/file_resolver.d.ts +126 -0
- package/dist/utils/file_resolver.js +314 -0
- package/dist/utils/file_storage.d.ts +99 -0
- package/dist/utils/file_storage.js +100 -0
- package/dist/utils/frame_queue.d.ts +36 -0
- package/dist/utils/frame_queue.js +66 -0
- package/dist/utils/http.d.ts +39 -0
- package/dist/utils/http.js +53 -0
- package/dist/utils/image.d.ts +15 -0
- package/dist/utils/image.js +30 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +8 -0
- package/dist/utils/log_config.d.ts +34 -0
- package/dist/utils/log_config.js +76 -0
- package/dist/utils/logger.d.ts +40 -0
- package/dist/utils/logger.js +91 -0
- package/dist/utils/mixin.d.ts +14 -0
- package/dist/utils/mixin.js +63 -0
- package/dist/utils/network.d.ts +73 -0
- package/dist/utils/network.js +90 -0
- package/dist/utils/security/allowed_origins.d.ts +16 -0
- package/dist/utils/security/allowed_origins.js +34 -0
- package/dist/utils/security/index.d.ts +2 -0
- package/dist/utils/security/index.js +7 -0
- package/dist/utils/security/redaction.d.ts +27 -0
- package/dist/utils/security/redaction.js +123 -0
- package/dist/utils/security/ssrf.d.ts +79 -0
- package/dist/utils/security/ssrf.js +327 -0
- package/dist/utils/shared.d.ts +35 -0
- package/dist/utils/shared.js +136 -0
- package/dist/utils/startup.d.ts +17 -0
- package/dist/utils/startup.js +130 -0
- package/dist/utils/string.d.ts +116 -0
- package/dist/utils/string.js +460 -0
- package/dist/utils/sync/base_notifier.d.ts +25 -0
- package/dist/utils/sync/base_notifier.js +16 -0
- package/dist/utils/sync/event_notifier.d.ts +38 -0
- package/dist/utils/sync/event_notifier.js +51 -0
- package/dist/utils/sync/index.d.ts +2 -0
- package/dist/utils/sync/index.js +7 -0
- package/dist/utils/text/alnum_utils.d.ts +109 -0
- package/dist/utils/text/alnum_utils.js +262 -0
- package/dist/utils/text/base_text_aggregator.d.ts +146 -0
- package/dist/utils/text/base_text_aggregator.js +102 -0
- package/dist/utils/text/base_text_filter.d.ts +54 -0
- package/dist/utils/text/base_text_filter.js +50 -0
- package/dist/utils/text/index.d.ts +2 -0
- package/dist/utils/text/index.js +7 -0
- package/dist/utils/text/markdown_text_filter.d.ts +147 -0
- package/dist/utils/text/markdown_text_filter.js +522 -0
- package/dist/utils/text/markup_utils.d.ts +54 -0
- package/dist/utils/text/markup_utils.js +156 -0
- package/dist/utils/text/pattern_pair_aggregator.d.ts +251 -0
- package/dist/utils/text/pattern_pair_aggregator.js +478 -0
- package/dist/utils/text/phonemes.d.ts +60 -0
- package/dist/utils/text/phonemes.js +172 -0
- package/dist/utils/text/simple_text_aggregator.d.ts +135 -0
- package/dist/utils/text/simple_text_aggregator.js +254 -0
- package/dist/utils/text/skip_tags_aggregator.d.ts +85 -0
- package/dist/utils/text/skip_tags_aggregator.js +147 -0
- package/dist/utils/text/transforms/pronunciations.d.ts +65 -0
- package/dist/utils/text/transforms/pronunciations.js +111 -0
- package/dist/utils/text/word_timestamp_utils.d.ts +26 -0
- package/dist/utils/text/word_timestamp_utils.js +52 -0
- package/dist/utils/time.d.ts +13 -0
- package/dist/utils/time.js +31 -0
- package/dist/utils/tracing/index.d.ts +3 -0
- package/dist/utils/tracing/index.js +8 -0
- package/dist/utils/tracing/service_attributes.d.ts +198 -0
- package/dist/utils/tracing/service_attributes.js +434 -0
- package/dist/utils/tracing/service_decorators.d.ts +214 -0
- package/dist/utils/tracing/service_decorators.js +1662 -0
- package/dist/utils/tracing/setup.d.ts +95 -0
- package/dist/utils/tracing/setup.js +110 -0
- package/dist/utils/tracing/tracing_context.d.ts +55 -0
- package/dist/utils/tracing/tracing_context.js +97 -0
- package/dist/utils/tracing/turn_trace_observer.d.ts +90 -0
- package/dist/utils/tracing/turn_trace_observer.js +219 -0
- package/dist/utils/types.d.ts +80 -0
- package/dist/utils/types.js +108 -0
- package/dist/utils/utils.d.ts +5 -0
- package/dist/utils/utils.js +22 -0
- package/dist/utils/yaml.d.ts +64 -0
- package/dist/utils/yaml.js +41 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.js +7 -0
- package/dist/workers/base_worker.d.ts +772 -0
- package/dist/workers/base_worker.js +1298 -0
- package/dist/workers/index.d.ts +2 -0
- package/dist/workers/index.js +8 -0
- package/dist/workers/llm/backend_llm_worker.d.ts +552 -0
- package/dist/workers/llm/backend_llm_worker.js +1055 -0
- package/dist/workers/llm/index.d.ts +6 -0
- package/dist/workers/llm/index.js +11 -0
- package/dist/workers/llm/llm_context_worker.d.ts +66 -0
- package/dist/workers/llm/llm_context_worker.js +72 -0
- package/dist/workers/llm/llm_worker.d.ts +180 -0
- package/dist/workers/llm/llm_worker.js +323 -0
- package/dist/workers/llm/tool_decorator.d.ts +68 -0
- package/dist/workers/llm/tool_decorator.js +60 -0
- package/dist/workers/runner.d.ts +268 -0
- package/dist/workers/runner.js +489 -0
- package/dist/workers/ui/index.d.ts +22 -0
- package/dist/workers/ui/index.js +27 -0
- package/dist/workers/ui/ui_event_decorator.d.ts +43 -0
- package/dist/workers/ui/ui_event_decorator.js +75 -0
- package/dist/workers/ui/ui_job_context.d.ts +12 -0
- package/dist/workers/ui/ui_job_context.js +17 -0
- package/dist/workers/ui/ui_prompts.d.ts +21 -0
- package/dist/workers/ui/ui_prompts.js +41 -0
- package/dist/workers/ui/ui_tools.d.ts +32 -0
- package/dist/workers/ui/ui_tools.js +112 -0
- package/dist/workers/ui/ui_worker.d.ts +571 -0
- package/dist/workers/ui/ui_worker.js +1156 -0
- package/package.json +46 -3
- package/README.md +0 -5
|
@@ -0,0 +1,1741 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RTVI protocol v2 message models.
|
|
3
|
+
*
|
|
4
|
+
* Contains all RTVI protocol v2 message definitions and data structures.
|
|
5
|
+
* Import this module under the `RTVI` alias to use as a namespace.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* import * as RTVI from "@pipedog/core/processors/frameworks/rtvi/models";
|
|
9
|
+
*
|
|
10
|
+
* const msg = new RTVI.BotReady({
|
|
11
|
+
* id: "1",
|
|
12
|
+
* data: new RTVI.BotReadyData({ version: RTVI.PROTOCOL_VERSION }),
|
|
13
|
+
* });
|
|
14
|
+
*
|
|
15
|
+
* Porting notes:
|
|
16
|
+
* - Upstream models are pydantic `BaseModel`s. Here each model is a class
|
|
17
|
+
* extending the small `BaseModel` below: fields are camelCase and the
|
|
18
|
+
* constructor takes one options object, while `modelValidate()` reads and
|
|
19
|
+
* `modelDump()` / `toJSON()` write the upstream snake_case wire keys, so
|
|
20
|
+
* the RTVI wire format is unchanged. The constructor validates its options
|
|
21
|
+
* like pydantic does and throws `ValidationError`.
|
|
22
|
+
* - Dropped (deprecated upstream): `LLMFunctionCallMessageData` and
|
|
23
|
+
* `LLMFunctionCallMessage` (only the deprecated
|
|
24
|
+
* `RTVIProcessor.handle_function_call` sends them).
|
|
25
|
+
* - Kept although deprecated upstream, because the observer still sends them
|
|
26
|
+
* by default and clients read them: `BotLLMTextMessage`,
|
|
27
|
+
* `BotTTSTextMessage`, `UserTranscriptionMessage(Data)` and the
|
|
28
|
+
* `aggregated_by` wire field of `BotOutputMessageData`.
|
|
29
|
+
*/
|
|
30
|
+
import type { KeypadEntry } from "../../../audio/dtmf/types.ts";
|
|
31
|
+
import { BotCapabilities, type BotCapabilitiesOptions } from "../../../pipeline/capabilities.ts";
|
|
32
|
+
import type { TextType } from "../../../utils/text/base_text_aggregator.ts";
|
|
33
|
+
/**
|
|
34
|
+
* Source type for an RTVI `send-file` message.
|
|
35
|
+
*
|
|
36
|
+
* Matches `FileSourceType` from frames: a file arrives either as inline base64
|
|
37
|
+
* bytes or as a URL, and both flow through to a `UserFileRawFrame`
|
|
38
|
+
* unresolved.
|
|
39
|
+
*/
|
|
40
|
+
export type RTVIFileSourceType = "bytes" | "url";
|
|
41
|
+
export declare const PROTOCOL_VERSION = "2.2.0";
|
|
42
|
+
export declare const LEGACY_SUPPORTED_MAJOR = 1;
|
|
43
|
+
export declare const MESSAGE_LABEL = "rtvi-ai";
|
|
44
|
+
export type MessageLiteral = "rtvi-ai";
|
|
45
|
+
/** One validation problem: where it is (wire keys) and what is wrong. */
|
|
46
|
+
export interface ValidationErrorDetail {
|
|
47
|
+
loc: (string | number)[];
|
|
48
|
+
msg: string;
|
|
49
|
+
}
|
|
50
|
+
/** Raised when data does not match a model, like pydantic's `ValidationError`. */
|
|
51
|
+
declare const BuiltinError: ErrorConstructor;
|
|
52
|
+
export declare class ValidationError extends BuiltinError {
|
|
53
|
+
name: string;
|
|
54
|
+
readonly title: string;
|
|
55
|
+
readonly details: ValidationErrorDetail[];
|
|
56
|
+
constructor(title: string, details: ValidationErrorDetail[]);
|
|
57
|
+
/** The list of problems (pydantic `ValidationError.errors()`). */
|
|
58
|
+
errors(): ValidationErrorDetail[];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Validates one value. `wire` is true when the value comes from wire data
|
|
62
|
+
* (`modelValidate`), where nested models use snake_case keys; constructor
|
|
63
|
+
* options use camelCase keys.
|
|
64
|
+
*/
|
|
65
|
+
type Parser<T> = (value: unknown, wire?: boolean) => T;
|
|
66
|
+
interface FieldSpec<T = unknown> {
|
|
67
|
+
parse: Parser<T>;
|
|
68
|
+
/** Factory for the default value; absent when the field is required. */
|
|
69
|
+
default?: () => T;
|
|
70
|
+
/** Wire key; defaults to the snake_case form of the field name. */
|
|
71
|
+
key?: string;
|
|
72
|
+
}
|
|
73
|
+
type FieldSpecs = Record<string, FieldSpec>;
|
|
74
|
+
/** Options for `modelDump()`. */
|
|
75
|
+
export interface ModelDumpOptions {
|
|
76
|
+
/** Leave out fields whose value is `null`. */
|
|
77
|
+
excludeNone?: boolean;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Base class of the RTVI models (pydantic `BaseModel`).
|
|
81
|
+
*
|
|
82
|
+
* Subclasses declare their fields with `declare` and describe them in the
|
|
83
|
+
* static `fields` table. The constructor validates camelCase options;
|
|
84
|
+
* `modelValidate()` validates wire (snake_case) data; `modelDump()` produces
|
|
85
|
+
* wire data.
|
|
86
|
+
*/
|
|
87
|
+
export declare abstract class BaseModel {
|
|
88
|
+
/** Field table: name, parser, default and wire key. */
|
|
89
|
+
static readonly fields: FieldSpecs;
|
|
90
|
+
/** What to do with unknown wire keys: drop them, or keep them in `modelExtra`. */
|
|
91
|
+
static readonly extra: "ignore" | "allow";
|
|
92
|
+
/** Unknown keys kept by models created with `extra = "allow"` (pydantic `model_extra`). */
|
|
93
|
+
modelExtra: Record<string, unknown> | null;
|
|
94
|
+
constructor(options?: object);
|
|
95
|
+
/**
|
|
96
|
+
* Hook run on the (camelCase) input before the fields are validated, like
|
|
97
|
+
* pydantic's `@model_validator(mode="before")`.
|
|
98
|
+
*/
|
|
99
|
+
protected static _beforeValidate(data: Record<string, unknown>): Record<string, unknown>;
|
|
100
|
+
/**
|
|
101
|
+
* Validate wire data (snake_case keys) into a model (pydantic `model_validate`).
|
|
102
|
+
*
|
|
103
|
+
* @throws ValidationError If the data does not match the model.
|
|
104
|
+
*/
|
|
105
|
+
static modelValidate<C extends abstract new (...args: any[]) => BaseModel>(this: C, data: unknown): InstanceType<C>;
|
|
106
|
+
/**
|
|
107
|
+
* The wire form of the model, with upstream's snake_case keys (pydantic
|
|
108
|
+
* `model_dump`). Nested models are dumped too.
|
|
109
|
+
*/
|
|
110
|
+
modelDump(options?: ModelDumpOptions): Record<string, unknown>;
|
|
111
|
+
/** Serialize with the wire keys, as pydantic does. */
|
|
112
|
+
toJSON(): Record<string, unknown>;
|
|
113
|
+
}
|
|
114
|
+
export interface MessageOptions {
|
|
115
|
+
label?: MessageLiteral;
|
|
116
|
+
type: string;
|
|
117
|
+
id: string;
|
|
118
|
+
data?: Record<string, unknown> | null;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Base RTVI message structure.
|
|
122
|
+
*
|
|
123
|
+
* Represents the standard format for RTVI protocol messages.
|
|
124
|
+
*/
|
|
125
|
+
export declare class Message extends BaseModel {
|
|
126
|
+
label: MessageLiteral;
|
|
127
|
+
type: string;
|
|
128
|
+
id: string;
|
|
129
|
+
data: Record<string, unknown> | null;
|
|
130
|
+
static readonly fields: FieldSpecs;
|
|
131
|
+
constructor(options: MessageOptions);
|
|
132
|
+
}
|
|
133
|
+
export interface RawClientMessageDataOptions {
|
|
134
|
+
t: string;
|
|
135
|
+
d?: unknown;
|
|
136
|
+
}
|
|
137
|
+
/** Data structure expected from client messages sent to the RTVI server. */
|
|
138
|
+
export declare class RawClientMessageData extends BaseModel {
|
|
139
|
+
t: string;
|
|
140
|
+
d: unknown;
|
|
141
|
+
static readonly fields: FieldSpecs;
|
|
142
|
+
constructor(options: RawClientMessageDataOptions);
|
|
143
|
+
}
|
|
144
|
+
export interface ClientMessageOptions {
|
|
145
|
+
msgId: string;
|
|
146
|
+
type: string;
|
|
147
|
+
data?: unknown;
|
|
148
|
+
}
|
|
149
|
+
/** Cleansed data structure for client messages for handling. */
|
|
150
|
+
export declare class ClientMessage extends BaseModel {
|
|
151
|
+
msgId: string;
|
|
152
|
+
type: string;
|
|
153
|
+
data: unknown;
|
|
154
|
+
static readonly fields: FieldSpecs;
|
|
155
|
+
constructor(options: ClientMessageOptions);
|
|
156
|
+
}
|
|
157
|
+
export interface RawServerResponseDataOptions {
|
|
158
|
+
t: string;
|
|
159
|
+
d?: unknown;
|
|
160
|
+
}
|
|
161
|
+
/** Data structure for server responses to client messages. */
|
|
162
|
+
export declare class RawServerResponseData extends BaseModel {
|
|
163
|
+
t: string;
|
|
164
|
+
d: unknown;
|
|
165
|
+
static readonly fields: FieldSpecs;
|
|
166
|
+
constructor(options: RawServerResponseDataOptions);
|
|
167
|
+
}
|
|
168
|
+
export interface ServerResponseOptions {
|
|
169
|
+
label?: MessageLiteral;
|
|
170
|
+
type?: "server-response";
|
|
171
|
+
id: string;
|
|
172
|
+
data: RawServerResponseData | RawServerResponseDataOptions;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* The RTVI-formatted message response from the server to the client.
|
|
176
|
+
*
|
|
177
|
+
* This message is used to respond to custom messages sent by the client.
|
|
178
|
+
*/
|
|
179
|
+
export declare class ServerResponse extends BaseModel {
|
|
180
|
+
label: MessageLiteral;
|
|
181
|
+
type: "server-response";
|
|
182
|
+
id: string;
|
|
183
|
+
data: RawServerResponseData;
|
|
184
|
+
static readonly fields: FieldSpecs;
|
|
185
|
+
constructor(options: ServerResponseOptions);
|
|
186
|
+
}
|
|
187
|
+
export interface AboutClientDataOptions {
|
|
188
|
+
library: string;
|
|
189
|
+
libraryVersion?: string | null;
|
|
190
|
+
platform?: string | null;
|
|
191
|
+
platformVersion?: string | null;
|
|
192
|
+
platformDetails?: unknown;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Data about the RTVI client.
|
|
196
|
+
*
|
|
197
|
+
* Contains information about the client, including which RTVI library it is
|
|
198
|
+
* using, what platform it is on and any additional details, if available.
|
|
199
|
+
*/
|
|
200
|
+
export declare class AboutClientData extends BaseModel {
|
|
201
|
+
library: string;
|
|
202
|
+
libraryVersion: string | null;
|
|
203
|
+
platform: string | null;
|
|
204
|
+
platformVersion: string | null;
|
|
205
|
+
platformDetails: unknown;
|
|
206
|
+
static readonly fields: FieldSpecs;
|
|
207
|
+
constructor(options: AboutClientDataOptions);
|
|
208
|
+
}
|
|
209
|
+
export interface ClientReadyDataOptions {
|
|
210
|
+
version: string;
|
|
211
|
+
about: AboutClientData | AboutClientDataOptions;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Data format of client ready messages.
|
|
215
|
+
*
|
|
216
|
+
* Contains the RTVI protocol version and client information.
|
|
217
|
+
*/
|
|
218
|
+
export declare class ClientReadyData extends BaseModel {
|
|
219
|
+
version: string;
|
|
220
|
+
about: AboutClientData;
|
|
221
|
+
static readonly fields: FieldSpecs;
|
|
222
|
+
constructor(options: ClientReadyDataOptions);
|
|
223
|
+
}
|
|
224
|
+
export interface ErrorResponseDataOptions {
|
|
225
|
+
error: string;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Data for an RTVI error response.
|
|
229
|
+
*
|
|
230
|
+
* Contains the error message to send back to the client.
|
|
231
|
+
*/
|
|
232
|
+
export declare class ErrorResponseData extends BaseModel {
|
|
233
|
+
error: string;
|
|
234
|
+
static readonly fields: FieldSpecs;
|
|
235
|
+
constructor(options: ErrorResponseDataOptions);
|
|
236
|
+
}
|
|
237
|
+
export interface ErrorResponseOptions {
|
|
238
|
+
label?: MessageLiteral;
|
|
239
|
+
type?: "error-response";
|
|
240
|
+
id: string;
|
|
241
|
+
data: ErrorResponseData | ErrorResponseDataOptions;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* RTVI error response message.
|
|
245
|
+
*
|
|
246
|
+
* RTVI formatted error response message for relaying failed client requests.
|
|
247
|
+
*/
|
|
248
|
+
export declare class ErrorResponse extends BaseModel {
|
|
249
|
+
label: MessageLiteral;
|
|
250
|
+
type: "error-response";
|
|
251
|
+
id: string;
|
|
252
|
+
data: ErrorResponseData;
|
|
253
|
+
static readonly fields: FieldSpecs;
|
|
254
|
+
constructor(options: ErrorResponseOptions);
|
|
255
|
+
}
|
|
256
|
+
export interface ErrorDataOptions {
|
|
257
|
+
error: string;
|
|
258
|
+
/** Indicates the pipeline has stopped due to this error. */
|
|
259
|
+
fatal: boolean;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Data for an RTVI error event.
|
|
263
|
+
*
|
|
264
|
+
* Contains error information including whether it's fatal.
|
|
265
|
+
*/
|
|
266
|
+
export declare class ErrorData extends BaseModel {
|
|
267
|
+
error: string;
|
|
268
|
+
/** Indicates the pipeline has stopped due to this error. */
|
|
269
|
+
fatal: boolean;
|
|
270
|
+
static readonly fields: FieldSpecs;
|
|
271
|
+
constructor(options: ErrorDataOptions);
|
|
272
|
+
}
|
|
273
|
+
export interface ErrorOptions {
|
|
274
|
+
label?: MessageLiteral;
|
|
275
|
+
type?: "error";
|
|
276
|
+
data: ErrorData | ErrorDataOptions;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* RTVI error event message.
|
|
280
|
+
*
|
|
281
|
+
* RTVI formatted error message for relaying errors in the pipeline.
|
|
282
|
+
*/
|
|
283
|
+
export declare class Error extends BaseModel {
|
|
284
|
+
label: MessageLiteral;
|
|
285
|
+
type: "error";
|
|
286
|
+
data: ErrorData;
|
|
287
|
+
static readonly fields: FieldSpecs;
|
|
288
|
+
constructor(options: ErrorOptions);
|
|
289
|
+
}
|
|
290
|
+
export interface BotReadyDataOptions {
|
|
291
|
+
version: string;
|
|
292
|
+
about?: Record<string, unknown> | null;
|
|
293
|
+
capabilities?: BotCapabilities | BotCapabilitiesOptions | null;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Data for bot ready notification.
|
|
297
|
+
*
|
|
298
|
+
* Contains protocol version and initial configuration.
|
|
299
|
+
*
|
|
300
|
+
* - `version`: the RTVI protocol version the bot speaks with this client.
|
|
301
|
+
* - `about`: information about the bot, such as the Pipecat library and version.
|
|
302
|
+
* - `capabilities`: what the bot does in this session (media sent and
|
|
303
|
+
* received, metrics), so the client can show only the UI that applies.
|
|
304
|
+
* Added in protocol 2.2.0.
|
|
305
|
+
*/
|
|
306
|
+
export declare class BotReadyData extends BaseModel {
|
|
307
|
+
version: string;
|
|
308
|
+
about: Record<string, unknown> | null;
|
|
309
|
+
capabilities: BotCapabilities | null;
|
|
310
|
+
static readonly fields: FieldSpecs;
|
|
311
|
+
constructor(options: BotReadyDataOptions);
|
|
312
|
+
}
|
|
313
|
+
export interface BotReadyOptions {
|
|
314
|
+
label?: MessageLiteral;
|
|
315
|
+
type?: "bot-ready";
|
|
316
|
+
id: string;
|
|
317
|
+
data: BotReadyData | BotReadyDataOptions;
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Message indicating bot is ready for interaction.
|
|
321
|
+
*
|
|
322
|
+
* Sent after bot initialization is complete.
|
|
323
|
+
*/
|
|
324
|
+
export declare class BotReady extends BaseModel {
|
|
325
|
+
label: MessageLiteral;
|
|
326
|
+
type: "bot-ready";
|
|
327
|
+
id: string;
|
|
328
|
+
data: BotReadyData;
|
|
329
|
+
static readonly fields: FieldSpecs;
|
|
330
|
+
constructor(options: BotReadyOptions);
|
|
331
|
+
}
|
|
332
|
+
export interface SendTextOptionsOptions {
|
|
333
|
+
runImmediately?: boolean;
|
|
334
|
+
audioResponse?: boolean;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Options for sending text input to the LLM.
|
|
338
|
+
*
|
|
339
|
+
* Contains options for how the pipeline should process the text input.
|
|
340
|
+
*/
|
|
341
|
+
export declare class SendTextOptions extends BaseModel {
|
|
342
|
+
runImmediately: boolean;
|
|
343
|
+
audioResponse: boolean;
|
|
344
|
+
static readonly fields: FieldSpecs;
|
|
345
|
+
constructor(options?: SendTextOptionsOptions);
|
|
346
|
+
}
|
|
347
|
+
export interface SendTextDataOptions {
|
|
348
|
+
content: string;
|
|
349
|
+
options?: SendTextOptions | SendTextOptionsOptions | null;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Data format for sending text input to the LLM.
|
|
353
|
+
*
|
|
354
|
+
* Contains the text content to send and any options for how the pipeline
|
|
355
|
+
* should process it.
|
|
356
|
+
*/
|
|
357
|
+
export declare class SendTextData extends BaseModel {
|
|
358
|
+
content: string;
|
|
359
|
+
options: SendTextOptions | null;
|
|
360
|
+
static readonly fields: FieldSpecs;
|
|
361
|
+
constructor(options: SendTextDataOptions);
|
|
362
|
+
}
|
|
363
|
+
export interface FileSourceOptions {
|
|
364
|
+
type: RTVIFileSourceType;
|
|
365
|
+
}
|
|
366
|
+
/** Base class for RTVI file sources. */
|
|
367
|
+
export declare class FileSource extends BaseModel {
|
|
368
|
+
type: RTVIFileSourceType;
|
|
369
|
+
static readonly fields: FieldSpecs;
|
|
370
|
+
constructor(options: FileSourceOptions);
|
|
371
|
+
}
|
|
372
|
+
export interface FileBytesOptions {
|
|
373
|
+
type?: RTVIFileSourceType;
|
|
374
|
+
/** Base64-encoded string. */
|
|
375
|
+
bytes: string;
|
|
376
|
+
width?: number | null;
|
|
377
|
+
height?: number | null;
|
|
378
|
+
}
|
|
379
|
+
/** File source as base64-encoded bytes. */
|
|
380
|
+
export declare class FileBytes extends FileSource {
|
|
381
|
+
/** Base64-encoded string. */
|
|
382
|
+
bytes: string;
|
|
383
|
+
width: number | null;
|
|
384
|
+
height: number | null;
|
|
385
|
+
static readonly fields: FieldSpecs;
|
|
386
|
+
constructor(options: FileBytesOptions);
|
|
387
|
+
}
|
|
388
|
+
export interface FileUrlOptions {
|
|
389
|
+
type?: RTVIFileSourceType;
|
|
390
|
+
url: string;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* File source as a URL.
|
|
394
|
+
*
|
|
395
|
+
* - `url`: the file's URL: whatever the `POST /files` upload endpoint
|
|
396
|
+
* returned (`pipecat:<id>` with the default local storage, or a URL minted
|
|
397
|
+
* by a custom storage backend), a cloud-storage URI (`s3://`, `gs://`), or a
|
|
398
|
+
* plain `http(s)` URL. The URL is resolved at completion time: the LLM
|
|
399
|
+
* provider fetches it itself when it can (public URLs, its own cloud IAM),
|
|
400
|
+
* and otherwise the LLM service's `FileResolver` downloads the bytes and
|
|
401
|
+
* inlines them.
|
|
402
|
+
*/
|
|
403
|
+
export declare class FileUrl extends FileSource {
|
|
404
|
+
url: string;
|
|
405
|
+
static readonly fields: FieldSpecs;
|
|
406
|
+
constructor(options: FileUrlOptions);
|
|
407
|
+
}
|
|
408
|
+
export interface FileOptions {
|
|
409
|
+
/** Mime format of the file, e.g. 'application/pdf'. */
|
|
410
|
+
format: string;
|
|
411
|
+
name?: string | null;
|
|
412
|
+
source: FileBytes | FileUrl | FileBytesOptions | FileUrlOptions;
|
|
413
|
+
}
|
|
414
|
+
/** File data structure for RTVI file sending. */
|
|
415
|
+
export declare class File extends BaseModel {
|
|
416
|
+
/** Mime format of the file, e.g. 'application/pdf'. */
|
|
417
|
+
format: string;
|
|
418
|
+
name: string | null;
|
|
419
|
+
source: FileBytes | FileUrl;
|
|
420
|
+
static readonly fields: FieldSpecs;
|
|
421
|
+
constructor(options: FileOptions);
|
|
422
|
+
}
|
|
423
|
+
export interface SendFileOptionsOptions {
|
|
424
|
+
runImmediately?: boolean;
|
|
425
|
+
audioResponse?: boolean;
|
|
426
|
+
/** E.g. 'detail' in OpenAI or 'citations' in Bedrock. */
|
|
427
|
+
customOptions?: Record<string, unknown> | null;
|
|
428
|
+
}
|
|
429
|
+
/** Options for sending a file to the LLM. */
|
|
430
|
+
export declare class SendFileOptions extends BaseModel {
|
|
431
|
+
runImmediately: boolean;
|
|
432
|
+
audioResponse: boolean;
|
|
433
|
+
/** E.g. 'detail' in OpenAI or 'citations' in Bedrock. */
|
|
434
|
+
customOptions: Record<string, unknown> | null;
|
|
435
|
+
static readonly fields: FieldSpecs;
|
|
436
|
+
constructor(options?: SendFileOptionsOptions);
|
|
437
|
+
}
|
|
438
|
+
export interface SendFileDataOptions {
|
|
439
|
+
/** Text to accompany the file. */
|
|
440
|
+
content: string;
|
|
441
|
+
file: File | FileOptions;
|
|
442
|
+
options?: SendFileOptions | SendFileOptionsOptions | null;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Data format for sending a file to the LLM.
|
|
446
|
+
*
|
|
447
|
+
* Contains the information of the file to send and any options for how the
|
|
448
|
+
* pipeline should process it.
|
|
449
|
+
*/
|
|
450
|
+
export declare class SendFileData extends BaseModel {
|
|
451
|
+
/** Text to accompany the file. */
|
|
452
|
+
content: string;
|
|
453
|
+
file: File;
|
|
454
|
+
options: SendFileOptions | null;
|
|
455
|
+
static readonly fields: FieldSpecs;
|
|
456
|
+
constructor(options: SendFileDataOptions);
|
|
457
|
+
}
|
|
458
|
+
export interface DTMFInputDataOptions {
|
|
459
|
+
buttons: KeypadEntry[];
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Data format for DTMF keypresses sent from the client.
|
|
463
|
+
*
|
|
464
|
+
* Carries one or more keypad entries (`0`-`9`, `*`, `#`), delivered in order,
|
|
465
|
+
* so the bot's DTMF handling (e.g. a `DTMFAggregator`) sees them exactly as a
|
|
466
|
+
* telephony transport would deliver rapid keypresses.
|
|
467
|
+
*
|
|
468
|
+
* Protocol 2.1.0 replaced the single `button` field with `buttons`.
|
|
469
|
+
*/
|
|
470
|
+
export declare class DTMFInputData extends BaseModel {
|
|
471
|
+
buttons: KeypadEntry[];
|
|
472
|
+
static readonly fields: FieldSpecs;
|
|
473
|
+
constructor(options: DTMFInputDataOptions);
|
|
474
|
+
}
|
|
475
|
+
export interface LLMFunctionCallStartMessageDataOptions {
|
|
476
|
+
functionName?: string | null;
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* Data for LLM function call start notification.
|
|
480
|
+
*
|
|
481
|
+
* Contains the function name being called. Fields may be omitted based on the
|
|
482
|
+
* configured function_call_report_level for security.
|
|
483
|
+
*
|
|
484
|
+
* - `functionName`: name of the function called.
|
|
485
|
+
*/
|
|
486
|
+
export declare class LLMFunctionCallStartMessageData extends BaseModel {
|
|
487
|
+
functionName: string | null;
|
|
488
|
+
static readonly fields: FieldSpecs;
|
|
489
|
+
constructor(options?: LLMFunctionCallStartMessageDataOptions);
|
|
490
|
+
}
|
|
491
|
+
export interface LLMFunctionCallStartMessageOptions {
|
|
492
|
+
label?: MessageLiteral;
|
|
493
|
+
type?: "llm-function-call-started";
|
|
494
|
+
data: LLMFunctionCallStartMessageData | LLMFunctionCallStartMessageDataOptions;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Message notifying that an LLM function call has started.
|
|
498
|
+
*
|
|
499
|
+
* Sent when the LLM begins a function call.
|
|
500
|
+
*/
|
|
501
|
+
export declare class LLMFunctionCallStartMessage extends BaseModel {
|
|
502
|
+
label: MessageLiteral;
|
|
503
|
+
type: "llm-function-call-started";
|
|
504
|
+
data: LLMFunctionCallStartMessageData;
|
|
505
|
+
static readonly fields: FieldSpecs;
|
|
506
|
+
constructor(options: LLMFunctionCallStartMessageOptions);
|
|
507
|
+
}
|
|
508
|
+
export interface LLMFunctionCallResultDataOptions {
|
|
509
|
+
functionName: string;
|
|
510
|
+
toolCallId: string;
|
|
511
|
+
arguments: Record<string, unknown>;
|
|
512
|
+
result: Record<string, unknown> | string;
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* Data for LLM function call result.
|
|
516
|
+
*
|
|
517
|
+
* Contains function call details and result.
|
|
518
|
+
*/
|
|
519
|
+
export declare class LLMFunctionCallResultData extends BaseModel {
|
|
520
|
+
functionName: string;
|
|
521
|
+
toolCallId: string;
|
|
522
|
+
arguments: Record<string, unknown>;
|
|
523
|
+
result: Record<string, unknown> | string;
|
|
524
|
+
static readonly fields: FieldSpecs;
|
|
525
|
+
constructor(options: LLMFunctionCallResultDataOptions);
|
|
526
|
+
}
|
|
527
|
+
export interface LLMFunctionCallInProgressMessageDataOptions {
|
|
528
|
+
toolCallId: string;
|
|
529
|
+
functionName?: string | null;
|
|
530
|
+
arguments?: Record<string, unknown> | null;
|
|
531
|
+
}
|
|
532
|
+
/**
|
|
533
|
+
* Data for LLM function call in-progress notification.
|
|
534
|
+
*
|
|
535
|
+
* Contains function call details including name, ID, and arguments. Fields
|
|
536
|
+
* may be omitted based on the configured function_call_report_level for
|
|
537
|
+
* security.
|
|
538
|
+
*
|
|
539
|
+
* - `toolCallId`: unique identifier of the call.
|
|
540
|
+
* - `functionName`: name of the function called.
|
|
541
|
+
* - `arguments`: arguments passed to the function.
|
|
542
|
+
*/
|
|
543
|
+
export declare class LLMFunctionCallInProgressMessageData extends BaseModel {
|
|
544
|
+
toolCallId: string;
|
|
545
|
+
functionName: string | null;
|
|
546
|
+
arguments: Record<string, unknown> | null;
|
|
547
|
+
static readonly fields: FieldSpecs;
|
|
548
|
+
constructor(options: LLMFunctionCallInProgressMessageDataOptions);
|
|
549
|
+
}
|
|
550
|
+
export interface LLMFunctionCallInProgressMessageOptions {
|
|
551
|
+
label?: MessageLiteral;
|
|
552
|
+
type?: "llm-function-call-in-progress";
|
|
553
|
+
data: LLMFunctionCallInProgressMessageData | LLMFunctionCallInProgressMessageDataOptions;
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* Message notifying that an LLM function call is in progress.
|
|
557
|
+
*
|
|
558
|
+
* Sent when the LLM function call execution begins.
|
|
559
|
+
*/
|
|
560
|
+
export declare class LLMFunctionCallInProgressMessage extends BaseModel {
|
|
561
|
+
label: MessageLiteral;
|
|
562
|
+
type: "llm-function-call-in-progress";
|
|
563
|
+
data: LLMFunctionCallInProgressMessageData;
|
|
564
|
+
static readonly fields: FieldSpecs;
|
|
565
|
+
constructor(options: LLMFunctionCallInProgressMessageOptions);
|
|
566
|
+
}
|
|
567
|
+
export interface LLMFunctionCallStoppedMessageDataOptions {
|
|
568
|
+
toolCallId: string;
|
|
569
|
+
cancelled: boolean;
|
|
570
|
+
functionName?: string | null;
|
|
571
|
+
result?: unknown;
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* Data for LLM function call stopped notification.
|
|
575
|
+
*
|
|
576
|
+
* Contains details about the function call that stopped, including whether
|
|
577
|
+
* it was cancelled or completed with a result. Fields may be omitted based on
|
|
578
|
+
* the configured function_call_report_level for security.
|
|
579
|
+
*
|
|
580
|
+
* - `toolCallId`: unique identifier of the call.
|
|
581
|
+
* - `cancelled`: whether the call was cancelled rather than completed.
|
|
582
|
+
* - `functionName`: name of the function called.
|
|
583
|
+
* - `result`: the result, when the call completed with one.
|
|
584
|
+
*/
|
|
585
|
+
export declare class LLMFunctionCallStoppedMessageData extends BaseModel {
|
|
586
|
+
toolCallId: string;
|
|
587
|
+
cancelled: boolean;
|
|
588
|
+
functionName: string | null;
|
|
589
|
+
result: unknown;
|
|
590
|
+
static readonly fields: FieldSpecs;
|
|
591
|
+
constructor(options: LLMFunctionCallStoppedMessageDataOptions);
|
|
592
|
+
}
|
|
593
|
+
export interface LLMFunctionCallStoppedMessageOptions {
|
|
594
|
+
label?: MessageLiteral;
|
|
595
|
+
type?: "llm-function-call-stopped";
|
|
596
|
+
data: LLMFunctionCallStoppedMessageData | LLMFunctionCallStoppedMessageDataOptions;
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* Message notifying that an LLM function call has stopped.
|
|
600
|
+
*
|
|
601
|
+
* Sent when a function call completes (with result) or is cancelled.
|
|
602
|
+
*/
|
|
603
|
+
export declare class LLMFunctionCallStoppedMessage extends BaseModel {
|
|
604
|
+
label: MessageLiteral;
|
|
605
|
+
type: "llm-function-call-stopped";
|
|
606
|
+
data: LLMFunctionCallStoppedMessageData;
|
|
607
|
+
static readonly fields: FieldSpecs;
|
|
608
|
+
constructor(options: LLMFunctionCallStoppedMessageOptions);
|
|
609
|
+
}
|
|
610
|
+
/** Options of a message that only has a label and a type. */
|
|
611
|
+
export interface SignalMessageOptions<T extends string> {
|
|
612
|
+
label?: MessageLiteral;
|
|
613
|
+
type?: T;
|
|
614
|
+
}
|
|
615
|
+
/** Message indicating bot LLM processing has started. */
|
|
616
|
+
export declare class BotLLMStartedMessage extends BaseModel {
|
|
617
|
+
label: MessageLiteral;
|
|
618
|
+
type: "bot-llm-started";
|
|
619
|
+
static readonly fields: FieldSpecs;
|
|
620
|
+
constructor(options?: SignalMessageOptions<"bot-llm-started">);
|
|
621
|
+
}
|
|
622
|
+
/** Message indicating bot LLM processing has stopped. */
|
|
623
|
+
export declare class BotLLMStoppedMessage extends BaseModel {
|
|
624
|
+
label: MessageLiteral;
|
|
625
|
+
type: "bot-llm-stopped";
|
|
626
|
+
static readonly fields: FieldSpecs;
|
|
627
|
+
constructor(options?: SignalMessageOptions<"bot-llm-stopped">);
|
|
628
|
+
}
|
|
629
|
+
/** Message indicating bot TTS processing has started. */
|
|
630
|
+
export declare class BotTTSStartedMessage extends BaseModel {
|
|
631
|
+
label: MessageLiteral;
|
|
632
|
+
type: "bot-tts-started";
|
|
633
|
+
static readonly fields: FieldSpecs;
|
|
634
|
+
constructor(options?: SignalMessageOptions<"bot-tts-started">);
|
|
635
|
+
}
|
|
636
|
+
/** Message indicating bot TTS processing has stopped. */
|
|
637
|
+
export declare class BotTTSStoppedMessage extends BaseModel {
|
|
638
|
+
label: MessageLiteral;
|
|
639
|
+
type: "bot-tts-stopped";
|
|
640
|
+
static readonly fields: FieldSpecs;
|
|
641
|
+
constructor(options?: SignalMessageOptions<"bot-tts-stopped">);
|
|
642
|
+
}
|
|
643
|
+
export interface TextMessageDataOptions {
|
|
644
|
+
text: string;
|
|
645
|
+
}
|
|
646
|
+
/**
|
|
647
|
+
* Data for text-based RTVI messages.
|
|
648
|
+
*
|
|
649
|
+
* Contains text content.
|
|
650
|
+
*/
|
|
651
|
+
export declare class TextMessageData extends BaseModel {
|
|
652
|
+
text: string;
|
|
653
|
+
static readonly fields: FieldSpecs;
|
|
654
|
+
constructor(options: TextMessageDataOptions);
|
|
655
|
+
}
|
|
656
|
+
export type SpokenStatus = "new" | "in-progress" | "completed" | null;
|
|
657
|
+
export interface SpokenProgressDataOptions {
|
|
658
|
+
accumulatedText: string;
|
|
659
|
+
remainingText: string;
|
|
660
|
+
}
|
|
661
|
+
/**
|
|
662
|
+
* Word-level TTS progress within a spoken segment.
|
|
663
|
+
*
|
|
664
|
+
* - `accumulatedText`: text already spoken in this segment, including the
|
|
665
|
+
* current word.
|
|
666
|
+
* - `remainingText`: text not yet spoken in this segment.
|
|
667
|
+
*/
|
|
668
|
+
export declare class SpokenProgressData extends BaseModel {
|
|
669
|
+
accumulatedText: string;
|
|
670
|
+
remainingText: string;
|
|
671
|
+
static readonly fields: FieldSpecs;
|
|
672
|
+
constructor(options: SpokenProgressDataOptions);
|
|
673
|
+
}
|
|
674
|
+
export interface BotOutputTransformResultOptions {
|
|
675
|
+
text: string;
|
|
676
|
+
accumulatedText?: string | null;
|
|
677
|
+
remainingText?: string | null;
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
* Return type for bot output transform functions.
|
|
681
|
+
*
|
|
682
|
+
* - `text`: the transformed full text of the segment.
|
|
683
|
+
* - `accumulatedText`: transformed spoken-so-far portion. Only populated when
|
|
684
|
+
* the transform is called from a progress context.
|
|
685
|
+
* - `remainingText`: transformed not-yet-spoken portion. Only populated when
|
|
686
|
+
* the transform is called from a progress context.
|
|
687
|
+
*/
|
|
688
|
+
export declare class BotOutputTransformResult extends BaseModel {
|
|
689
|
+
text: string;
|
|
690
|
+
accumulatedText: string | null;
|
|
691
|
+
remainingText: string | null;
|
|
692
|
+
static readonly fields: FieldSpecs;
|
|
693
|
+
constructor(options: BotOutputTransformResultOptions);
|
|
694
|
+
}
|
|
695
|
+
export interface BotOutputMessageDataOptions extends TextMessageDataOptions {
|
|
696
|
+
textType?: TextType | string;
|
|
697
|
+
aggregatedBy?: TextType | string | null;
|
|
698
|
+
segmentId?: number | null;
|
|
699
|
+
spoken?: boolean | null;
|
|
700
|
+
willBeSpoken?: boolean | null;
|
|
701
|
+
spokenStatus?: SpokenStatus;
|
|
702
|
+
spokenProgress?: SpokenProgressData | SpokenProgressDataOptions | null;
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Data for bot output RTVI messages.
|
|
706
|
+
*
|
|
707
|
+
* Extends TextMessageData to include metadata about the output.
|
|
708
|
+
*
|
|
709
|
+
* This class supports both protocol v1 (1.4.x) and v2 (2.0.0+) clients. The
|
|
710
|
+
* observer populates different field subsets depending on the negotiated
|
|
711
|
+
* version; `sendRtviMessage` serialises with `excludeNone: true` so each
|
|
712
|
+
* client only sees the fields relevant to its version.
|
|
713
|
+
*
|
|
714
|
+
* - `textType`: what form the text is in (e.g., sentence, code, etc.).
|
|
715
|
+
* - `aggregatedBy`: what form the text is in, always the same as `textType`.
|
|
716
|
+
* Deprecated upstream since 1.13.0 (use `textType`); kept because it is
|
|
717
|
+
* still on the wire.
|
|
718
|
+
* - `segmentId`: ID of the source AggregatedTextFrame.
|
|
719
|
+
* - `spoken`: **(v1 only)** whether the text has been spoken by TTS.
|
|
720
|
+
* - `willBeSpoken`: **(v2+)** whether the text will be spoken by TTS.
|
|
721
|
+
* - `spokenStatus`: **(v2+)** lifecycle status of the segment: `"new"` on its
|
|
722
|
+
* first message, the only one for text that isn't spoken; `"in-progress"`
|
|
723
|
+
* as each of its words is spoken, for TTS services with word timestamps;
|
|
724
|
+
* `"completed"` once its last word is spoken.
|
|
725
|
+
* - `spokenProgress`: **(v2+)** accumulated / remaining text breakdown.
|
|
726
|
+
* Present when `willBeSpoken` is true.
|
|
727
|
+
*/
|
|
728
|
+
export declare class BotOutputMessageData extends TextMessageData {
|
|
729
|
+
textType: TextType | string;
|
|
730
|
+
aggregatedBy: TextType | string | null;
|
|
731
|
+
segmentId: number | null;
|
|
732
|
+
spoken: boolean | null;
|
|
733
|
+
willBeSpoken: boolean | null;
|
|
734
|
+
spokenStatus: SpokenStatus;
|
|
735
|
+
spokenProgress: SpokenProgressData | null;
|
|
736
|
+
static readonly fields: FieldSpecs;
|
|
737
|
+
constructor(options: BotOutputMessageDataOptions);
|
|
738
|
+
/** Fill whichever of `textType` and `aggregatedBy` is missing from the other. */
|
|
739
|
+
protected static _beforeValidate(data: Record<string, unknown>): Record<string, unknown>;
|
|
740
|
+
}
|
|
741
|
+
export interface BotOutputMessageOptions {
|
|
742
|
+
label?: MessageLiteral;
|
|
743
|
+
type?: "bot-output";
|
|
744
|
+
data: BotOutputMessageData | BotOutputMessageDataOptions;
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* Message containing bot output text.
|
|
748
|
+
*
|
|
749
|
+
* An event meant to holistically represent what the bot is outputting, along
|
|
750
|
+
* with metadata about the output and if it has been spoken.
|
|
751
|
+
*/
|
|
752
|
+
export declare class BotOutputMessage extends BaseModel {
|
|
753
|
+
label: MessageLiteral;
|
|
754
|
+
type: "bot-output";
|
|
755
|
+
data: BotOutputMessageData;
|
|
756
|
+
static readonly fields: FieldSpecs;
|
|
757
|
+
constructor(options: BotOutputMessageOptions);
|
|
758
|
+
}
|
|
759
|
+
/** Options of a message whose data is a `TextMessageData`. */
|
|
760
|
+
export interface TextMessageOptions<T extends string> {
|
|
761
|
+
label?: MessageLiteral;
|
|
762
|
+
type?: T;
|
|
763
|
+
data: TextMessageData | TextMessageDataOptions;
|
|
764
|
+
}
|
|
765
|
+
/**
|
|
766
|
+
* Message containing bot transcription text.
|
|
767
|
+
*
|
|
768
|
+
* Sent when the bot's speech is transcribed.
|
|
769
|
+
*/
|
|
770
|
+
export declare class BotTranscriptionMessage extends BaseModel {
|
|
771
|
+
label: MessageLiteral;
|
|
772
|
+
type: "bot-transcription";
|
|
773
|
+
data: TextMessageData;
|
|
774
|
+
static readonly fields: FieldSpecs;
|
|
775
|
+
constructor(options: TextMessageOptions<"bot-transcription">);
|
|
776
|
+
}
|
|
777
|
+
/**
|
|
778
|
+
* Message containing bot LLM text output.
|
|
779
|
+
*
|
|
780
|
+
* Sent when the bot's LLM generates text.
|
|
781
|
+
*
|
|
782
|
+
* Deprecated upstream since 1.13.0 (use `LLMRawTextMessage`); kept because
|
|
783
|
+
* the observer still sends it while `botLlmEnabled` is on.
|
|
784
|
+
*/
|
|
785
|
+
export declare class BotLLMTextMessage extends BaseModel {
|
|
786
|
+
label: MessageLiteral;
|
|
787
|
+
type: "bot-llm-text";
|
|
788
|
+
data: TextMessageData;
|
|
789
|
+
static readonly fields: FieldSpecs;
|
|
790
|
+
constructor(options: TextMessageOptions<"bot-llm-text">);
|
|
791
|
+
}
|
|
792
|
+
export interface BotLLMMarkerMessageDataOptions {
|
|
793
|
+
text: string;
|
|
794
|
+
kind?: string | null;
|
|
795
|
+
raw?: string;
|
|
796
|
+
markers?: string[];
|
|
797
|
+
}
|
|
798
|
+
/**
|
|
799
|
+
* Data for a bot LLM marker message.
|
|
800
|
+
*
|
|
801
|
+
* - `text`: the marker as the LLM produced it; empty when the response
|
|
802
|
+
* carried none.
|
|
803
|
+
* - `kind`: what the marker means, in the emitter's vocabulary (the
|
|
804
|
+
* turn-completion mixin's `complete`, `short` or `long`), or `null` when the
|
|
805
|
+
* emitter gave none.
|
|
806
|
+
* - `raw`: the response's text as the LLM produced it, markers included.
|
|
807
|
+
* - `markers`: every marker the emitter recognizes.
|
|
808
|
+
*/
|
|
809
|
+
export declare class BotLLMMarkerMessageData extends BaseModel {
|
|
810
|
+
text: string;
|
|
811
|
+
kind: string | null;
|
|
812
|
+
raw: string;
|
|
813
|
+
markers: string[];
|
|
814
|
+
static readonly fields: FieldSpecs;
|
|
815
|
+
constructor(options: BotLLMMarkerMessageDataOptions);
|
|
816
|
+
}
|
|
817
|
+
export interface BotLLMMarkerMessageOptions {
|
|
818
|
+
label?: MessageLiteral;
|
|
819
|
+
type?: "bot-llm-marker";
|
|
820
|
+
data: BotLLMMarkerMessageData | BotLLMMarkerMessageDataOptions;
|
|
821
|
+
}
|
|
822
|
+
/**
|
|
823
|
+
* Message reporting the sideband marker the bot's LLM emitted in a response.
|
|
824
|
+
*
|
|
825
|
+
* A marker is structured assistant output kept out of the spoken text, such
|
|
826
|
+
* as the turn-completion markers of `filterIncompleteUserTurns`. Sent once
|
|
827
|
+
* per response, when it ends, and only when the observer's
|
|
828
|
+
* `botLlmMarkerEnabled` is on.
|
|
829
|
+
*/
|
|
830
|
+
export declare class BotLLMMarkerMessage extends BaseModel {
|
|
831
|
+
label: MessageLiteral;
|
|
832
|
+
type: "bot-llm-marker";
|
|
833
|
+
data: BotLLMMarkerMessageData;
|
|
834
|
+
static readonly fields: FieldSpecs;
|
|
835
|
+
constructor(options: BotLLMMarkerMessageOptions);
|
|
836
|
+
}
|
|
837
|
+
/**
|
|
838
|
+
* Message containing bot TTS text output.
|
|
839
|
+
*
|
|
840
|
+
* Sent when text is being processed by TTS.
|
|
841
|
+
*
|
|
842
|
+
* Deprecated upstream since 1.13.0 (use `TTSRawTextMessage`); kept because
|
|
843
|
+
* the observer still sends it while `botTtsEnabled` is on.
|
|
844
|
+
*/
|
|
845
|
+
export declare class BotTTSTextMessage extends BaseModel {
|
|
846
|
+
label: MessageLiteral;
|
|
847
|
+
type: "bot-tts-text";
|
|
848
|
+
data: TextMessageData;
|
|
849
|
+
static readonly fields: FieldSpecs;
|
|
850
|
+
constructor(options: TextMessageOptions<"bot-tts-text">);
|
|
851
|
+
}
|
|
852
|
+
export interface AudioMessageDataOptions {
|
|
853
|
+
audio: string;
|
|
854
|
+
sampleRate: number;
|
|
855
|
+
numChannels: number;
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* Data for audio-based RTVI messages.
|
|
859
|
+
*
|
|
860
|
+
* Contains audio data and metadata.
|
|
861
|
+
*/
|
|
862
|
+
export declare class AudioMessageData extends BaseModel {
|
|
863
|
+
audio: string;
|
|
864
|
+
sampleRate: number;
|
|
865
|
+
numChannels: number;
|
|
866
|
+
static readonly fields: FieldSpecs;
|
|
867
|
+
constructor(options: AudioMessageDataOptions);
|
|
868
|
+
}
|
|
869
|
+
export interface BotTTSAudioMessageOptions {
|
|
870
|
+
label?: MessageLiteral;
|
|
871
|
+
type?: "bot-tts-audio";
|
|
872
|
+
data: AudioMessageData | AudioMessageDataOptions;
|
|
873
|
+
}
|
|
874
|
+
/**
|
|
875
|
+
* Message containing bot TTS audio output.
|
|
876
|
+
*
|
|
877
|
+
* Sent when the bot's TTS generates audio.
|
|
878
|
+
*/
|
|
879
|
+
export declare class BotTTSAudioMessage extends BaseModel {
|
|
880
|
+
label: MessageLiteral;
|
|
881
|
+
type: "bot-tts-audio";
|
|
882
|
+
data: AudioMessageData;
|
|
883
|
+
static readonly fields: FieldSpecs;
|
|
884
|
+
constructor(options: BotTTSAudioMessageOptions);
|
|
885
|
+
}
|
|
886
|
+
export interface UserTranscriptionMessageDataOptions {
|
|
887
|
+
text: string;
|
|
888
|
+
userId: string;
|
|
889
|
+
timestamp: string;
|
|
890
|
+
final: boolean;
|
|
891
|
+
}
|
|
892
|
+
/**
|
|
893
|
+
* Data for user transcription messages.
|
|
894
|
+
*
|
|
895
|
+
* Contains transcription text and metadata.
|
|
896
|
+
*
|
|
897
|
+
* Deprecated upstream since 1.13.0 (use `STTRawTextMessageData`); kept
|
|
898
|
+
* because the observer still sends `user-transcription` messages.
|
|
899
|
+
*/
|
|
900
|
+
export declare class UserTranscriptionMessageData extends BaseModel {
|
|
901
|
+
text: string;
|
|
902
|
+
userId: string;
|
|
903
|
+
timestamp: string;
|
|
904
|
+
final: boolean;
|
|
905
|
+
static readonly fields: FieldSpecs;
|
|
906
|
+
constructor(options: UserTranscriptionMessageDataOptions);
|
|
907
|
+
}
|
|
908
|
+
export interface UserTranscriptionMessageOptions {
|
|
909
|
+
label?: MessageLiteral;
|
|
910
|
+
type?: "user-transcription";
|
|
911
|
+
data: UserTranscriptionMessageData | UserTranscriptionMessageDataOptions;
|
|
912
|
+
}
|
|
913
|
+
/**
|
|
914
|
+
* Message containing user transcription.
|
|
915
|
+
*
|
|
916
|
+
* Sent when user speech is transcribed.
|
|
917
|
+
*
|
|
918
|
+
* Deprecated upstream since 1.13.0 (use `STTRawTextMessage`, or
|
|
919
|
+
* `UserInputMessage` for what the user said); kept because the observer
|
|
920
|
+
* still sends it.
|
|
921
|
+
*/
|
|
922
|
+
export declare class UserTranscriptionMessage extends BaseModel {
|
|
923
|
+
label: MessageLiteral;
|
|
924
|
+
type: "user-transcription";
|
|
925
|
+
data: UserTranscriptionMessageData;
|
|
926
|
+
static readonly fields: FieldSpecs;
|
|
927
|
+
constructor(options: UserTranscriptionMessageOptions);
|
|
928
|
+
}
|
|
929
|
+
export type UserInputType = "transcription" | "chat" | "backchannel";
|
|
930
|
+
export interface UserInputMessageDataOptions {
|
|
931
|
+
text: string;
|
|
932
|
+
inputType: UserInputType;
|
|
933
|
+
timestamp: string;
|
|
934
|
+
final: boolean;
|
|
935
|
+
userId?: string | null;
|
|
936
|
+
msgId?: string | null;
|
|
937
|
+
}
|
|
938
|
+
/**
|
|
939
|
+
* Data for user input messages.
|
|
940
|
+
*
|
|
941
|
+
* - `text`: what the user said or typed.
|
|
942
|
+
* - `inputType`: what kind of input it is: `"transcription"` for speech
|
|
943
|
+
* transcribed by the STT, `"chat"` for text the client sent, or
|
|
944
|
+
* `"backchannel"` for a short acknowledgment the user said while the bot
|
|
945
|
+
* talks, such as "mhm".
|
|
946
|
+
* - `timestamp`: when the user said or sent it.
|
|
947
|
+
* - `final`: whether the text is final. Only an interim transcription isn't.
|
|
948
|
+
* - `userId`: identifier for the user who spoke or typed. For chat, set only
|
|
949
|
+
* when the transport knows the sender, such as Daily and LiveKit.
|
|
950
|
+
* - `msgId`: for chat, the id of the client's `send-text` message.
|
|
951
|
+
*/
|
|
952
|
+
export declare class UserInputMessageData extends BaseModel {
|
|
953
|
+
text: string;
|
|
954
|
+
inputType: UserInputType;
|
|
955
|
+
timestamp: string;
|
|
956
|
+
final: boolean;
|
|
957
|
+
userId: string | null;
|
|
958
|
+
msgId: string | null;
|
|
959
|
+
static readonly fields: FieldSpecs;
|
|
960
|
+
constructor(options: UserInputMessageDataOptions);
|
|
961
|
+
}
|
|
962
|
+
export interface UserInputMessageOptions {
|
|
963
|
+
label?: MessageLiteral;
|
|
964
|
+
type?: "user-input";
|
|
965
|
+
data: UserInputMessageData | UserInputMessageDataOptions;
|
|
966
|
+
}
|
|
967
|
+
/**
|
|
968
|
+
* Message containing what the user said or typed.
|
|
969
|
+
*
|
|
970
|
+
* The user's counterpart of `bot-output`. A backchannel doesn't interrupt the
|
|
971
|
+
* bot or reach the LLM.
|
|
972
|
+
*/
|
|
973
|
+
export declare class UserInputMessage extends BaseModel {
|
|
974
|
+
label: MessageLiteral;
|
|
975
|
+
type: "user-input";
|
|
976
|
+
data: UserInputMessageData;
|
|
977
|
+
static readonly fields: FieldSpecs;
|
|
978
|
+
constructor(options: UserInputMessageOptions);
|
|
979
|
+
}
|
|
980
|
+
/**
|
|
981
|
+
* Message containing user text input for LLM.
|
|
982
|
+
*
|
|
983
|
+
* Sent when user text is processed by the LLM.
|
|
984
|
+
*/
|
|
985
|
+
export declare class UserLLMTextMessage extends BaseModel {
|
|
986
|
+
label: MessageLiteral;
|
|
987
|
+
type: "user-llm-text";
|
|
988
|
+
data: TextMessageData;
|
|
989
|
+
static readonly fields: FieldSpecs;
|
|
990
|
+
constructor(options: TextMessageOptions<"user-llm-text">);
|
|
991
|
+
}
|
|
992
|
+
export interface STTRawTextMessageDataOptions {
|
|
993
|
+
text: string;
|
|
994
|
+
userId: string;
|
|
995
|
+
timestamp: string;
|
|
996
|
+
final: boolean;
|
|
997
|
+
}
|
|
998
|
+
/**
|
|
999
|
+
* Data for STT raw text messages.
|
|
1000
|
+
*
|
|
1001
|
+
* - `text`: the transcribed text.
|
|
1002
|
+
* - `userId`: identifier for the user who spoke.
|
|
1003
|
+
* - `timestamp`: when the user said it.
|
|
1004
|
+
* - `final`: whether the transcription is final, as opposed to interim.
|
|
1005
|
+
*/
|
|
1006
|
+
export declare class STTRawTextMessageData extends BaseModel {
|
|
1007
|
+
text: string;
|
|
1008
|
+
userId: string;
|
|
1009
|
+
timestamp: string;
|
|
1010
|
+
final: boolean;
|
|
1011
|
+
static readonly fields: FieldSpecs;
|
|
1012
|
+
constructor(options: STTRawTextMessageDataOptions);
|
|
1013
|
+
}
|
|
1014
|
+
export interface STTRawTextMessageOptions {
|
|
1015
|
+
label?: MessageLiteral;
|
|
1016
|
+
type?: "stt-raw-text";
|
|
1017
|
+
data: STTRawTextMessageData | STTRawTextMessageDataOptions;
|
|
1018
|
+
}
|
|
1019
|
+
/** Message reporting a transcription as the STT produced it, interim ones included. */
|
|
1020
|
+
export declare class STTRawTextMessage extends BaseModel {
|
|
1021
|
+
label: MessageLiteral;
|
|
1022
|
+
type: "stt-raw-text";
|
|
1023
|
+
data: STTRawTextMessageData;
|
|
1024
|
+
static readonly fields: FieldSpecs;
|
|
1025
|
+
constructor(options: STTRawTextMessageOptions);
|
|
1026
|
+
}
|
|
1027
|
+
/** Message reporting a chunk of text as the LLM streamed it. */
|
|
1028
|
+
export declare class LLMRawTextMessage extends BaseModel {
|
|
1029
|
+
label: MessageLiteral;
|
|
1030
|
+
type: "llm-raw-text";
|
|
1031
|
+
data: TextMessageData;
|
|
1032
|
+
static readonly fields: FieldSpecs;
|
|
1033
|
+
constructor(options: TextMessageOptions<"llm-raw-text">);
|
|
1034
|
+
}
|
|
1035
|
+
/** Message reporting text the TTS speaks, as it is spoken. */
|
|
1036
|
+
export declare class TTSRawTextMessage extends BaseModel {
|
|
1037
|
+
label: MessageLiteral;
|
|
1038
|
+
type: "tts-raw-text";
|
|
1039
|
+
data: TextMessageData;
|
|
1040
|
+
static readonly fields: FieldSpecs;
|
|
1041
|
+
constructor(options: TextMessageOptions<"tts-raw-text">);
|
|
1042
|
+
}
|
|
1043
|
+
/** Message indicating user has started speaking. */
|
|
1044
|
+
export declare class UserStartedSpeakingMessage extends BaseModel {
|
|
1045
|
+
label: MessageLiteral;
|
|
1046
|
+
type: "user-started-speaking";
|
|
1047
|
+
static readonly fields: FieldSpecs;
|
|
1048
|
+
constructor(options?: SignalMessageOptions<"user-started-speaking">);
|
|
1049
|
+
}
|
|
1050
|
+
/** Message indicating user has stopped speaking. */
|
|
1051
|
+
export declare class UserStoppedSpeakingMessage extends BaseModel {
|
|
1052
|
+
label: MessageLiteral;
|
|
1053
|
+
type: "user-stopped-speaking";
|
|
1054
|
+
static readonly fields: FieldSpecs;
|
|
1055
|
+
constructor(options?: SignalMessageOptions<"user-stopped-speaking">);
|
|
1056
|
+
}
|
|
1057
|
+
/**
|
|
1058
|
+
* Message indicating VAD detected the user started speaking.
|
|
1059
|
+
*
|
|
1060
|
+
* Raw VAD signal, emitted independently of turn finalization (unlike
|
|
1061
|
+
* `user-started-speaking`, which a turn strategy may gate or defer).
|
|
1062
|
+
*/
|
|
1063
|
+
export declare class VADUserStartedSpeakingMessage extends BaseModel {
|
|
1064
|
+
label: MessageLiteral;
|
|
1065
|
+
type: "vad-user-started-speaking";
|
|
1066
|
+
static readonly fields: FieldSpecs;
|
|
1067
|
+
constructor(options?: SignalMessageOptions<"vad-user-started-speaking">);
|
|
1068
|
+
}
|
|
1069
|
+
/**
|
|
1070
|
+
* Message indicating VAD detected the user stopped speaking.
|
|
1071
|
+
*
|
|
1072
|
+
* Raw VAD signal, emitted independently of turn finalization (unlike
|
|
1073
|
+
* `user-stopped-speaking`, which a turn strategy may gate or defer).
|
|
1074
|
+
*/
|
|
1075
|
+
export declare class VADUserStoppedSpeakingMessage extends BaseModel {
|
|
1076
|
+
label: MessageLiteral;
|
|
1077
|
+
type: "vad-user-stopped-speaking";
|
|
1078
|
+
static readonly fields: FieldSpecs;
|
|
1079
|
+
constructor(options?: SignalMessageOptions<"vad-user-stopped-speaking">);
|
|
1080
|
+
}
|
|
1081
|
+
/** Message indicating user has been muted. */
|
|
1082
|
+
export declare class UserMuteStartedMessage extends BaseModel {
|
|
1083
|
+
label: MessageLiteral;
|
|
1084
|
+
type: "user-mute-started";
|
|
1085
|
+
static readonly fields: FieldSpecs;
|
|
1086
|
+
constructor(options?: SignalMessageOptions<"user-mute-started">);
|
|
1087
|
+
}
|
|
1088
|
+
/** Message indicating user has been unmuted. */
|
|
1089
|
+
export declare class UserMuteStoppedMessage extends BaseModel {
|
|
1090
|
+
label: MessageLiteral;
|
|
1091
|
+
type: "user-mute-stopped";
|
|
1092
|
+
static readonly fields: FieldSpecs;
|
|
1093
|
+
constructor(options?: SignalMessageOptions<"user-mute-stopped">);
|
|
1094
|
+
}
|
|
1095
|
+
/** Message indicating bot has started speaking. */
|
|
1096
|
+
export declare class BotStartedSpeakingMessage extends BaseModel {
|
|
1097
|
+
label: MessageLiteral;
|
|
1098
|
+
type: "bot-started-speaking";
|
|
1099
|
+
static readonly fields: FieldSpecs;
|
|
1100
|
+
constructor(options?: SignalMessageOptions<"bot-started-speaking">);
|
|
1101
|
+
}
|
|
1102
|
+
/** Message indicating bot has stopped speaking. */
|
|
1103
|
+
export declare class BotStoppedSpeakingMessage extends BaseModel {
|
|
1104
|
+
label: MessageLiteral;
|
|
1105
|
+
type: "bot-stopped-speaking";
|
|
1106
|
+
static readonly fields: FieldSpecs;
|
|
1107
|
+
constructor(options?: SignalMessageOptions<"bot-stopped-speaking">);
|
|
1108
|
+
}
|
|
1109
|
+
/**
|
|
1110
|
+
* Message indicating the bot was interrupted and its in-flight output cut off.
|
|
1111
|
+
*
|
|
1112
|
+
* Fires for any pipeline interruption (a VAD-detected user barge-in or a
|
|
1113
|
+
* programmatic interrupt, e.g. `send-text` with `run_immediately`) so a
|
|
1114
|
+
* client can drop whatever the bot was mid-saying.
|
|
1115
|
+
*/
|
|
1116
|
+
export declare class BotInterruptedMessage extends BaseModel {
|
|
1117
|
+
label: MessageLiteral;
|
|
1118
|
+
type: "bot-interrupted";
|
|
1119
|
+
static readonly fields: FieldSpecs;
|
|
1120
|
+
constructor(options?: SignalMessageOptions<"bot-interrupted">);
|
|
1121
|
+
}
|
|
1122
|
+
export interface MetricsMessageOptions {
|
|
1123
|
+
label?: MessageLiteral;
|
|
1124
|
+
type?: "metrics";
|
|
1125
|
+
data: Record<string, unknown>;
|
|
1126
|
+
}
|
|
1127
|
+
/**
|
|
1128
|
+
* Message containing performance metrics.
|
|
1129
|
+
*
|
|
1130
|
+
* Sent to provide performance and usage metrics.
|
|
1131
|
+
*/
|
|
1132
|
+
export declare class MetricsMessage extends BaseModel {
|
|
1133
|
+
label: MessageLiteral;
|
|
1134
|
+
type: "metrics";
|
|
1135
|
+
data: Record<string, unknown>;
|
|
1136
|
+
static readonly fields: FieldSpecs;
|
|
1137
|
+
constructor(options: MetricsMessageOptions);
|
|
1138
|
+
}
|
|
1139
|
+
export interface ServerMessageOptions {
|
|
1140
|
+
label?: MessageLiteral;
|
|
1141
|
+
type?: "server-message";
|
|
1142
|
+
data: unknown;
|
|
1143
|
+
}
|
|
1144
|
+
/**
|
|
1145
|
+
* Generic server message.
|
|
1146
|
+
*
|
|
1147
|
+
* Used for custom server-to-client messages.
|
|
1148
|
+
*/
|
|
1149
|
+
export declare class ServerMessage extends BaseModel {
|
|
1150
|
+
label: MessageLiteral;
|
|
1151
|
+
type: "server-message";
|
|
1152
|
+
data: unknown;
|
|
1153
|
+
static readonly fields: FieldSpecs;
|
|
1154
|
+
constructor(options: ServerMessageOptions);
|
|
1155
|
+
}
|
|
1156
|
+
export interface AudioLevelMessageDataOptions {
|
|
1157
|
+
value: number;
|
|
1158
|
+
}
|
|
1159
|
+
/** Data format for sending audio levels. */
|
|
1160
|
+
export declare class AudioLevelMessageData extends BaseModel {
|
|
1161
|
+
value: number;
|
|
1162
|
+
static readonly fields: FieldSpecs;
|
|
1163
|
+
constructor(options: AudioLevelMessageDataOptions);
|
|
1164
|
+
}
|
|
1165
|
+
export interface AudioLevelMessageOptions<T extends string> {
|
|
1166
|
+
label?: MessageLiteral;
|
|
1167
|
+
type?: T;
|
|
1168
|
+
data: AudioLevelMessageData | AudioLevelMessageDataOptions;
|
|
1169
|
+
}
|
|
1170
|
+
/** Message indicating user audio level. */
|
|
1171
|
+
export declare class UserAudioLevelMessage extends BaseModel {
|
|
1172
|
+
label: MessageLiteral;
|
|
1173
|
+
type: "user-audio-level";
|
|
1174
|
+
data: AudioLevelMessageData;
|
|
1175
|
+
static readonly fields: FieldSpecs;
|
|
1176
|
+
constructor(options: AudioLevelMessageOptions<"user-audio-level">);
|
|
1177
|
+
}
|
|
1178
|
+
/** Message indicating bot audio level. */
|
|
1179
|
+
export declare class BotAudioLevelMessage extends BaseModel {
|
|
1180
|
+
label: MessageLiteral;
|
|
1181
|
+
type: "bot-audio-level";
|
|
1182
|
+
data: AudioLevelMessageData;
|
|
1183
|
+
static readonly fields: FieldSpecs;
|
|
1184
|
+
constructor(options: AudioLevelMessageOptions<"bot-audio-level">);
|
|
1185
|
+
}
|
|
1186
|
+
/** Message including a system log. */
|
|
1187
|
+
export declare class SystemLogMessage extends BaseModel {
|
|
1188
|
+
label: MessageLiteral;
|
|
1189
|
+
type: "system-log";
|
|
1190
|
+
data: TextMessageData;
|
|
1191
|
+
static readonly fields: FieldSpecs;
|
|
1192
|
+
constructor(options: TextMessageOptions<"system-log">);
|
|
1193
|
+
}
|
|
1194
|
+
export interface UIEventDataOptions {
|
|
1195
|
+
event: string;
|
|
1196
|
+
payload?: unknown;
|
|
1197
|
+
}
|
|
1198
|
+
/**
|
|
1199
|
+
* Inner `data` for a `ui-event` message.
|
|
1200
|
+
*
|
|
1201
|
+
* - `event`: app-defined event.
|
|
1202
|
+
* - `payload`: app-defined payload, schemaless by design.
|
|
1203
|
+
*/
|
|
1204
|
+
export declare class UIEventData extends BaseModel {
|
|
1205
|
+
event: string;
|
|
1206
|
+
payload: unknown;
|
|
1207
|
+
static readonly fields: FieldSpecs;
|
|
1208
|
+
constructor(options: UIEventDataOptions);
|
|
1209
|
+
}
|
|
1210
|
+
export interface UICommandDataOptions {
|
|
1211
|
+
command: string;
|
|
1212
|
+
payload?: unknown;
|
|
1213
|
+
}
|
|
1214
|
+
/**
|
|
1215
|
+
* Inner `data` for a `ui-command` message.
|
|
1216
|
+
*
|
|
1217
|
+
* - `command`: app-defined command.
|
|
1218
|
+
* - `payload`: app-defined payload (already a plain object by the time it
|
|
1219
|
+
* lands on the wire). The standard command payload models below produce the
|
|
1220
|
+
* right shape via `modelDump()`.
|
|
1221
|
+
*/
|
|
1222
|
+
export declare class UICommandData extends BaseModel {
|
|
1223
|
+
command: string;
|
|
1224
|
+
payload: unknown;
|
|
1225
|
+
static readonly fields: FieldSpecs;
|
|
1226
|
+
constructor(options: UICommandDataOptions);
|
|
1227
|
+
}
|
|
1228
|
+
export interface A11yNodeOptions {
|
|
1229
|
+
ref: string;
|
|
1230
|
+
role: string;
|
|
1231
|
+
name?: string | null;
|
|
1232
|
+
value?: string | null;
|
|
1233
|
+
state?: string[] | null;
|
|
1234
|
+
level?: number | null;
|
|
1235
|
+
colcount?: number | null;
|
|
1236
|
+
rowcount?: number | null;
|
|
1237
|
+
children?: (A11yNode | A11yNodeOptions)[] | null;
|
|
1238
|
+
/** Extra fields are allowed. */
|
|
1239
|
+
[key: string]: unknown;
|
|
1240
|
+
}
|
|
1241
|
+
/**
|
|
1242
|
+
* One node in the UI accessibility snapshot tree.
|
|
1243
|
+
*
|
|
1244
|
+
* Mirrors the client-side `A11yNode` wire shape. Extra fields are allowed
|
|
1245
|
+
* (kept in `modelExtra`) so clients can add platform-specific or future
|
|
1246
|
+
* metadata without breaking older servers.
|
|
1247
|
+
*
|
|
1248
|
+
* - `ref`: stable client-assigned element reference.
|
|
1249
|
+
* - `role`: ARIA-style role for the node.
|
|
1250
|
+
* - `name`: optional accessible name.
|
|
1251
|
+
* - `value`: optional current value for inputs/progress/etc.
|
|
1252
|
+
* - `state`: optional short state tags (e.g. `"focused"`, `"disabled"`,
|
|
1253
|
+
* `"offscreen"`).
|
|
1254
|
+
* - `level`: optional heading level.
|
|
1255
|
+
* - `colcount`: optional column count for grid-like containers.
|
|
1256
|
+
* - `rowcount`: optional row count for grid-like containers.
|
|
1257
|
+
* - `children`: optional child nodes.
|
|
1258
|
+
*/
|
|
1259
|
+
export declare class A11yNode extends BaseModel {
|
|
1260
|
+
static readonly extra: "allow";
|
|
1261
|
+
ref: string;
|
|
1262
|
+
role: string;
|
|
1263
|
+
name: string | null;
|
|
1264
|
+
value: string | null;
|
|
1265
|
+
state: string[] | null;
|
|
1266
|
+
level: number | null;
|
|
1267
|
+
colcount: number | null;
|
|
1268
|
+
rowcount: number | null;
|
|
1269
|
+
children: A11yNode[] | null;
|
|
1270
|
+
static readonly fields: FieldSpecs;
|
|
1271
|
+
constructor(options: A11yNodeOptions);
|
|
1272
|
+
}
|
|
1273
|
+
export interface A11ySelectionOptions {
|
|
1274
|
+
ref: string;
|
|
1275
|
+
text: string;
|
|
1276
|
+
startOffset?: number | null;
|
|
1277
|
+
endOffset?: number | null;
|
|
1278
|
+
/** Extra fields are allowed. */
|
|
1279
|
+
[key: string]: unknown;
|
|
1280
|
+
}
|
|
1281
|
+
/**
|
|
1282
|
+
* The user's current text selection in the UI snapshot.
|
|
1283
|
+
*
|
|
1284
|
+
* Extra fields are allowed for forward compatibility with client snapshot
|
|
1285
|
+
* additions.
|
|
1286
|
+
*
|
|
1287
|
+
* - `ref`: ref of the element that carries the selection.
|
|
1288
|
+
* - `text`: selected text.
|
|
1289
|
+
* - `startOffset`: optional selection start offset.
|
|
1290
|
+
* - `endOffset`: optional selection end offset.
|
|
1291
|
+
*/
|
|
1292
|
+
export declare class A11ySelection extends BaseModel {
|
|
1293
|
+
static readonly extra: "allow";
|
|
1294
|
+
ref: string;
|
|
1295
|
+
text: string;
|
|
1296
|
+
startOffset: number | null;
|
|
1297
|
+
endOffset: number | null;
|
|
1298
|
+
static readonly fields: FieldSpecs;
|
|
1299
|
+
constructor(options: A11ySelectionOptions);
|
|
1300
|
+
}
|
|
1301
|
+
export interface A11ySnapshotOptions {
|
|
1302
|
+
root: A11yNode | A11yNodeOptions;
|
|
1303
|
+
capturedAt: number;
|
|
1304
|
+
selection?: A11ySelection | A11ySelectionOptions | null;
|
|
1305
|
+
/** Extra fields are allowed. */
|
|
1306
|
+
[key: string]: unknown;
|
|
1307
|
+
}
|
|
1308
|
+
/**
|
|
1309
|
+
* Client accessibility snapshot sent in a `ui-snapshot` message.
|
|
1310
|
+
*
|
|
1311
|
+
* Mirrors the client-side `A11ySnapshot` wire shape. Extra fields are allowed
|
|
1312
|
+
* so clients can add compatible metadata over time.
|
|
1313
|
+
*
|
|
1314
|
+
* - `root`: root accessibility node.
|
|
1315
|
+
* - `capturedAt`: client-side epoch milliseconds when captured.
|
|
1316
|
+
* - `selection`: optional current text selection.
|
|
1317
|
+
*/
|
|
1318
|
+
export declare class A11ySnapshot extends BaseModel {
|
|
1319
|
+
static readonly extra: "allow";
|
|
1320
|
+
root: A11yNode;
|
|
1321
|
+
capturedAt: number;
|
|
1322
|
+
selection: A11ySelection | null;
|
|
1323
|
+
static readonly fields: FieldSpecs;
|
|
1324
|
+
constructor(options: A11ySnapshotOptions);
|
|
1325
|
+
}
|
|
1326
|
+
export interface UISnapshotDataOptions {
|
|
1327
|
+
tree: A11ySnapshot | A11ySnapshotOptions;
|
|
1328
|
+
}
|
|
1329
|
+
/**
|
|
1330
|
+
* Inner `data` for a `ui-snapshot` message.
|
|
1331
|
+
*
|
|
1332
|
+
* The accessibility snapshot tree mirrors the client-side `A11ySnapshot` wire
|
|
1333
|
+
* shape and is kept forward-compatible by allowing extra fields on the
|
|
1334
|
+
* snapshot models.
|
|
1335
|
+
*
|
|
1336
|
+
* - `tree`: the serialized accessibility tree.
|
|
1337
|
+
*/
|
|
1338
|
+
export declare class UISnapshotData extends BaseModel {
|
|
1339
|
+
tree: A11ySnapshot;
|
|
1340
|
+
static readonly fields: FieldSpecs;
|
|
1341
|
+
constructor(options: UISnapshotDataOptions);
|
|
1342
|
+
}
|
|
1343
|
+
export interface UICancelJobGroupDataOptions {
|
|
1344
|
+
jobId: string;
|
|
1345
|
+
reason?: string | null;
|
|
1346
|
+
}
|
|
1347
|
+
/**
|
|
1348
|
+
* Inner `data` for a `ui-cancel-job-group` message.
|
|
1349
|
+
*
|
|
1350
|
+
* - `jobId`: the job group id the client wants cancelled.
|
|
1351
|
+
* - `reason`: optional human-readable reason.
|
|
1352
|
+
*/
|
|
1353
|
+
export declare class UICancelJobGroupData extends BaseModel {
|
|
1354
|
+
jobId: string;
|
|
1355
|
+
reason: string | null;
|
|
1356
|
+
static readonly fields: FieldSpecs;
|
|
1357
|
+
constructor(options: UICancelJobGroupDataOptions);
|
|
1358
|
+
}
|
|
1359
|
+
export interface UIJobGroupStartedDataOptions {
|
|
1360
|
+
kind?: "group_started";
|
|
1361
|
+
jobId: string;
|
|
1362
|
+
workers?: string[] | null;
|
|
1363
|
+
label?: string | null;
|
|
1364
|
+
cancellable?: boolean;
|
|
1365
|
+
at?: number;
|
|
1366
|
+
}
|
|
1367
|
+
/**
|
|
1368
|
+
* `data` for a `ui-job-group` envelope with kind `group_started`.
|
|
1369
|
+
*
|
|
1370
|
+
* - `kind`: always `"group_started"`.
|
|
1371
|
+
* - `jobId`: shared job-group identifier for the group.
|
|
1372
|
+
* - `workers`: names of the workers the work was dispatched to.
|
|
1373
|
+
* - `label`: optional human-readable label for the group.
|
|
1374
|
+
* - `cancellable`: whether the client may request cancellation.
|
|
1375
|
+
* - `at`: epoch milliseconds when the group started.
|
|
1376
|
+
*/
|
|
1377
|
+
export declare class UIJobGroupStartedData extends BaseModel {
|
|
1378
|
+
kind: "group_started";
|
|
1379
|
+
jobId: string;
|
|
1380
|
+
workers: string[] | null;
|
|
1381
|
+
label: string | null;
|
|
1382
|
+
cancellable: boolean;
|
|
1383
|
+
at: number;
|
|
1384
|
+
static readonly fields: FieldSpecs;
|
|
1385
|
+
constructor(options: UIJobGroupStartedDataOptions);
|
|
1386
|
+
}
|
|
1387
|
+
export interface UIJobUpdateDataOptions {
|
|
1388
|
+
kind?: "job_update";
|
|
1389
|
+
jobId: string;
|
|
1390
|
+
workerName: string;
|
|
1391
|
+
data?: unknown;
|
|
1392
|
+
at?: number;
|
|
1393
|
+
}
|
|
1394
|
+
/**
|
|
1395
|
+
* `data` for a `ui-job-group` envelope with kind `job_update`.
|
|
1396
|
+
*
|
|
1397
|
+
* - `kind`: always `"job_update"`.
|
|
1398
|
+
* - `jobId`: the shared job-group identifier.
|
|
1399
|
+
* - `workerName`: the worker that produced the update.
|
|
1400
|
+
* - `data`: the worker's update payload, forwarded verbatim.
|
|
1401
|
+
* - `at`: epoch milliseconds when the update was emitted.
|
|
1402
|
+
*/
|
|
1403
|
+
export declare class UIJobUpdateData extends BaseModel {
|
|
1404
|
+
kind: "job_update";
|
|
1405
|
+
jobId: string;
|
|
1406
|
+
workerName: string;
|
|
1407
|
+
data: unknown;
|
|
1408
|
+
at: number;
|
|
1409
|
+
static readonly fields: FieldSpecs;
|
|
1410
|
+
constructor(options: UIJobUpdateDataOptions);
|
|
1411
|
+
}
|
|
1412
|
+
export interface UIJobCompletedDataOptions {
|
|
1413
|
+
kind?: "job_completed";
|
|
1414
|
+
jobId: string;
|
|
1415
|
+
workerName: string;
|
|
1416
|
+
status: string;
|
|
1417
|
+
response?: unknown;
|
|
1418
|
+
at?: number;
|
|
1419
|
+
}
|
|
1420
|
+
/**
|
|
1421
|
+
* `data` for a `ui-job-group` envelope with kind `job_completed`.
|
|
1422
|
+
*
|
|
1423
|
+
* - `kind`: always `"job_completed"`.
|
|
1424
|
+
* - `jobId`: the shared job-group identifier.
|
|
1425
|
+
* - `workerName`: the worker that produced the response.
|
|
1426
|
+
* - `status`: completion status string.
|
|
1427
|
+
* - `response`: the worker's response payload.
|
|
1428
|
+
* - `at`: epoch milliseconds when the response was received.
|
|
1429
|
+
*/
|
|
1430
|
+
export declare class UIJobCompletedData extends BaseModel {
|
|
1431
|
+
kind: "job_completed";
|
|
1432
|
+
jobId: string;
|
|
1433
|
+
workerName: string;
|
|
1434
|
+
status: string;
|
|
1435
|
+
response: unknown;
|
|
1436
|
+
at: number;
|
|
1437
|
+
static readonly fields: FieldSpecs;
|
|
1438
|
+
constructor(options: UIJobCompletedDataOptions);
|
|
1439
|
+
}
|
|
1440
|
+
export interface UIJobGroupCompletedDataOptions {
|
|
1441
|
+
kind?: "group_completed";
|
|
1442
|
+
jobId: string;
|
|
1443
|
+
at?: number;
|
|
1444
|
+
}
|
|
1445
|
+
/**
|
|
1446
|
+
* `data` for a `ui-job-group` envelope with kind `group_completed`.
|
|
1447
|
+
*
|
|
1448
|
+
* - `kind`: always `"group_completed"`.
|
|
1449
|
+
* - `jobId`: the shared job-group identifier.
|
|
1450
|
+
* - `at`: epoch milliseconds when the group completed.
|
|
1451
|
+
*/
|
|
1452
|
+
export declare class UIJobGroupCompletedData extends BaseModel {
|
|
1453
|
+
kind: "group_completed";
|
|
1454
|
+
jobId: string;
|
|
1455
|
+
at: number;
|
|
1456
|
+
static readonly fields: FieldSpecs;
|
|
1457
|
+
constructor(options: UIJobGroupCompletedDataOptions);
|
|
1458
|
+
}
|
|
1459
|
+
/**
|
|
1460
|
+
* Discriminated union over the four job-group lifecycle data shapes, keyed
|
|
1461
|
+
* by the `kind` field.
|
|
1462
|
+
*/
|
|
1463
|
+
export type UIJobGroupData = UIJobGroupStartedData | UIJobUpdateData | UIJobCompletedData | UIJobGroupCompletedData;
|
|
1464
|
+
export interface UIEventMessageOptions {
|
|
1465
|
+
label?: MessageLiteral;
|
|
1466
|
+
type?: "ui-event";
|
|
1467
|
+
id: string;
|
|
1468
|
+
data: UIEventData | UIEventDataOptions;
|
|
1469
|
+
}
|
|
1470
|
+
/** RTVI `ui-event` message (client -> server). */
|
|
1471
|
+
export declare class UIEventMessage extends BaseModel {
|
|
1472
|
+
label: MessageLiteral;
|
|
1473
|
+
type: "ui-event";
|
|
1474
|
+
id: string;
|
|
1475
|
+
data: UIEventData;
|
|
1476
|
+
static readonly fields: FieldSpecs;
|
|
1477
|
+
constructor(options: UIEventMessageOptions);
|
|
1478
|
+
}
|
|
1479
|
+
export interface UICommandMessageOptions {
|
|
1480
|
+
label?: MessageLiteral;
|
|
1481
|
+
type?: "ui-command";
|
|
1482
|
+
data: UICommandData | UICommandDataOptions;
|
|
1483
|
+
}
|
|
1484
|
+
/** RTVI `ui-command` message (server -> client). */
|
|
1485
|
+
export declare class UICommandMessage extends BaseModel {
|
|
1486
|
+
label: MessageLiteral;
|
|
1487
|
+
type: "ui-command";
|
|
1488
|
+
data: UICommandData;
|
|
1489
|
+
static readonly fields: FieldSpecs;
|
|
1490
|
+
constructor(options: UICommandMessageOptions);
|
|
1491
|
+
}
|
|
1492
|
+
export interface UISnapshotMessageOptions {
|
|
1493
|
+
label?: MessageLiteral;
|
|
1494
|
+
type?: "ui-snapshot";
|
|
1495
|
+
id: string;
|
|
1496
|
+
data: UISnapshotData | UISnapshotDataOptions;
|
|
1497
|
+
}
|
|
1498
|
+
/** RTVI `ui-snapshot` message (client -> server). */
|
|
1499
|
+
export declare class UISnapshotMessage extends BaseModel {
|
|
1500
|
+
label: MessageLiteral;
|
|
1501
|
+
type: "ui-snapshot";
|
|
1502
|
+
id: string;
|
|
1503
|
+
data: UISnapshotData;
|
|
1504
|
+
static readonly fields: FieldSpecs;
|
|
1505
|
+
constructor(options: UISnapshotMessageOptions);
|
|
1506
|
+
}
|
|
1507
|
+
export interface UICancelJobGroupMessageOptions {
|
|
1508
|
+
label?: MessageLiteral;
|
|
1509
|
+
type?: "ui-cancel-job-group";
|
|
1510
|
+
id: string;
|
|
1511
|
+
data: UICancelJobGroupData | UICancelJobGroupDataOptions;
|
|
1512
|
+
}
|
|
1513
|
+
/** RTVI `ui-cancel-job-group` message (client -> server). */
|
|
1514
|
+
export declare class UICancelJobGroupMessage extends BaseModel {
|
|
1515
|
+
label: MessageLiteral;
|
|
1516
|
+
type: "ui-cancel-job-group";
|
|
1517
|
+
id: string;
|
|
1518
|
+
data: UICancelJobGroupData;
|
|
1519
|
+
static readonly fields: FieldSpecs;
|
|
1520
|
+
constructor(options: UICancelJobGroupMessageOptions);
|
|
1521
|
+
}
|
|
1522
|
+
export interface UIJobGroupMessageOptions {
|
|
1523
|
+
label?: MessageLiteral;
|
|
1524
|
+
type?: "ui-job-group";
|
|
1525
|
+
data: UIJobGroupData;
|
|
1526
|
+
}
|
|
1527
|
+
/**
|
|
1528
|
+
* RTVI `ui-job-group` message (server -> client).
|
|
1529
|
+
*
|
|
1530
|
+
* The `data` field is one of the four job-group lifecycle shapes,
|
|
1531
|
+
* discriminated by the `kind` field.
|
|
1532
|
+
*/
|
|
1533
|
+
export declare class UIJobGroupMessage extends BaseModel {
|
|
1534
|
+
label: MessageLiteral;
|
|
1535
|
+
type: "ui-job-group";
|
|
1536
|
+
data: UIJobGroupData;
|
|
1537
|
+
static readonly fields: FieldSpecs;
|
|
1538
|
+
constructor(options: UIJobGroupMessageOptions);
|
|
1539
|
+
}
|
|
1540
|
+
export interface ToastOptions {
|
|
1541
|
+
title: string;
|
|
1542
|
+
subtitle?: string | null;
|
|
1543
|
+
description?: string | null;
|
|
1544
|
+
imageUrl?: string | null;
|
|
1545
|
+
durationMs?: number | null;
|
|
1546
|
+
}
|
|
1547
|
+
/**
|
|
1548
|
+
* A transient notification surface shown on the client.
|
|
1549
|
+
*
|
|
1550
|
+
* - `title`: required headline.
|
|
1551
|
+
* - `subtitle`: optional second line beneath the title.
|
|
1552
|
+
* - `description`: optional body text.
|
|
1553
|
+
* - `imageUrl`: optional leading image.
|
|
1554
|
+
* - `durationMs`: optional dismiss timer. Client default applies when null.
|
|
1555
|
+
*/
|
|
1556
|
+
export declare class Toast extends BaseModel {
|
|
1557
|
+
title: string;
|
|
1558
|
+
subtitle: string | null;
|
|
1559
|
+
description: string | null;
|
|
1560
|
+
imageUrl: string | null;
|
|
1561
|
+
durationMs: number | null;
|
|
1562
|
+
static readonly fields: FieldSpecs;
|
|
1563
|
+
constructor(options: ToastOptions);
|
|
1564
|
+
}
|
|
1565
|
+
export interface NavigateOptions {
|
|
1566
|
+
view: string;
|
|
1567
|
+
params?: Record<string, unknown> | null;
|
|
1568
|
+
}
|
|
1569
|
+
/**
|
|
1570
|
+
* Client-side navigation to a named view.
|
|
1571
|
+
*
|
|
1572
|
+
* - `view`: app-defined view name (route, screen id, tab key, etc.).
|
|
1573
|
+
* - `params`: optional view-specific parameters.
|
|
1574
|
+
*/
|
|
1575
|
+
export declare class Navigate extends BaseModel {
|
|
1576
|
+
view: string;
|
|
1577
|
+
params: Record<string, unknown> | null;
|
|
1578
|
+
static readonly fields: FieldSpecs;
|
|
1579
|
+
constructor(options: NavigateOptions);
|
|
1580
|
+
}
|
|
1581
|
+
export interface ScrollToOptions {
|
|
1582
|
+
ref?: string | null;
|
|
1583
|
+
targetId?: string | null;
|
|
1584
|
+
behavior?: string | null;
|
|
1585
|
+
}
|
|
1586
|
+
/**
|
|
1587
|
+
* Scroll a target element into view.
|
|
1588
|
+
*
|
|
1589
|
+
* The client resolves the target by `ref` first (a snapshot ref like `"e42"`
|
|
1590
|
+
* assigned by the a11y walker), then falls back to `targetId`
|
|
1591
|
+
* (`document.getElementById`). Supply whichever you have; `ref` is the normal
|
|
1592
|
+
* choice when acting on a node from `<ui_state>`.
|
|
1593
|
+
*
|
|
1594
|
+
* - `ref`: snapshot ref from `<ui_state>`.
|
|
1595
|
+
* - `targetId`: element id registered on the client.
|
|
1596
|
+
* - `behavior`: optional scroll behavior hint. Typical values: `"smooth"` or
|
|
1597
|
+
* `"instant"`. Clients may ignore.
|
|
1598
|
+
*/
|
|
1599
|
+
export declare class ScrollTo extends BaseModel {
|
|
1600
|
+
ref: string | null;
|
|
1601
|
+
targetId: string | null;
|
|
1602
|
+
behavior: string | null;
|
|
1603
|
+
static readonly fields: FieldSpecs;
|
|
1604
|
+
constructor(options?: ScrollToOptions);
|
|
1605
|
+
}
|
|
1606
|
+
export interface HighlightOptions {
|
|
1607
|
+
ref?: string | null;
|
|
1608
|
+
targetId?: string | null;
|
|
1609
|
+
durationMs?: number | null;
|
|
1610
|
+
}
|
|
1611
|
+
/**
|
|
1612
|
+
* Briefly emphasize a target element (flash, glow, pulse).
|
|
1613
|
+
*
|
|
1614
|
+
* - `ref`: snapshot ref from `<ui_state>`.
|
|
1615
|
+
* - `targetId`: element id registered on the client.
|
|
1616
|
+
* - `durationMs`: optional highlight duration. Client default applies when
|
|
1617
|
+
* null.
|
|
1618
|
+
*/
|
|
1619
|
+
export declare class Highlight extends BaseModel {
|
|
1620
|
+
ref: string | null;
|
|
1621
|
+
targetId: string | null;
|
|
1622
|
+
durationMs: number | null;
|
|
1623
|
+
static readonly fields: FieldSpecs;
|
|
1624
|
+
constructor(options?: HighlightOptions);
|
|
1625
|
+
}
|
|
1626
|
+
export interface FocusOptions {
|
|
1627
|
+
ref?: string | null;
|
|
1628
|
+
targetId?: string | null;
|
|
1629
|
+
}
|
|
1630
|
+
/**
|
|
1631
|
+
* Move input focus to a target element.
|
|
1632
|
+
*
|
|
1633
|
+
* - `ref`: snapshot ref from `<ui_state>`.
|
|
1634
|
+
* - `targetId`: element id registered on the client.
|
|
1635
|
+
*/
|
|
1636
|
+
export declare class Focus extends BaseModel {
|
|
1637
|
+
ref: string | null;
|
|
1638
|
+
targetId: string | null;
|
|
1639
|
+
static readonly fields: FieldSpecs;
|
|
1640
|
+
constructor(options?: FocusOptions);
|
|
1641
|
+
}
|
|
1642
|
+
export interface ClickOptions {
|
|
1643
|
+
ref?: string | null;
|
|
1644
|
+
targetId?: string | null;
|
|
1645
|
+
}
|
|
1646
|
+
/**
|
|
1647
|
+
* Click an element on the client.
|
|
1648
|
+
*
|
|
1649
|
+
* Closes the form-fill loop for non-text inputs (checkboxes, radios) and
|
|
1650
|
+
* exposes the rest of the action vocabulary (submit buttons, links,
|
|
1651
|
+
* app-specific clickable nodes). The standard handler silently no-ops on
|
|
1652
|
+
* `disabled` targets so the worker can't bypass UI affordances the user is
|
|
1653
|
+
* meant to control.
|
|
1654
|
+
*
|
|
1655
|
+
* For native `<select>`, prefer `SetInputValue` (clicking options doesn't
|
|
1656
|
+
* reliably change the selection); for custom comboboxes (ARIA listbox +
|
|
1657
|
+
* popup), apps wire their own command matching the library's interaction
|
|
1658
|
+
* model.
|
|
1659
|
+
*
|
|
1660
|
+
* - `ref`: snapshot ref from `<ui_state>`.
|
|
1661
|
+
* - `targetId`: element id registered on the client. Used as a fallback when
|
|
1662
|
+
* `ref` is not set or has gone stale.
|
|
1663
|
+
*/
|
|
1664
|
+
export declare class Click extends BaseModel {
|
|
1665
|
+
ref: string | null;
|
|
1666
|
+
targetId: string | null;
|
|
1667
|
+
static readonly fields: FieldSpecs;
|
|
1668
|
+
constructor(options?: ClickOptions);
|
|
1669
|
+
}
|
|
1670
|
+
export interface SetInputValueOptions {
|
|
1671
|
+
value?: string;
|
|
1672
|
+
ref?: string | null;
|
|
1673
|
+
targetId?: string | null;
|
|
1674
|
+
replace?: boolean;
|
|
1675
|
+
}
|
|
1676
|
+
/**
|
|
1677
|
+
* Write a value into a text input or textarea on the client.
|
|
1678
|
+
*
|
|
1679
|
+
* Use this for form-filling: the worker has decided what should go into a
|
|
1680
|
+
* field (clarifying answer, tax form entry, etc.) and asks the client to
|
|
1681
|
+
* populate it. With `replace: true` (the default), the existing value is
|
|
1682
|
+
* overwritten; with `replace: false` the value is appended.
|
|
1683
|
+
*
|
|
1684
|
+
* The standard handler silently no-ops on `disabled`, `readonly`, and
|
|
1685
|
+
* `<input type="hidden">` targets so the worker can't write into fields the
|
|
1686
|
+
* user can't.
|
|
1687
|
+
*
|
|
1688
|
+
* - `value`: the text to write.
|
|
1689
|
+
* - `ref`: snapshot ref from `<ui_state>`. Typically the ref of an `<input>`
|
|
1690
|
+
* or `<textarea>`.
|
|
1691
|
+
* - `targetId`: element id registered on the client. Used as a fallback when
|
|
1692
|
+
* `ref` is not set or has gone stale.
|
|
1693
|
+
* - `replace`: when true (the default), overwrite the current value. When
|
|
1694
|
+
* false, append to it.
|
|
1695
|
+
*/
|
|
1696
|
+
export declare class SetInputValue extends BaseModel {
|
|
1697
|
+
value: string;
|
|
1698
|
+
ref: string | null;
|
|
1699
|
+
targetId: string | null;
|
|
1700
|
+
replace: boolean;
|
|
1701
|
+
static readonly fields: FieldSpecs;
|
|
1702
|
+
constructor(options?: SetInputValueOptions);
|
|
1703
|
+
}
|
|
1704
|
+
export interface SelectTextOptions {
|
|
1705
|
+
ref?: string | null;
|
|
1706
|
+
targetId?: string | null;
|
|
1707
|
+
startOffset?: number | null;
|
|
1708
|
+
endOffset?: number | null;
|
|
1709
|
+
}
|
|
1710
|
+
/**
|
|
1711
|
+
* Select text on the page so the user can see what the worker means.
|
|
1712
|
+
*
|
|
1713
|
+
* Mirror of the `selection` field surfaced in the snapshot. Use this to point
|
|
1714
|
+
* the user's attention at a specific paragraph or range after the worker has
|
|
1715
|
+
* decided what it's referring to.
|
|
1716
|
+
*
|
|
1717
|
+
* With `startOffset` and `endOffset` omitted, the entire target's text
|
|
1718
|
+
* content is selected (`Range.selectNodeContents` for document elements;
|
|
1719
|
+
* `el.select()` for `<input>` / `<textarea>`).
|
|
1720
|
+
*
|
|
1721
|
+
* - `ref`: snapshot ref from `<ui_state>`. Typically the ref of a paragraph
|
|
1722
|
+
* or input element.
|
|
1723
|
+
* - `targetId`: element id registered on the client. Used as a fallback when
|
|
1724
|
+
* `ref` is not set or has gone stale.
|
|
1725
|
+
* - `startOffset`: character offset within the target's text where the
|
|
1726
|
+
* selection should start. For `<input>` and `<textarea>` this is the value
|
|
1727
|
+
* offset; for document elements it is computed against the concatenation of
|
|
1728
|
+
* descendant text nodes in document order.
|
|
1729
|
+
* - `endOffset`: end character offset, exclusive. Same coordinate system as
|
|
1730
|
+
* `startOffset`.
|
|
1731
|
+
*/
|
|
1732
|
+
export declare class SelectText extends BaseModel {
|
|
1733
|
+
ref: string | null;
|
|
1734
|
+
targetId: string | null;
|
|
1735
|
+
startOffset: number | null;
|
|
1736
|
+
endOffset: number | null;
|
|
1737
|
+
static readonly fields: FieldSpecs;
|
|
1738
|
+
constructor(options?: SelectTextOptions);
|
|
1739
|
+
}
|
|
1740
|
+
export {};
|
|
1741
|
+
//# sourceMappingURL=models.d.ts.map
|