@runanywhere/core 0.16.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/RunAnywhereCore.podspec +130 -0
- package/android/CMakeLists.txt +92 -0
- package/android/build.gradle +321 -0
- package/android/consumer-rules.pro +5 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/cpp/cpp-adapter.cpp +271 -0
- package/android/src/main/include/rac/backends/rac_llm_llamacpp.h +218 -0
- package/android/src/main/include/rac/backends/rac_stt_onnx.h +99 -0
- package/android/src/main/include/rac/backends/rac_stt_whispercpp.h +153 -0
- package/android/src/main/include/rac/backends/rac_tts_onnx.h +71 -0
- package/android/src/main/include/rac/backends/rac_vad_onnx.h +84 -0
- package/android/src/main/include/rac/core/capabilities/rac_lifecycle.h +290 -0
- package/android/src/main/include/rac/core/rac_analytics_events.h +610 -0
- package/android/src/main/include/rac/core/rac_audio_utils.h +88 -0
- package/android/src/main/include/rac/core/rac_component_types.h +160 -0
- package/android/src/main/include/rac/core/rac_core.h +331 -0
- package/android/src/main/include/rac/core/rac_error.h +469 -0
- package/android/src/main/include/rac/core/rac_events.h +334 -0
- package/android/src/main/include/rac/core/rac_logger.h +416 -0
- package/android/src/main/include/rac/core/rac_platform_adapter.h +340 -0
- package/android/src/main/include/rac/core/rac_sdk_state.h +292 -0
- package/android/src/main/include/rac/core/rac_structured_error.h +594 -0
- package/android/src/main/include/rac/core/rac_types.h +264 -0
- package/android/src/main/include/rac/features/llm/rac_llm.h +17 -0
- package/android/src/main/include/rac/features/llm/rac_llm_analytics.h +188 -0
- package/android/src/main/include/rac/features/llm/rac_llm_component.h +228 -0
- package/android/src/main/include/rac/features/llm/rac_llm_events.h +215 -0
- package/android/src/main/include/rac/features/llm/rac_llm_metrics.h +402 -0
- package/android/src/main/include/rac/features/llm/rac_llm_service.h +163 -0
- package/android/src/main/include/rac/features/llm/rac_llm_structured_output.h +141 -0
- package/android/src/main/include/rac/features/llm/rac_llm_types.h +384 -0
- package/android/src/main/include/rac/features/platform/rac_llm_platform.h +204 -0
- package/android/src/main/include/rac/features/platform/rac_tts_platform.h +197 -0
- package/android/src/main/include/rac/features/stt/rac_stt.h +17 -0
- package/android/src/main/include/rac/features/stt/rac_stt_analytics.h +204 -0
- package/android/src/main/include/rac/features/stt/rac_stt_component.h +162 -0
- package/android/src/main/include/rac/features/stt/rac_stt_events.h +62 -0
- package/android/src/main/include/rac/features/stt/rac_stt_service.h +154 -0
- package/android/src/main/include/rac/features/stt/rac_stt_types.h +389 -0
- package/android/src/main/include/rac/features/tts/rac_tts.h +17 -0
- package/android/src/main/include/rac/features/tts/rac_tts_analytics.h +181 -0
- package/android/src/main/include/rac/features/tts/rac_tts_component.h +158 -0
- package/android/src/main/include/rac/features/tts/rac_tts_events.h +54 -0
- package/android/src/main/include/rac/features/tts/rac_tts_service.h +162 -0
- package/android/src/main/include/rac/features/tts/rac_tts_types.h +374 -0
- package/android/src/main/include/rac/features/vad/rac_vad.h +17 -0
- package/android/src/main/include/rac/features/vad/rac_vad_analytics.h +236 -0
- package/android/src/main/include/rac/features/vad/rac_vad_component.h +185 -0
- package/android/src/main/include/rac/features/vad/rac_vad_energy.h +443 -0
- package/android/src/main/include/rac/features/vad/rac_vad_events.h +76 -0
- package/android/src/main/include/rac/features/vad/rac_vad_service.h +167 -0
- package/android/src/main/include/rac/features/vad/rac_vad_types.h +244 -0
- package/android/src/main/include/rac/features/voice_agent/rac_voice_agent.h +612 -0
- package/android/src/main/include/rac/infrastructure/device/rac_device_manager.h +176 -0
- package/android/src/main/include/rac/infrastructure/download/rac_download.h +418 -0
- package/android/src/main/include/rac/infrastructure/events/rac_events.h +177 -0
- package/android/src/main/include/rac/infrastructure/model_management/rac_model_assignment.h +169 -0
- package/android/src/main/include/rac/infrastructure/model_management/rac_model_paths.h +258 -0
- package/android/src/main/include/rac/infrastructure/model_management/rac_model_registry.h +357 -0
- package/android/src/main/include/rac/infrastructure/model_management/rac_model_strategy.h +374 -0
- package/android/src/main/include/rac/infrastructure/model_management/rac_model_types.h +613 -0
- package/android/src/main/include/rac/infrastructure/network/rac_api_types.h +335 -0
- package/android/src/main/include/rac/infrastructure/network/rac_auth_manager.h +252 -0
- package/android/src/main/include/rac/infrastructure/network/rac_dev_config.h +85 -0
- package/android/src/main/include/rac/infrastructure/network/rac_endpoints.h +102 -0
- package/android/src/main/include/rac/infrastructure/network/rac_environment.h +220 -0
- package/android/src/main/include/rac/infrastructure/network/rac_http_client.h +233 -0
- package/android/src/main/include/rac/infrastructure/storage/rac_storage_analyzer.h +286 -0
- package/android/src/main/include/rac/infrastructure/telemetry/rac_telemetry_manager.h +206 -0
- package/android/src/main/include/rac/infrastructure/telemetry/rac_telemetry_types.h +234 -0
- package/android/src/main/java/com/margelo/nitro/runanywhere/ArchiveUtility.kt +308 -0
- package/android/src/main/java/com/margelo/nitro/runanywhere/HybridRunAnywhereDeviceInfo.kt +229 -0
- package/android/src/main/java/com/margelo/nitro/runanywhere/PlatformAdapterBridge.kt +392 -0
- package/android/src/main/java/com/margelo/nitro/runanywhere/RunAnywhereCorePackage.kt +28 -0
- package/android/src/main/java/com/margelo/nitro/runanywhere/SDKLogger.kt +357 -0
- package/android/src/main/java/com/margelo/nitro/runanywhere/SecureStorageManager.kt +147 -0
- package/android/src/main/jniLibs/arm64-v8a/libc++_shared.so +0 -0
- package/android/src/main/jniLibs/arm64-v8a/libomp.so +0 -0
- package/android/src/main/jniLibs/arm64-v8a/librac_commons.so +0 -0
- package/android/src/main/jniLibs/arm64-v8a/librunanywhere_jni.so +0 -0
- package/cpp/HybridRunAnywhereCore.cpp +2505 -0
- package/cpp/HybridRunAnywhereCore.hpp +271 -0
- package/cpp/bridges/AuthBridge.cpp +209 -0
- package/cpp/bridges/AuthBridge.hpp +157 -0
- package/cpp/bridges/DeviceBridge.cpp +257 -0
- package/cpp/bridges/DeviceBridge.hpp +155 -0
- package/cpp/bridges/DownloadBridge.cpp +299 -0
- package/cpp/bridges/DownloadBridge.hpp +197 -0
- package/cpp/bridges/EventBridge.cpp +125 -0
- package/cpp/bridges/EventBridge.hpp +139 -0
- package/cpp/bridges/HTTPBridge.cpp +96 -0
- package/cpp/bridges/HTTPBridge.hpp +144 -0
- package/cpp/bridges/InitBridge.cpp +1273 -0
- package/cpp/bridges/InitBridge.hpp +306 -0
- package/cpp/bridges/ModelRegistryBridge.cpp +394 -0
- package/cpp/bridges/ModelRegistryBridge.hpp +177 -0
- package/cpp/bridges/StorageBridge.cpp +269 -0
- package/cpp/bridges/StorageBridge.hpp +172 -0
- package/cpp/bridges/TelemetryBridge.cpp +352 -0
- package/cpp/bridges/TelemetryBridge.hpp +126 -0
- package/ios/.testlocal +0 -0
- package/ios/ArchiveUtility.swift +526 -0
- package/ios/ArchiveUtilityBridge.m +52 -0
- package/ios/AudioDecoder.h +38 -0
- package/ios/AudioDecoder.m +162 -0
- package/ios/Binaries/RACommons.xcframework/Info.plist +44 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/RACommons.h +67 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_analytics_events.h +610 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_api_types.h +335 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_audio_utils.h +88 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_auth_manager.h +252 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_component_types.h +160 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_core.h +331 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_dev_config.h +85 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_device_manager.h +176 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_download.h +418 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_endpoints.h +102 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_environment.h +220 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_error.h +469 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_events.h +177 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_http_client.h +233 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_lifecycle.h +290 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm.h +17 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_analytics.h +188 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_component.h +228 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_events.h +215 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_llamacpp.h +218 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_metrics.h +402 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_platform.h +204 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_service.h +163 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_structured_output.h +141 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_types.h +384 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_logger.h +416 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_assignment.h +169 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_paths.h +258 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_registry.h +357 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_strategy.h +374 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_types.h +613 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_platform_adapter.h +340 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_sdk_state.h +292 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_storage_analyzer.h +286 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_structured_error.h +594 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt.h +17 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_analytics.h +204 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_component.h +162 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_events.h +62 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_onnx.h +99 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_service.h +154 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_types.h +389 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_whispercpp.h +153 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_telemetry_manager.h +206 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_telemetry_types.h +234 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts.h +17 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_analytics.h +181 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_component.h +158 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_events.h +54 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_onnx.h +71 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_platform.h +197 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_service.h +162 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_types.h +374 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_types.h +264 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad.h +17 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_analytics.h +236 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_component.h +185 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_energy.h +443 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_events.h +76 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_onnx.h +84 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_service.h +167 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_types.h +244 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_voice_agent.h +612 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Info.plist +11 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Modules/module.modulemap +5 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/RACommons +0 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/RACommons.h +67 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_analytics_events.h +610 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_api_types.h +335 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_audio_utils.h +88 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_auth_manager.h +252 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_component_types.h +160 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_core.h +331 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_dev_config.h +85 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_device_manager.h +176 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_download.h +418 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_endpoints.h +102 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_environment.h +220 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_error.h +469 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_events.h +177 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_http_client.h +233 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_lifecycle.h +290 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm.h +17 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_analytics.h +188 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_component.h +228 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_events.h +215 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_llamacpp.h +218 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_metrics.h +402 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_platform.h +204 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_service.h +163 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_structured_output.h +141 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_types.h +384 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_logger.h +416 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_assignment.h +169 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_paths.h +258 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_registry.h +357 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_strategy.h +374 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_types.h +613 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_platform_adapter.h +340 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_sdk_state.h +292 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_storage_analyzer.h +286 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_structured_error.h +594 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt.h +17 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_analytics.h +204 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_component.h +162 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_events.h +62 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_onnx.h +99 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_service.h +154 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_types.h +389 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_whispercpp.h +153 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_telemetry_manager.h +206 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_telemetry_types.h +234 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts.h +17 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_analytics.h +181 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_component.h +158 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_events.h +54 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_onnx.h +71 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_platform.h +197 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_service.h +162 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_types.h +374 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_types.h +264 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad.h +17 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_analytics.h +236 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_component.h +185 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_energy.h +443 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_events.h +76 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_onnx.h +84 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_service.h +167 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_types.h +244 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_voice_agent.h +612 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Info.plist +11 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Modules/module.modulemap +5 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/RACommons +0 -0
- package/ios/HybridRunAnywhereDeviceInfo.swift +214 -0
- package/ios/KeychainManager.swift +116 -0
- package/ios/PlatformAdapter.swift +100 -0
- package/ios/PlatformAdapterBridge.h +152 -0
- package/ios/PlatformAdapterBridge.m +570 -0
- package/ios/RNSDKLoggerBridge.h +41 -0
- package/ios/RNSDKLoggerBridge.m +66 -0
- package/ios/SDKLogger.swift +329 -0
- package/nitro.json +20 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/c++/JHybridRunAnywhereDeviceInfoSpec.cpp +257 -0
- package/nitrogen/generated/android/c++/JHybridRunAnywhereDeviceInfoSpec.hpp +77 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/runanywhere/HybridRunAnywhereDeviceInfoSpec.kt +106 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/runanywhere/runanywherecoreOnLoad.kt +35 -0
- package/nitrogen/generated/android/runanywherecore+autolinking.cmake +82 -0
- package/nitrogen/generated/android/runanywherecore+autolinking.gradle +27 -0
- package/nitrogen/generated/android/runanywherecoreOnLoad.cpp +54 -0
- package/nitrogen/generated/android/runanywherecoreOnLoad.hpp +25 -0
- package/nitrogen/generated/ios/RunAnywhereCore+autolinking.rb +60 -0
- package/nitrogen/generated/ios/RunAnywhereCore-Swift-Cxx-Bridge.cpp +65 -0
- package/nitrogen/generated/ios/RunAnywhereCore-Swift-Cxx-Bridge.hpp +197 -0
- package/nitrogen/generated/ios/RunAnywhereCore-Swift-Cxx-Umbrella.hpp +45 -0
- package/nitrogen/generated/ios/RunAnywhereCoreAutolinking.mm +43 -0
- package/nitrogen/generated/ios/RunAnywhereCoreAutolinking.swift +25 -0
- package/nitrogen/generated/ios/c++/HybridRunAnywhereDeviceInfoSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridRunAnywhereDeviceInfoSpecSwift.hpp +173 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_double.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridRunAnywhereDeviceInfoSpec.swift +68 -0
- package/nitrogen/generated/ios/swift/HybridRunAnywhereDeviceInfoSpec_cxx.swift +366 -0
- package/nitrogen/generated/shared/c++/HybridRunAnywhereCoreSpec.cpp +92 -0
- package/nitrogen/generated/shared/c++/HybridRunAnywhereCoreSpec.hpp +138 -0
- package/nitrogen/generated/shared/c++/HybridRunAnywhereDeviceInfoSpec.cpp +33 -0
- package/nitrogen/generated/shared/c++/HybridRunAnywhereDeviceInfoSpec.hpp +75 -0
- package/package.json +76 -0
- package/react-native.config.js +14 -0
- package/src/Features/VoiceSession/AudioCaptureManager.ts +286 -0
- package/src/Features/VoiceSession/AudioPlaybackManager.ts +300 -0
- package/src/Features/VoiceSession/VoiceSessionHandle.ts +530 -0
- package/src/Features/VoiceSession/index.ts +20 -0
- package/src/Features/index.ts +7 -0
- package/src/Foundation/Constants/SDKConstants.ts +47 -0
- package/src/Foundation/Constants/index.ts +8 -0
- package/src/Foundation/DependencyInjection/ServiceContainer.ts +154 -0
- package/src/Foundation/DependencyInjection/ServiceRegistry.ts +51 -0
- package/src/Foundation/DependencyInjection/index.ts +6 -0
- package/src/Foundation/ErrorTypes/ErrorCategory.ts +184 -0
- package/src/Foundation/ErrorTypes/ErrorCodes.ts +151 -0
- package/src/Foundation/ErrorTypes/ErrorContext.ts +201 -0
- package/src/Foundation/ErrorTypes/SDKError.ts +507 -0
- package/src/Foundation/ErrorTypes/index.ts +57 -0
- package/src/Foundation/Initialization/InitializationPhase.ts +85 -0
- package/src/Foundation/Initialization/InitializationState.ts +168 -0
- package/src/Foundation/Initialization/index.ts +26 -0
- package/src/Foundation/Logging/Destinations/NativeLogBridge.ts +147 -0
- package/src/Foundation/Logging/Destinations/SentryDestination.ts +209 -0
- package/src/Foundation/Logging/Logger/SDKLogger.ts +232 -0
- package/src/Foundation/Logging/Models/LogLevel.ts +36 -0
- package/src/Foundation/Logging/Models/LoggingConfiguration.ts +117 -0
- package/src/Foundation/Logging/Services/LoggingManager.ts +407 -0
- package/src/Foundation/Logging/index.ts +59 -0
- package/src/Foundation/Security/DeviceIdentity.ts +92 -0
- package/src/Foundation/Security/SecureStorageError.ts +132 -0
- package/src/Foundation/Security/SecureStorageKeys.ts +35 -0
- package/src/Foundation/Security/SecureStorageService.ts +449 -0
- package/src/Foundation/Security/index.ts +17 -0
- package/src/Foundation/index.ts +26 -0
- package/src/Infrastructure/Events/EventPublisher.ts +165 -0
- package/src/Infrastructure/Events/SDKEvent.ts +214 -0
- package/src/Infrastructure/Events/index.ts +15 -0
- package/src/Infrastructure/index.ts +9 -0
- package/src/Public/Events/EventBus.ts +488 -0
- package/src/Public/Events/index.ts +8 -0
- package/src/Public/Extensions/RunAnywhere+Logging.ts +51 -0
- package/src/Public/Extensions/RunAnywhere+Models.ts +392 -0
- package/src/Public/Extensions/RunAnywhere+STT.ts +424 -0
- package/src/Public/Extensions/RunAnywhere+Storage.ts +151 -0
- package/src/Public/Extensions/RunAnywhere+StructuredOutput.ts +316 -0
- package/src/Public/Extensions/RunAnywhere+TTS.ts +430 -0
- package/src/Public/Extensions/RunAnywhere+TextGeneration.ts +320 -0
- package/src/Public/Extensions/RunAnywhere+VAD.ts +359 -0
- package/src/Public/Extensions/RunAnywhere+VoiceAgent.ts +225 -0
- package/src/Public/Extensions/RunAnywhere+VoiceSession.ts +155 -0
- package/src/Public/Extensions/index.ts +126 -0
- package/src/Public/RunAnywhere.ts +695 -0
- package/src/index.ts +238 -0
- package/src/native/NativeRunAnywhereCore.ts +291 -0
- package/src/native/NativeRunAnywhereModule.ts +32 -0
- package/src/native/index.ts +21 -0
- package/src/services/DownloadService.ts +282 -0
- package/src/services/FileSystem.ts +810 -0
- package/src/services/ModelRegistry.ts +246 -0
- package/src/services/Network/APIEndpoints.ts +84 -0
- package/src/services/Network/HTTPService.ts +479 -0
- package/src/services/Network/NetworkConfiguration.ts +130 -0
- package/src/services/Network/TelemetryService.ts +318 -0
- package/src/services/Network/index.ts +29 -0
- package/src/services/SystemTTSService.ts +130 -0
- package/src/services/index.ts +66 -0
- package/src/specs/RunAnywhereCore.nitro.ts +627 -0
- package/src/specs/RunAnywhereDeviceInfo.nitro.ts +73 -0
- package/src/types/LLMTypes.ts +127 -0
- package/src/types/STTTypes.ts +124 -0
- package/src/types/StructuredOutputTypes.ts +156 -0
- package/src/types/TTSTypes.ts +126 -0
- package/src/types/VADTypes.ts +70 -0
- package/src/types/VoiceAgentTypes.ts +182 -0
- package/src/types/enums.ts +258 -0
- package/src/types/events.ts +337 -0
- package/src/types/external.d.ts +142 -0
- package/src/types/index.ts +146 -0
- package/src/types/models.ts +579 -0
|
@@ -0,0 +1,610 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file rac_events.h
|
|
3
|
+
* @brief RunAnywhere Commons - Cross-Platform Event System
|
|
4
|
+
*
|
|
5
|
+
* C++ is the canonical source of truth for all analytics events.
|
|
6
|
+
* Platform SDKs (Swift, Kotlin, Flutter) register callbacks to receive
|
|
7
|
+
* these events and forward them to their native event systems.
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* 1. Platform SDK registers callback via rac_events_set_callback()
|
|
11
|
+
* 2. C++ components emit events via rac_event_emit()
|
|
12
|
+
* 3. Platform SDK receives events in callback and converts to native events
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
#ifndef RAC_ANALYTICS_EVENTS_H
|
|
16
|
+
#define RAC_ANALYTICS_EVENTS_H
|
|
17
|
+
|
|
18
|
+
#include <RACommons/rac_types.h>
|
|
19
|
+
#include <RACommons/rac_model_types.h>
|
|
20
|
+
|
|
21
|
+
#ifdef __cplusplus
|
|
22
|
+
extern "C" {
|
|
23
|
+
#endif
|
|
24
|
+
|
|
25
|
+
// =============================================================================
|
|
26
|
+
// EVENT DESTINATION
|
|
27
|
+
// =============================================================================
|
|
28
|
+
|
|
29
|
+
// Include the event publishing header for destination types
|
|
30
|
+
#include <RACommons/rac_events.h>
|
|
31
|
+
|
|
32
|
+
// Alias the existing enum values for convenience in analytics context
|
|
33
|
+
#define RAC_EVENT_DEST_PUBLIC_ONLY RAC_EVENT_DESTINATION_PUBLIC_ONLY
|
|
34
|
+
#define RAC_EVENT_DEST_TELEMETRY_ONLY RAC_EVENT_DESTINATION_ANALYTICS_ONLY
|
|
35
|
+
#define RAC_EVENT_DEST_ALL RAC_EVENT_DESTINATION_ALL
|
|
36
|
+
|
|
37
|
+
// =============================================================================
|
|
38
|
+
// EVENT TYPES
|
|
39
|
+
// =============================================================================
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @brief Event type enumeration
|
|
43
|
+
*/
|
|
44
|
+
typedef enum rac_event_type {
|
|
45
|
+
// LLM Events (100-199)
|
|
46
|
+
RAC_EVENT_LLM_MODEL_LOAD_STARTED = 100,
|
|
47
|
+
RAC_EVENT_LLM_MODEL_LOAD_COMPLETED = 101,
|
|
48
|
+
RAC_EVENT_LLM_MODEL_LOAD_FAILED = 102,
|
|
49
|
+
RAC_EVENT_LLM_MODEL_UNLOADED = 103,
|
|
50
|
+
RAC_EVENT_LLM_GENERATION_STARTED = 110,
|
|
51
|
+
RAC_EVENT_LLM_GENERATION_COMPLETED = 111,
|
|
52
|
+
RAC_EVENT_LLM_GENERATION_FAILED = 112,
|
|
53
|
+
RAC_EVENT_LLM_FIRST_TOKEN = 113,
|
|
54
|
+
RAC_EVENT_LLM_STREAMING_UPDATE = 114,
|
|
55
|
+
|
|
56
|
+
// STT Events (200-299)
|
|
57
|
+
RAC_EVENT_STT_MODEL_LOAD_STARTED = 200,
|
|
58
|
+
RAC_EVENT_STT_MODEL_LOAD_COMPLETED = 201,
|
|
59
|
+
RAC_EVENT_STT_MODEL_LOAD_FAILED = 202,
|
|
60
|
+
RAC_EVENT_STT_MODEL_UNLOADED = 203,
|
|
61
|
+
RAC_EVENT_STT_TRANSCRIPTION_STARTED = 210,
|
|
62
|
+
RAC_EVENT_STT_TRANSCRIPTION_COMPLETED = 211,
|
|
63
|
+
RAC_EVENT_STT_TRANSCRIPTION_FAILED = 212,
|
|
64
|
+
RAC_EVENT_STT_PARTIAL_TRANSCRIPT = 213,
|
|
65
|
+
|
|
66
|
+
// TTS Events (300-399)
|
|
67
|
+
RAC_EVENT_TTS_VOICE_LOAD_STARTED = 300,
|
|
68
|
+
RAC_EVENT_TTS_VOICE_LOAD_COMPLETED = 301,
|
|
69
|
+
RAC_EVENT_TTS_VOICE_LOAD_FAILED = 302,
|
|
70
|
+
RAC_EVENT_TTS_VOICE_UNLOADED = 303,
|
|
71
|
+
RAC_EVENT_TTS_SYNTHESIS_STARTED = 310,
|
|
72
|
+
RAC_EVENT_TTS_SYNTHESIS_COMPLETED = 311,
|
|
73
|
+
RAC_EVENT_TTS_SYNTHESIS_FAILED = 312,
|
|
74
|
+
RAC_EVENT_TTS_SYNTHESIS_CHUNK = 313,
|
|
75
|
+
|
|
76
|
+
// VAD Events (400-499)
|
|
77
|
+
RAC_EVENT_VAD_STARTED = 400,
|
|
78
|
+
RAC_EVENT_VAD_STOPPED = 401,
|
|
79
|
+
RAC_EVENT_VAD_SPEECH_STARTED = 402,
|
|
80
|
+
RAC_EVENT_VAD_SPEECH_ENDED = 403,
|
|
81
|
+
RAC_EVENT_VAD_PAUSED = 404,
|
|
82
|
+
RAC_EVENT_VAD_RESUMED = 405,
|
|
83
|
+
|
|
84
|
+
// VoiceAgent Events (500-599)
|
|
85
|
+
RAC_EVENT_VOICE_AGENT_TURN_STARTED = 500,
|
|
86
|
+
RAC_EVENT_VOICE_AGENT_TURN_COMPLETED = 501,
|
|
87
|
+
RAC_EVENT_VOICE_AGENT_TURN_FAILED = 502,
|
|
88
|
+
// Voice Agent Component State Events
|
|
89
|
+
RAC_EVENT_VOICE_AGENT_STT_STATE_CHANGED = 510,
|
|
90
|
+
RAC_EVENT_VOICE_AGENT_LLM_STATE_CHANGED = 511,
|
|
91
|
+
RAC_EVENT_VOICE_AGENT_TTS_STATE_CHANGED = 512,
|
|
92
|
+
RAC_EVENT_VOICE_AGENT_ALL_READY = 513,
|
|
93
|
+
|
|
94
|
+
// SDK Lifecycle Events (600-699)
|
|
95
|
+
RAC_EVENT_SDK_INIT_STARTED = 600,
|
|
96
|
+
RAC_EVENT_SDK_INIT_COMPLETED = 601,
|
|
97
|
+
RAC_EVENT_SDK_INIT_FAILED = 602,
|
|
98
|
+
RAC_EVENT_SDK_MODELS_LOADED = 603,
|
|
99
|
+
|
|
100
|
+
// Model Download Events (700-719)
|
|
101
|
+
RAC_EVENT_MODEL_DOWNLOAD_STARTED = 700,
|
|
102
|
+
RAC_EVENT_MODEL_DOWNLOAD_PROGRESS = 701,
|
|
103
|
+
RAC_EVENT_MODEL_DOWNLOAD_COMPLETED = 702,
|
|
104
|
+
RAC_EVENT_MODEL_DOWNLOAD_FAILED = 703,
|
|
105
|
+
RAC_EVENT_MODEL_DOWNLOAD_CANCELLED = 704,
|
|
106
|
+
|
|
107
|
+
// Model Extraction Events (710-719)
|
|
108
|
+
RAC_EVENT_MODEL_EXTRACTION_STARTED = 710,
|
|
109
|
+
RAC_EVENT_MODEL_EXTRACTION_PROGRESS = 711,
|
|
110
|
+
RAC_EVENT_MODEL_EXTRACTION_COMPLETED = 712,
|
|
111
|
+
RAC_EVENT_MODEL_EXTRACTION_FAILED = 713,
|
|
112
|
+
|
|
113
|
+
// Model Deletion Events (720-729)
|
|
114
|
+
RAC_EVENT_MODEL_DELETED = 720,
|
|
115
|
+
|
|
116
|
+
// Storage Events (800-899)
|
|
117
|
+
RAC_EVENT_STORAGE_CACHE_CLEARED = 800,
|
|
118
|
+
RAC_EVENT_STORAGE_CACHE_CLEAR_FAILED = 801,
|
|
119
|
+
RAC_EVENT_STORAGE_TEMP_CLEANED = 802,
|
|
120
|
+
|
|
121
|
+
// Device Events (900-999)
|
|
122
|
+
RAC_EVENT_DEVICE_REGISTERED = 900,
|
|
123
|
+
RAC_EVENT_DEVICE_REGISTRATION_FAILED = 901,
|
|
124
|
+
|
|
125
|
+
// Network Events (1000-1099)
|
|
126
|
+
RAC_EVENT_NETWORK_CONNECTIVITY_CHANGED = 1000,
|
|
127
|
+
|
|
128
|
+
// Error Events (1100-1199)
|
|
129
|
+
RAC_EVENT_SDK_ERROR = 1100,
|
|
130
|
+
|
|
131
|
+
// Framework Events (1200-1299)
|
|
132
|
+
RAC_EVENT_FRAMEWORK_MODELS_REQUESTED = 1200,
|
|
133
|
+
RAC_EVENT_FRAMEWORK_MODELS_RETRIEVED = 1201,
|
|
134
|
+
} rac_event_type_t;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @brief Get the destination for an event type
|
|
138
|
+
*
|
|
139
|
+
* @param type Event type
|
|
140
|
+
* @return Event destination
|
|
141
|
+
*/
|
|
142
|
+
RAC_API rac_event_destination_t rac_event_get_destination(rac_event_type_t type);
|
|
143
|
+
|
|
144
|
+
// =============================================================================
|
|
145
|
+
// EVENT DATA STRUCTURES
|
|
146
|
+
// =============================================================================
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @brief LLM generation analytics event data
|
|
150
|
+
* Used for: GENERATION_STARTED, GENERATION_COMPLETED, GENERATION_FAILED
|
|
151
|
+
*/
|
|
152
|
+
typedef struct rac_analytics_llm_generation {
|
|
153
|
+
/** Unique generation identifier */
|
|
154
|
+
const char* generation_id;
|
|
155
|
+
/** Model ID used for generation */
|
|
156
|
+
const char* model_id;
|
|
157
|
+
/** Human-readable model name */
|
|
158
|
+
const char* model_name;
|
|
159
|
+
/** Number of input/prompt tokens */
|
|
160
|
+
int32_t input_tokens;
|
|
161
|
+
/** Number of output/completion tokens */
|
|
162
|
+
int32_t output_tokens;
|
|
163
|
+
/** Total duration in milliseconds */
|
|
164
|
+
double duration_ms;
|
|
165
|
+
/** Tokens generated per second */
|
|
166
|
+
double tokens_per_second;
|
|
167
|
+
/** Whether this was a streaming generation */
|
|
168
|
+
rac_bool_t is_streaming;
|
|
169
|
+
/** Time to first token in ms (0 if not streaming or not yet received) */
|
|
170
|
+
double time_to_first_token_ms;
|
|
171
|
+
/** Inference framework used */
|
|
172
|
+
rac_inference_framework_t framework;
|
|
173
|
+
/** Generation temperature (0 if not set) */
|
|
174
|
+
float temperature;
|
|
175
|
+
/** Max tokens setting (0 if not set) */
|
|
176
|
+
int32_t max_tokens;
|
|
177
|
+
/** Context length (0 if not set) */
|
|
178
|
+
int32_t context_length;
|
|
179
|
+
/** Error code (RAC_SUCCESS if no error) */
|
|
180
|
+
rac_result_t error_code;
|
|
181
|
+
/** Error message (NULL if no error) */
|
|
182
|
+
const char* error_message;
|
|
183
|
+
} rac_analytics_llm_generation_t;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* @brief LLM model load analytics event data
|
|
187
|
+
* Used for: MODEL_LOAD_STARTED, MODEL_LOAD_COMPLETED, MODEL_LOAD_FAILED
|
|
188
|
+
*/
|
|
189
|
+
typedef struct rac_analytics_llm_model {
|
|
190
|
+
/** Model ID */
|
|
191
|
+
const char* model_id;
|
|
192
|
+
/** Human-readable model name */
|
|
193
|
+
const char* model_name;
|
|
194
|
+
/** Model size in bytes (0 if unknown) */
|
|
195
|
+
int64_t model_size_bytes;
|
|
196
|
+
/** Load duration in milliseconds (for completed event) */
|
|
197
|
+
double duration_ms;
|
|
198
|
+
/** Inference framework */
|
|
199
|
+
rac_inference_framework_t framework;
|
|
200
|
+
/** Error code (RAC_SUCCESS if no error) */
|
|
201
|
+
rac_result_t error_code;
|
|
202
|
+
/** Error message (NULL if no error) */
|
|
203
|
+
const char* error_message;
|
|
204
|
+
} rac_analytics_llm_model_t;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* @brief STT transcription event data
|
|
208
|
+
* Used for: TRANSCRIPTION_STARTED, TRANSCRIPTION_COMPLETED, TRANSCRIPTION_FAILED
|
|
209
|
+
*/
|
|
210
|
+
typedef struct rac_analytics_stt_transcription {
|
|
211
|
+
/** Unique transcription identifier */
|
|
212
|
+
const char* transcription_id;
|
|
213
|
+
/** Model ID used */
|
|
214
|
+
const char* model_id;
|
|
215
|
+
/** Human-readable model name */
|
|
216
|
+
const char* model_name;
|
|
217
|
+
/** Transcribed text (for completed event) */
|
|
218
|
+
const char* text;
|
|
219
|
+
/** Confidence score (0.0 - 1.0) */
|
|
220
|
+
float confidence;
|
|
221
|
+
/** Processing duration in milliseconds */
|
|
222
|
+
double duration_ms;
|
|
223
|
+
/** Audio length in milliseconds */
|
|
224
|
+
double audio_length_ms;
|
|
225
|
+
/** Audio size in bytes */
|
|
226
|
+
int32_t audio_size_bytes;
|
|
227
|
+
/** Word count in result */
|
|
228
|
+
int32_t word_count;
|
|
229
|
+
/** Real-time factor (audio_length / processing_time) */
|
|
230
|
+
double real_time_factor;
|
|
231
|
+
/** Language code */
|
|
232
|
+
const char* language;
|
|
233
|
+
/** Sample rate */
|
|
234
|
+
int32_t sample_rate;
|
|
235
|
+
/** Whether streaming transcription */
|
|
236
|
+
rac_bool_t is_streaming;
|
|
237
|
+
/** Inference framework */
|
|
238
|
+
rac_inference_framework_t framework;
|
|
239
|
+
/** Error code (RAC_SUCCESS if no error) */
|
|
240
|
+
rac_result_t error_code;
|
|
241
|
+
/** Error message (NULL if no error) */
|
|
242
|
+
const char* error_message;
|
|
243
|
+
} rac_analytics_stt_transcription_t;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* @brief TTS synthesis event data
|
|
247
|
+
* Used for: SYNTHESIS_STARTED, SYNTHESIS_COMPLETED, SYNTHESIS_FAILED
|
|
248
|
+
*/
|
|
249
|
+
typedef struct rac_analytics_tts_synthesis {
|
|
250
|
+
/** Unique synthesis identifier */
|
|
251
|
+
const char* synthesis_id;
|
|
252
|
+
/** Voice/Model ID used */
|
|
253
|
+
const char* model_id;
|
|
254
|
+
/** Human-readable voice/model name */
|
|
255
|
+
const char* model_name;
|
|
256
|
+
/** Character count of input text */
|
|
257
|
+
int32_t character_count;
|
|
258
|
+
/** Audio duration in milliseconds */
|
|
259
|
+
double audio_duration_ms;
|
|
260
|
+
/** Audio size in bytes */
|
|
261
|
+
int32_t audio_size_bytes;
|
|
262
|
+
/** Processing duration in milliseconds */
|
|
263
|
+
double processing_duration_ms;
|
|
264
|
+
/** Characters processed per second */
|
|
265
|
+
double characters_per_second;
|
|
266
|
+
/** Sample rate */
|
|
267
|
+
int32_t sample_rate;
|
|
268
|
+
/** Inference framework */
|
|
269
|
+
rac_inference_framework_t framework;
|
|
270
|
+
/** Error code (RAC_SUCCESS if no error) */
|
|
271
|
+
rac_result_t error_code;
|
|
272
|
+
/** Error message (NULL if no error) */
|
|
273
|
+
const char* error_message;
|
|
274
|
+
} rac_analytics_tts_synthesis_t;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* @brief VAD event data
|
|
278
|
+
* Used for: VAD_STARTED, VAD_STOPPED, VAD_SPEECH_STARTED, VAD_SPEECH_ENDED
|
|
279
|
+
*/
|
|
280
|
+
typedef struct rac_analytics_vad {
|
|
281
|
+
/** Speech duration in milliseconds (for SPEECH_ENDED) */
|
|
282
|
+
double speech_duration_ms;
|
|
283
|
+
/** Energy level (for speech events) */
|
|
284
|
+
float energy_level;
|
|
285
|
+
} rac_analytics_vad_t;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* @brief Model download event data
|
|
289
|
+
* Used for: MODEL_DOWNLOAD_*, MODEL_EXTRACTION_*, MODEL_DELETED
|
|
290
|
+
*/
|
|
291
|
+
typedef struct rac_analytics_model_download {
|
|
292
|
+
/** Model identifier */
|
|
293
|
+
const char* model_id;
|
|
294
|
+
/** Download progress (0.0 - 100.0) */
|
|
295
|
+
double progress;
|
|
296
|
+
/** Bytes downloaded so far */
|
|
297
|
+
int64_t bytes_downloaded;
|
|
298
|
+
/** Total bytes to download */
|
|
299
|
+
int64_t total_bytes;
|
|
300
|
+
/** Duration in milliseconds */
|
|
301
|
+
double duration_ms;
|
|
302
|
+
/** Final size in bytes (for completed event) */
|
|
303
|
+
int64_t size_bytes;
|
|
304
|
+
/** Archive type (e.g., "zip", "tar.gz", "none") */
|
|
305
|
+
const char* archive_type;
|
|
306
|
+
/** Error code (RAC_SUCCESS if no error) */
|
|
307
|
+
rac_result_t error_code;
|
|
308
|
+
/** Error message (NULL if no error) */
|
|
309
|
+
const char* error_message;
|
|
310
|
+
} rac_analytics_model_download_t;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* @brief SDK lifecycle event data
|
|
314
|
+
* Used for: SDK_INIT_*, SDK_MODELS_LOADED
|
|
315
|
+
*/
|
|
316
|
+
typedef struct rac_analytics_sdk_lifecycle {
|
|
317
|
+
/** Duration in milliseconds */
|
|
318
|
+
double duration_ms;
|
|
319
|
+
/** Count (e.g., number of models loaded) */
|
|
320
|
+
int32_t count;
|
|
321
|
+
/** Error code (RAC_SUCCESS if no error) */
|
|
322
|
+
rac_result_t error_code;
|
|
323
|
+
/** Error message (NULL if no error) */
|
|
324
|
+
const char* error_message;
|
|
325
|
+
} rac_analytics_sdk_lifecycle_t;
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* @brief Storage event data
|
|
329
|
+
* Used for: STORAGE_CACHE_CLEARED, STORAGE_TEMP_CLEANED
|
|
330
|
+
*/
|
|
331
|
+
typedef struct rac_analytics_storage {
|
|
332
|
+
/** Bytes freed */
|
|
333
|
+
int64_t freed_bytes;
|
|
334
|
+
/** Error code (RAC_SUCCESS if no error) */
|
|
335
|
+
rac_result_t error_code;
|
|
336
|
+
/** Error message (NULL if no error) */
|
|
337
|
+
const char* error_message;
|
|
338
|
+
} rac_analytics_storage_t;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* @brief Device event data
|
|
342
|
+
* Used for: DEVICE_REGISTERED, DEVICE_REGISTRATION_FAILED
|
|
343
|
+
*/
|
|
344
|
+
typedef struct rac_analytics_device {
|
|
345
|
+
/** Device identifier */
|
|
346
|
+
const char* device_id;
|
|
347
|
+
/** Error code (RAC_SUCCESS if no error) */
|
|
348
|
+
rac_result_t error_code;
|
|
349
|
+
/** Error message (NULL if no error) */
|
|
350
|
+
const char* error_message;
|
|
351
|
+
} rac_analytics_device_t;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* @brief Network event data
|
|
355
|
+
* Used for: NETWORK_CONNECTIVITY_CHANGED
|
|
356
|
+
*/
|
|
357
|
+
typedef struct rac_analytics_network {
|
|
358
|
+
/** Whether the device is online */
|
|
359
|
+
rac_bool_t is_online;
|
|
360
|
+
} rac_analytics_network_t;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* @brief SDK error event data
|
|
364
|
+
* Used for: SDK_ERROR
|
|
365
|
+
*/
|
|
366
|
+
typedef struct rac_analytics_sdk_error {
|
|
367
|
+
/** Error code */
|
|
368
|
+
rac_result_t error_code;
|
|
369
|
+
/** Error message */
|
|
370
|
+
const char* error_message;
|
|
371
|
+
/** Operation that failed */
|
|
372
|
+
const char* operation;
|
|
373
|
+
/** Additional context */
|
|
374
|
+
const char* context;
|
|
375
|
+
} rac_analytics_sdk_error_t;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* @brief Voice agent component state
|
|
379
|
+
* Used for: VOICE_AGENT_*_STATE_CHANGED events
|
|
380
|
+
*/
|
|
381
|
+
typedef enum rac_voice_agent_component_state {
|
|
382
|
+
RAC_VOICE_AGENT_STATE_NOT_LOADED = 0,
|
|
383
|
+
RAC_VOICE_AGENT_STATE_LOADING = 1,
|
|
384
|
+
RAC_VOICE_AGENT_STATE_LOADED = 2,
|
|
385
|
+
RAC_VOICE_AGENT_STATE_ERROR = 3,
|
|
386
|
+
} rac_voice_agent_component_state_t;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* @brief Voice agent state change event data
|
|
390
|
+
* Used for: VOICE_AGENT_STT_STATE_CHANGED, VOICE_AGENT_LLM_STATE_CHANGED,
|
|
391
|
+
* VOICE_AGENT_TTS_STATE_CHANGED, VOICE_AGENT_ALL_READY
|
|
392
|
+
*/
|
|
393
|
+
typedef struct rac_analytics_voice_agent_state {
|
|
394
|
+
/** Component name: "stt", "llm", "tts", or "all" */
|
|
395
|
+
const char* component;
|
|
396
|
+
/** New state */
|
|
397
|
+
rac_voice_agent_component_state_t state;
|
|
398
|
+
/** Model ID (if loaded) */
|
|
399
|
+
const char* model_id;
|
|
400
|
+
/** Error message (if state is ERROR) */
|
|
401
|
+
const char* error_message;
|
|
402
|
+
} rac_analytics_voice_agent_state_t;
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* @brief Union of all event data types
|
|
406
|
+
*/
|
|
407
|
+
typedef struct rac_analytics_event_data {
|
|
408
|
+
rac_event_type_t type;
|
|
409
|
+
union {
|
|
410
|
+
rac_analytics_llm_generation_t llm_generation;
|
|
411
|
+
rac_analytics_llm_model_t llm_model;
|
|
412
|
+
rac_analytics_stt_transcription_t stt_transcription;
|
|
413
|
+
rac_analytics_tts_synthesis_t tts_synthesis;
|
|
414
|
+
rac_analytics_vad_t vad;
|
|
415
|
+
rac_analytics_model_download_t model_download;
|
|
416
|
+
rac_analytics_sdk_lifecycle_t sdk_lifecycle;
|
|
417
|
+
rac_analytics_storage_t storage;
|
|
418
|
+
rac_analytics_device_t device;
|
|
419
|
+
rac_analytics_network_t network;
|
|
420
|
+
rac_analytics_sdk_error_t sdk_error;
|
|
421
|
+
rac_analytics_voice_agent_state_t voice_agent_state;
|
|
422
|
+
} data;
|
|
423
|
+
} rac_analytics_event_data_t;
|
|
424
|
+
|
|
425
|
+
// =============================================================================
|
|
426
|
+
// EVENT CALLBACK API
|
|
427
|
+
// =============================================================================
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* @brief Event callback function type
|
|
431
|
+
*
|
|
432
|
+
* Platform SDKs implement this callback to receive events from C++.
|
|
433
|
+
*
|
|
434
|
+
* @param type Event type
|
|
435
|
+
* @param data Event data (lifetime: only valid during callback)
|
|
436
|
+
* @param user_data User data provided during registration
|
|
437
|
+
*/
|
|
438
|
+
typedef void (*rac_analytics_callback_fn)(rac_event_type_t type,
|
|
439
|
+
const rac_analytics_event_data_t* data, void* user_data);
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* @brief Register analytics event callback
|
|
443
|
+
*
|
|
444
|
+
* Called by platform SDKs at initialization to receive analytics events.
|
|
445
|
+
* Only one callback can be registered at a time.
|
|
446
|
+
*
|
|
447
|
+
* @param callback Callback function (NULL to unregister)
|
|
448
|
+
* @param user_data User data passed to callback
|
|
449
|
+
* @return RAC_SUCCESS or error code
|
|
450
|
+
*/
|
|
451
|
+
RAC_API rac_result_t rac_analytics_events_set_callback(rac_analytics_callback_fn callback,
|
|
452
|
+
void* user_data);
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* @brief Emit an analytics event
|
|
456
|
+
*
|
|
457
|
+
* Called internally by C++ components to emit analytics events.
|
|
458
|
+
* If no callback is registered, event is silently discarded.
|
|
459
|
+
*
|
|
460
|
+
* @param type Event type
|
|
461
|
+
* @param data Event data
|
|
462
|
+
*/
|
|
463
|
+
RAC_API void rac_analytics_event_emit(rac_event_type_t type,
|
|
464
|
+
const rac_analytics_event_data_t* data);
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* @brief Check if analytics event callback is registered
|
|
468
|
+
*
|
|
469
|
+
* @return RAC_TRUE if callback is registered, RAC_FALSE otherwise
|
|
470
|
+
*/
|
|
471
|
+
RAC_API rac_bool_t rac_analytics_events_has_callback(void);
|
|
472
|
+
|
|
473
|
+
// =============================================================================
|
|
474
|
+
// PUBLIC EVENT CALLBACK API
|
|
475
|
+
// =============================================================================
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* @brief Public event callback function type
|
|
479
|
+
*
|
|
480
|
+
* Platform SDKs implement this callback to receive public events from C++.
|
|
481
|
+
* Public events are intended for app developers (UI updates, user feedback).
|
|
482
|
+
*
|
|
483
|
+
* @param type Event type
|
|
484
|
+
* @param data Event data (lifetime: only valid during callback)
|
|
485
|
+
* @param user_data User data provided during registration
|
|
486
|
+
*/
|
|
487
|
+
typedef void (*rac_public_event_callback_fn)(rac_event_type_t type,
|
|
488
|
+
const rac_analytics_event_data_t* data,
|
|
489
|
+
void* user_data);
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* @brief Register public event callback
|
|
493
|
+
*
|
|
494
|
+
* Called by platform SDKs to receive public events (for app developers).
|
|
495
|
+
* Events are routed based on their destination:
|
|
496
|
+
* - PUBLIC_ONLY: Only sent to this callback
|
|
497
|
+
* - ALL: Sent to both this callback and telemetry
|
|
498
|
+
*
|
|
499
|
+
* @param callback Callback function (NULL to unregister)
|
|
500
|
+
* @param user_data User data passed to callback
|
|
501
|
+
* @return RAC_SUCCESS or error code
|
|
502
|
+
*/
|
|
503
|
+
RAC_API rac_result_t rac_analytics_events_set_public_callback(rac_public_event_callback_fn callback,
|
|
504
|
+
void* user_data);
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* @brief Check if public event callback is registered
|
|
508
|
+
*
|
|
509
|
+
* @return RAC_TRUE if callback is registered, RAC_FALSE otherwise
|
|
510
|
+
*/
|
|
511
|
+
RAC_API rac_bool_t rac_analytics_events_has_public_callback(void);
|
|
512
|
+
|
|
513
|
+
// =============================================================================
|
|
514
|
+
// DEFAULT EVENT DATA
|
|
515
|
+
// =============================================================================
|
|
516
|
+
|
|
517
|
+
/** Default LLM generation event */
|
|
518
|
+
static const rac_analytics_llm_generation_t RAC_ANALYTICS_LLM_GENERATION_DEFAULT = {
|
|
519
|
+
.generation_id = RAC_NULL,
|
|
520
|
+
.model_id = RAC_NULL,
|
|
521
|
+
.model_name = RAC_NULL,
|
|
522
|
+
.input_tokens = 0,
|
|
523
|
+
.output_tokens = 0,
|
|
524
|
+
.duration_ms = 0.0,
|
|
525
|
+
.tokens_per_second = 0.0,
|
|
526
|
+
.is_streaming = RAC_FALSE,
|
|
527
|
+
.time_to_first_token_ms = 0.0,
|
|
528
|
+
.framework = RAC_FRAMEWORK_UNKNOWN,
|
|
529
|
+
.temperature = 0.0f,
|
|
530
|
+
.max_tokens = 0,
|
|
531
|
+
.context_length = 0,
|
|
532
|
+
.error_code = RAC_SUCCESS,
|
|
533
|
+
.error_message = RAC_NULL};
|
|
534
|
+
|
|
535
|
+
/** Default STT transcription event */
|
|
536
|
+
static const rac_analytics_stt_transcription_t RAC_ANALYTICS_STT_TRANSCRIPTION_DEFAULT = {
|
|
537
|
+
.transcription_id = RAC_NULL,
|
|
538
|
+
.model_id = RAC_NULL,
|
|
539
|
+
.model_name = RAC_NULL,
|
|
540
|
+
.text = RAC_NULL,
|
|
541
|
+
.confidence = 0.0f,
|
|
542
|
+
.duration_ms = 0.0,
|
|
543
|
+
.audio_length_ms = 0.0,
|
|
544
|
+
.audio_size_bytes = 0,
|
|
545
|
+
.word_count = 0,
|
|
546
|
+
.real_time_factor = 0.0,
|
|
547
|
+
.language = RAC_NULL,
|
|
548
|
+
.sample_rate = 0,
|
|
549
|
+
.is_streaming = RAC_FALSE,
|
|
550
|
+
.framework = RAC_FRAMEWORK_UNKNOWN,
|
|
551
|
+
.error_code = RAC_SUCCESS,
|
|
552
|
+
.error_message = RAC_NULL};
|
|
553
|
+
|
|
554
|
+
/** Default TTS synthesis event */
|
|
555
|
+
static const rac_analytics_tts_synthesis_t RAC_ANALYTICS_TTS_SYNTHESIS_DEFAULT = {
|
|
556
|
+
.synthesis_id = RAC_NULL,
|
|
557
|
+
.model_id = RAC_NULL,
|
|
558
|
+
.model_name = RAC_NULL,
|
|
559
|
+
.character_count = 0,
|
|
560
|
+
.audio_duration_ms = 0.0,
|
|
561
|
+
.audio_size_bytes = 0,
|
|
562
|
+
.processing_duration_ms = 0.0,
|
|
563
|
+
.characters_per_second = 0.0,
|
|
564
|
+
.sample_rate = 0,
|
|
565
|
+
.framework = RAC_FRAMEWORK_UNKNOWN,
|
|
566
|
+
.error_code = RAC_SUCCESS,
|
|
567
|
+
.error_message = RAC_NULL};
|
|
568
|
+
|
|
569
|
+
/** Default VAD event */
|
|
570
|
+
static const rac_analytics_vad_t RAC_ANALYTICS_VAD_DEFAULT = {.speech_duration_ms = 0.0,
|
|
571
|
+
.energy_level = 0.0f};
|
|
572
|
+
|
|
573
|
+
/** Default model download event */
|
|
574
|
+
static const rac_analytics_model_download_t RAC_ANALYTICS_MODEL_DOWNLOAD_DEFAULT = {
|
|
575
|
+
.model_id = RAC_NULL,
|
|
576
|
+
.progress = 0.0,
|
|
577
|
+
.bytes_downloaded = 0,
|
|
578
|
+
.total_bytes = 0,
|
|
579
|
+
.duration_ms = 0.0,
|
|
580
|
+
.size_bytes = 0,
|
|
581
|
+
.archive_type = RAC_NULL,
|
|
582
|
+
.error_code = RAC_SUCCESS,
|
|
583
|
+
.error_message = RAC_NULL};
|
|
584
|
+
|
|
585
|
+
/** Default SDK lifecycle event */
|
|
586
|
+
static const rac_analytics_sdk_lifecycle_t RAC_ANALYTICS_SDK_LIFECYCLE_DEFAULT = {
|
|
587
|
+
.duration_ms = 0.0, .count = 0, .error_code = RAC_SUCCESS, .error_message = RAC_NULL};
|
|
588
|
+
|
|
589
|
+
/** Default storage event */
|
|
590
|
+
static const rac_analytics_storage_t RAC_ANALYTICS_STORAGE_DEFAULT = {
|
|
591
|
+
.freed_bytes = 0, .error_code = RAC_SUCCESS, .error_message = RAC_NULL};
|
|
592
|
+
|
|
593
|
+
/** Default device event */
|
|
594
|
+
static const rac_analytics_device_t RAC_ANALYTICS_DEVICE_DEFAULT = {
|
|
595
|
+
.device_id = RAC_NULL, .error_code = RAC_SUCCESS, .error_message = RAC_NULL};
|
|
596
|
+
|
|
597
|
+
/** Default network event */
|
|
598
|
+
static const rac_analytics_network_t RAC_ANALYTICS_NETWORK_DEFAULT = {.is_online = RAC_FALSE};
|
|
599
|
+
|
|
600
|
+
/** Default SDK error event */
|
|
601
|
+
static const rac_analytics_sdk_error_t RAC_ANALYTICS_SDK_ERROR_DEFAULT = {.error_code = RAC_SUCCESS,
|
|
602
|
+
.error_message = RAC_NULL,
|
|
603
|
+
.operation = RAC_NULL,
|
|
604
|
+
.context = RAC_NULL};
|
|
605
|
+
|
|
606
|
+
#ifdef __cplusplus
|
|
607
|
+
}
|
|
608
|
+
#endif
|
|
609
|
+
|
|
610
|
+
#endif /* RAC_ANALYTICS_EVENTS_H */
|