@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,469 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file rac_error.h
|
|
3
|
+
* @brief RunAnywhere Commons - Error Codes and Error Handling
|
|
4
|
+
*
|
|
5
|
+
* C port of Swift's ErrorCode enum from Foundation/Errors/ErrorCode.swift.
|
|
6
|
+
*
|
|
7
|
+
* Error codes for runanywhere-commons use the range -100 to -999 to avoid
|
|
8
|
+
* collision with runanywhere-core error codes (0 to -99).
|
|
9
|
+
*
|
|
10
|
+
* IMPORTANT: This is a direct translation of the Swift implementation.
|
|
11
|
+
* Do NOT add error codes not present in the Swift code.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
#ifndef RAC_ERROR_H
|
|
15
|
+
#define RAC_ERROR_H
|
|
16
|
+
|
|
17
|
+
#include "rac/core/rac_types.h"
|
|
18
|
+
|
|
19
|
+
#ifdef __cplusplus
|
|
20
|
+
extern "C" {
|
|
21
|
+
#endif
|
|
22
|
+
|
|
23
|
+
// =============================================================================
|
|
24
|
+
// ERROR CODE RANGES
|
|
25
|
+
// =============================================================================
|
|
26
|
+
//
|
|
27
|
+
// runanywhere-core (ra_*): 0 to -99
|
|
28
|
+
// runanywhere-commons (rac_*): -100 to -999
|
|
29
|
+
// - Initialization errors: -100 to -109
|
|
30
|
+
// - Model errors: -110 to -129
|
|
31
|
+
// - Generation errors: -130 to -149
|
|
32
|
+
// - Network errors: -150 to -179
|
|
33
|
+
// - Storage errors: -180 to -219
|
|
34
|
+
// - Hardware errors: -220 to -229
|
|
35
|
+
// - Component state errors: -230 to -249
|
|
36
|
+
// - Validation errors: -250 to -279
|
|
37
|
+
// - Audio errors: -280 to -299
|
|
38
|
+
// - Language/Voice errors: -300 to -319
|
|
39
|
+
// - Authentication errors: -320 to -329
|
|
40
|
+
// - Security errors: -330 to -349
|
|
41
|
+
// - Extraction errors: -350 to -369
|
|
42
|
+
// - Calibration errors: -370 to -379
|
|
43
|
+
// - Module/Service errors: -400 to -499
|
|
44
|
+
// - Platform adapter errors: -500 to -599
|
|
45
|
+
// - Backend errors: -600 to -699
|
|
46
|
+
// - Event errors: -700 to -799
|
|
47
|
+
// - Other errors: -800 to -899
|
|
48
|
+
// - Reserved: -900 to -999
|
|
49
|
+
|
|
50
|
+
// =============================================================================
|
|
51
|
+
// INITIALIZATION ERRORS (-100 to -109)
|
|
52
|
+
// Mirrors Swift's ErrorCode: Initialization Errors
|
|
53
|
+
// =============================================================================
|
|
54
|
+
|
|
55
|
+
/** Component or service has not been initialized */
|
|
56
|
+
#define RAC_ERROR_NOT_INITIALIZED ((rac_result_t) - 100)
|
|
57
|
+
/** Component or service is already initialized */
|
|
58
|
+
#define RAC_ERROR_ALREADY_INITIALIZED ((rac_result_t) - 101)
|
|
59
|
+
/** Initialization failed */
|
|
60
|
+
#define RAC_ERROR_INITIALIZATION_FAILED ((rac_result_t) - 102)
|
|
61
|
+
/** Configuration is invalid */
|
|
62
|
+
#define RAC_ERROR_INVALID_CONFIGURATION ((rac_result_t) - 103)
|
|
63
|
+
/** API key is invalid or missing */
|
|
64
|
+
#define RAC_ERROR_INVALID_API_KEY ((rac_result_t) - 104)
|
|
65
|
+
/** Environment mismatch (e.g., dev vs prod) */
|
|
66
|
+
#define RAC_ERROR_ENVIRONMENT_MISMATCH ((rac_result_t) - 105)
|
|
67
|
+
/** Invalid parameter value passed to a function */
|
|
68
|
+
#define RAC_ERROR_INVALID_PARAMETER ((rac_result_t) - 106)
|
|
69
|
+
|
|
70
|
+
// =============================================================================
|
|
71
|
+
// MODEL ERRORS (-110 to -129)
|
|
72
|
+
// Mirrors Swift's ErrorCode: Model Errors
|
|
73
|
+
// =============================================================================
|
|
74
|
+
|
|
75
|
+
/** Requested model was not found */
|
|
76
|
+
#define RAC_ERROR_MODEL_NOT_FOUND ((rac_result_t) - 110)
|
|
77
|
+
/** Failed to load the model */
|
|
78
|
+
#define RAC_ERROR_MODEL_LOAD_FAILED ((rac_result_t) - 111)
|
|
79
|
+
/** Model validation failed */
|
|
80
|
+
#define RAC_ERROR_MODEL_VALIDATION_FAILED ((rac_result_t) - 112)
|
|
81
|
+
/** Model is incompatible with current runtime */
|
|
82
|
+
#define RAC_ERROR_MODEL_INCOMPATIBLE ((rac_result_t) - 113)
|
|
83
|
+
/** Model format is invalid */
|
|
84
|
+
#define RAC_ERROR_INVALID_MODEL_FORMAT ((rac_result_t) - 114)
|
|
85
|
+
/** Model storage is corrupted */
|
|
86
|
+
#define RAC_ERROR_MODEL_STORAGE_CORRUPTED ((rac_result_t) - 115)
|
|
87
|
+
/** Model not loaded (alias for backward compatibility) */
|
|
88
|
+
#define RAC_ERROR_MODEL_NOT_LOADED ((rac_result_t) - 116)
|
|
89
|
+
|
|
90
|
+
// =============================================================================
|
|
91
|
+
// GENERATION ERRORS (-130 to -149)
|
|
92
|
+
// Mirrors Swift's ErrorCode: Generation Errors
|
|
93
|
+
// =============================================================================
|
|
94
|
+
|
|
95
|
+
/** Text/audio generation failed */
|
|
96
|
+
#define RAC_ERROR_GENERATION_FAILED ((rac_result_t) - 130)
|
|
97
|
+
/** Generation timed out */
|
|
98
|
+
#define RAC_ERROR_GENERATION_TIMEOUT ((rac_result_t) - 131)
|
|
99
|
+
/** Context length exceeded maximum */
|
|
100
|
+
#define RAC_ERROR_CONTEXT_TOO_LONG ((rac_result_t) - 132)
|
|
101
|
+
/** Token limit exceeded */
|
|
102
|
+
#define RAC_ERROR_TOKEN_LIMIT_EXCEEDED ((rac_result_t) - 133)
|
|
103
|
+
/** Cost limit exceeded */
|
|
104
|
+
#define RAC_ERROR_COST_LIMIT_EXCEEDED ((rac_result_t) - 134)
|
|
105
|
+
/** Inference failed */
|
|
106
|
+
#define RAC_ERROR_INFERENCE_FAILED ((rac_result_t) - 135)
|
|
107
|
+
|
|
108
|
+
// =============================================================================
|
|
109
|
+
// NETWORK ERRORS (-150 to -179)
|
|
110
|
+
// Mirrors Swift's ErrorCode: Network Errors
|
|
111
|
+
// =============================================================================
|
|
112
|
+
|
|
113
|
+
/** Network is unavailable */
|
|
114
|
+
#define RAC_ERROR_NETWORK_UNAVAILABLE ((rac_result_t) - 150)
|
|
115
|
+
/** Generic network error */
|
|
116
|
+
#define RAC_ERROR_NETWORK_ERROR ((rac_result_t) - 151)
|
|
117
|
+
/** Request failed */
|
|
118
|
+
#define RAC_ERROR_REQUEST_FAILED ((rac_result_t) - 152)
|
|
119
|
+
/** Download failed */
|
|
120
|
+
#define RAC_ERROR_DOWNLOAD_FAILED ((rac_result_t) - 153)
|
|
121
|
+
/** Server returned an error */
|
|
122
|
+
#define RAC_ERROR_SERVER_ERROR ((rac_result_t) - 154)
|
|
123
|
+
/** Request timed out */
|
|
124
|
+
#define RAC_ERROR_TIMEOUT ((rac_result_t) - 155)
|
|
125
|
+
/** Invalid response from server */
|
|
126
|
+
#define RAC_ERROR_INVALID_RESPONSE ((rac_result_t) - 156)
|
|
127
|
+
/** HTTP error with status code */
|
|
128
|
+
#define RAC_ERROR_HTTP_ERROR ((rac_result_t) - 157)
|
|
129
|
+
/** Connection was lost */
|
|
130
|
+
#define RAC_ERROR_CONNECTION_LOST ((rac_result_t) - 158)
|
|
131
|
+
/** Partial download (incomplete) */
|
|
132
|
+
#define RAC_ERROR_PARTIAL_DOWNLOAD ((rac_result_t) - 159)
|
|
133
|
+
/** HTTP request failed */
|
|
134
|
+
#define RAC_ERROR_HTTP_REQUEST_FAILED ((rac_result_t) - 160)
|
|
135
|
+
/** HTTP not supported */
|
|
136
|
+
#define RAC_ERROR_HTTP_NOT_SUPPORTED ((rac_result_t) - 161)
|
|
137
|
+
|
|
138
|
+
// =============================================================================
|
|
139
|
+
// STORAGE ERRORS (-180 to -219)
|
|
140
|
+
// Mirrors Swift's ErrorCode: Storage Errors
|
|
141
|
+
// =============================================================================
|
|
142
|
+
|
|
143
|
+
/** Insufficient storage space */
|
|
144
|
+
#define RAC_ERROR_INSUFFICIENT_STORAGE ((rac_result_t) - 180)
|
|
145
|
+
/** Storage is full */
|
|
146
|
+
#define RAC_ERROR_STORAGE_FULL ((rac_result_t) - 181)
|
|
147
|
+
/** Generic storage error */
|
|
148
|
+
#define RAC_ERROR_STORAGE_ERROR ((rac_result_t) - 182)
|
|
149
|
+
/** File was not found */
|
|
150
|
+
#define RAC_ERROR_FILE_NOT_FOUND ((rac_result_t) - 183)
|
|
151
|
+
/** Failed to read file */
|
|
152
|
+
#define RAC_ERROR_FILE_READ_FAILED ((rac_result_t) - 184)
|
|
153
|
+
/** Failed to write file */
|
|
154
|
+
#define RAC_ERROR_FILE_WRITE_FAILED ((rac_result_t) - 185)
|
|
155
|
+
/** Permission denied for file operation */
|
|
156
|
+
#define RAC_ERROR_PERMISSION_DENIED ((rac_result_t) - 186)
|
|
157
|
+
/** Failed to delete file or directory */
|
|
158
|
+
#define RAC_ERROR_DELETE_FAILED ((rac_result_t) - 187)
|
|
159
|
+
/** Failed to move file */
|
|
160
|
+
#define RAC_ERROR_MOVE_FAILED ((rac_result_t) - 188)
|
|
161
|
+
/** Failed to create directory */
|
|
162
|
+
#define RAC_ERROR_DIRECTORY_CREATION_FAILED ((rac_result_t) - 189)
|
|
163
|
+
/** Directory not found */
|
|
164
|
+
#define RAC_ERROR_DIRECTORY_NOT_FOUND ((rac_result_t) - 190)
|
|
165
|
+
/** Invalid file path */
|
|
166
|
+
#define RAC_ERROR_INVALID_PATH ((rac_result_t) - 191)
|
|
167
|
+
/** Invalid file name */
|
|
168
|
+
#define RAC_ERROR_INVALID_FILE_NAME ((rac_result_t) - 192)
|
|
169
|
+
/** Failed to create temporary file */
|
|
170
|
+
#define RAC_ERROR_TEMP_FILE_CREATION_FAILED ((rac_result_t) - 193)
|
|
171
|
+
/** File delete failed (alias) */
|
|
172
|
+
#define RAC_ERROR_FILE_DELETE_FAILED ((rac_result_t) - 187)
|
|
173
|
+
|
|
174
|
+
// =============================================================================
|
|
175
|
+
// HARDWARE ERRORS (-220 to -229)
|
|
176
|
+
// Mirrors Swift's ErrorCode: Hardware Errors
|
|
177
|
+
// =============================================================================
|
|
178
|
+
|
|
179
|
+
/** Hardware is unsupported */
|
|
180
|
+
#define RAC_ERROR_HARDWARE_UNSUPPORTED ((rac_result_t) - 220)
|
|
181
|
+
/** Insufficient memory */
|
|
182
|
+
#define RAC_ERROR_INSUFFICIENT_MEMORY ((rac_result_t) - 221)
|
|
183
|
+
/** Out of memory (alias) */
|
|
184
|
+
#define RAC_ERROR_OUT_OF_MEMORY ((rac_result_t) - 221)
|
|
185
|
+
|
|
186
|
+
// =============================================================================
|
|
187
|
+
// COMPONENT STATE ERRORS (-230 to -249)
|
|
188
|
+
// Mirrors Swift's ErrorCode: Component State Errors
|
|
189
|
+
// =============================================================================
|
|
190
|
+
|
|
191
|
+
/** Component is not ready */
|
|
192
|
+
#define RAC_ERROR_COMPONENT_NOT_READY ((rac_result_t) - 230)
|
|
193
|
+
/** Component is in invalid state */
|
|
194
|
+
#define RAC_ERROR_INVALID_STATE ((rac_result_t) - 231)
|
|
195
|
+
/** Service is not available */
|
|
196
|
+
#define RAC_ERROR_SERVICE_NOT_AVAILABLE ((rac_result_t) - 232)
|
|
197
|
+
/** Service is busy */
|
|
198
|
+
#define RAC_ERROR_SERVICE_BUSY ((rac_result_t) - 233)
|
|
199
|
+
/** Processing failed */
|
|
200
|
+
#define RAC_ERROR_PROCESSING_FAILED ((rac_result_t) - 234)
|
|
201
|
+
/** Start operation failed */
|
|
202
|
+
#define RAC_ERROR_START_FAILED ((rac_result_t) - 235)
|
|
203
|
+
/** Feature/operation is not supported */
|
|
204
|
+
#define RAC_ERROR_NOT_SUPPORTED ((rac_result_t) - 236)
|
|
205
|
+
|
|
206
|
+
// =============================================================================
|
|
207
|
+
// VALIDATION ERRORS (-250 to -279)
|
|
208
|
+
// Mirrors Swift's ErrorCode: Validation Errors
|
|
209
|
+
// =============================================================================
|
|
210
|
+
|
|
211
|
+
/** Validation failed */
|
|
212
|
+
#define RAC_ERROR_VALIDATION_FAILED ((rac_result_t) - 250)
|
|
213
|
+
/** Input is invalid */
|
|
214
|
+
#define RAC_ERROR_INVALID_INPUT ((rac_result_t) - 251)
|
|
215
|
+
/** Format is invalid */
|
|
216
|
+
#define RAC_ERROR_INVALID_FORMAT ((rac_result_t) - 252)
|
|
217
|
+
/** Input is empty */
|
|
218
|
+
#define RAC_ERROR_EMPTY_INPUT ((rac_result_t) - 253)
|
|
219
|
+
/** Text is too long */
|
|
220
|
+
#define RAC_ERROR_TEXT_TOO_LONG ((rac_result_t) - 254)
|
|
221
|
+
/** Invalid SSML markup */
|
|
222
|
+
#define RAC_ERROR_INVALID_SSML ((rac_result_t) - 255)
|
|
223
|
+
/** Invalid speaking rate */
|
|
224
|
+
#define RAC_ERROR_INVALID_SPEAKING_RATE ((rac_result_t) - 256)
|
|
225
|
+
/** Invalid pitch */
|
|
226
|
+
#define RAC_ERROR_INVALID_PITCH ((rac_result_t) - 257)
|
|
227
|
+
/** Invalid volume */
|
|
228
|
+
#define RAC_ERROR_INVALID_VOLUME ((rac_result_t) - 258)
|
|
229
|
+
/** Invalid argument */
|
|
230
|
+
#define RAC_ERROR_INVALID_ARGUMENT ((rac_result_t) - 259)
|
|
231
|
+
/** Null pointer */
|
|
232
|
+
#define RAC_ERROR_NULL_POINTER ((rac_result_t) - 260)
|
|
233
|
+
/** Buffer too small */
|
|
234
|
+
#define RAC_ERROR_BUFFER_TOO_SMALL ((rac_result_t) - 261)
|
|
235
|
+
|
|
236
|
+
// =============================================================================
|
|
237
|
+
// AUDIO ERRORS (-280 to -299)
|
|
238
|
+
// Mirrors Swift's ErrorCode: Audio Errors
|
|
239
|
+
// =============================================================================
|
|
240
|
+
|
|
241
|
+
/** Audio format is not supported */
|
|
242
|
+
#define RAC_ERROR_AUDIO_FORMAT_NOT_SUPPORTED ((rac_result_t) - 280)
|
|
243
|
+
/** Audio session configuration failed */
|
|
244
|
+
#define RAC_ERROR_AUDIO_SESSION_FAILED ((rac_result_t) - 281)
|
|
245
|
+
/** Microphone permission denied */
|
|
246
|
+
#define RAC_ERROR_MICROPHONE_PERMISSION_DENIED ((rac_result_t) - 282)
|
|
247
|
+
/** Insufficient audio data */
|
|
248
|
+
#define RAC_ERROR_INSUFFICIENT_AUDIO_DATA ((rac_result_t) - 283)
|
|
249
|
+
/** Audio buffer is empty */
|
|
250
|
+
#define RAC_ERROR_EMPTY_AUDIO_BUFFER ((rac_result_t) - 284)
|
|
251
|
+
/** Audio session activation failed */
|
|
252
|
+
#define RAC_ERROR_AUDIO_SESSION_ACTIVATION_FAILED ((rac_result_t) - 285)
|
|
253
|
+
|
|
254
|
+
// =============================================================================
|
|
255
|
+
// LANGUAGE/VOICE ERRORS (-300 to -319)
|
|
256
|
+
// Mirrors Swift's ErrorCode: Language/Voice Errors
|
|
257
|
+
// =============================================================================
|
|
258
|
+
|
|
259
|
+
/** Language is not supported */
|
|
260
|
+
#define RAC_ERROR_LANGUAGE_NOT_SUPPORTED ((rac_result_t) - 300)
|
|
261
|
+
/** Voice is not available */
|
|
262
|
+
#define RAC_ERROR_VOICE_NOT_AVAILABLE ((rac_result_t) - 301)
|
|
263
|
+
/** Streaming is not supported */
|
|
264
|
+
#define RAC_ERROR_STREAMING_NOT_SUPPORTED ((rac_result_t) - 302)
|
|
265
|
+
/** Stream was cancelled */
|
|
266
|
+
#define RAC_ERROR_STREAM_CANCELLED ((rac_result_t) - 303)
|
|
267
|
+
|
|
268
|
+
// =============================================================================
|
|
269
|
+
// AUTHENTICATION ERRORS (-320 to -329)
|
|
270
|
+
// Mirrors Swift's ErrorCode: Authentication Errors
|
|
271
|
+
// =============================================================================
|
|
272
|
+
|
|
273
|
+
/** Authentication failed */
|
|
274
|
+
#define RAC_ERROR_AUTHENTICATION_FAILED ((rac_result_t) - 320)
|
|
275
|
+
/** Unauthorized access */
|
|
276
|
+
#define RAC_ERROR_UNAUTHORIZED ((rac_result_t) - 321)
|
|
277
|
+
/** Access forbidden */
|
|
278
|
+
#define RAC_ERROR_FORBIDDEN ((rac_result_t) - 322)
|
|
279
|
+
|
|
280
|
+
// =============================================================================
|
|
281
|
+
// SECURITY ERRORS (-330 to -349)
|
|
282
|
+
// Mirrors Swift's ErrorCode: Security Errors
|
|
283
|
+
// =============================================================================
|
|
284
|
+
|
|
285
|
+
/** Keychain operation failed */
|
|
286
|
+
#define RAC_ERROR_KEYCHAIN_ERROR ((rac_result_t) - 330)
|
|
287
|
+
/** Encoding error */
|
|
288
|
+
#define RAC_ERROR_ENCODING_ERROR ((rac_result_t) - 331)
|
|
289
|
+
/** Decoding error */
|
|
290
|
+
#define RAC_ERROR_DECODING_ERROR ((rac_result_t) - 332)
|
|
291
|
+
/** Secure storage failed */
|
|
292
|
+
#define RAC_ERROR_SECURE_STORAGE_FAILED ((rac_result_t) - 333)
|
|
293
|
+
|
|
294
|
+
// =============================================================================
|
|
295
|
+
// EXTRACTION ERRORS (-350 to -369)
|
|
296
|
+
// Mirrors Swift's ErrorCode: Extraction Errors
|
|
297
|
+
// =============================================================================
|
|
298
|
+
|
|
299
|
+
/** Extraction failed (JSON, archive, etc.) */
|
|
300
|
+
#define RAC_ERROR_EXTRACTION_FAILED ((rac_result_t) - 350)
|
|
301
|
+
/** Checksum mismatch */
|
|
302
|
+
#define RAC_ERROR_CHECKSUM_MISMATCH ((rac_result_t) - 351)
|
|
303
|
+
/** Unsupported archive format */
|
|
304
|
+
#define RAC_ERROR_UNSUPPORTED_ARCHIVE ((rac_result_t) - 352)
|
|
305
|
+
|
|
306
|
+
// =============================================================================
|
|
307
|
+
// CALIBRATION ERRORS (-370 to -379)
|
|
308
|
+
// Mirrors Swift's ErrorCode: Calibration Errors
|
|
309
|
+
// =============================================================================
|
|
310
|
+
|
|
311
|
+
/** Calibration failed */
|
|
312
|
+
#define RAC_ERROR_CALIBRATION_FAILED ((rac_result_t) - 370)
|
|
313
|
+
/** Calibration timed out */
|
|
314
|
+
#define RAC_ERROR_CALIBRATION_TIMEOUT ((rac_result_t) - 371)
|
|
315
|
+
|
|
316
|
+
// =============================================================================
|
|
317
|
+
// CANCELLATION (-380 to -389)
|
|
318
|
+
// Mirrors Swift's ErrorCode: Cancellation
|
|
319
|
+
// =============================================================================
|
|
320
|
+
|
|
321
|
+
/** Operation was cancelled */
|
|
322
|
+
#define RAC_ERROR_CANCELLED ((rac_result_t) - 380)
|
|
323
|
+
|
|
324
|
+
// =============================================================================
|
|
325
|
+
// MODULE/SERVICE ERRORS (-400 to -499)
|
|
326
|
+
// =============================================================================
|
|
327
|
+
|
|
328
|
+
/** Module not found */
|
|
329
|
+
#define RAC_ERROR_MODULE_NOT_FOUND ((rac_result_t) - 400)
|
|
330
|
+
/** Module already registered */
|
|
331
|
+
#define RAC_ERROR_MODULE_ALREADY_REGISTERED ((rac_result_t) - 401)
|
|
332
|
+
/** Module load failed */
|
|
333
|
+
#define RAC_ERROR_MODULE_LOAD_FAILED ((rac_result_t) - 402)
|
|
334
|
+
/** Service not found */
|
|
335
|
+
#define RAC_ERROR_SERVICE_NOT_FOUND ((rac_result_t) - 410)
|
|
336
|
+
/** Service already registered */
|
|
337
|
+
#define RAC_ERROR_SERVICE_ALREADY_REGISTERED ((rac_result_t) - 411)
|
|
338
|
+
/** Service create failed */
|
|
339
|
+
#define RAC_ERROR_SERVICE_CREATE_FAILED ((rac_result_t) - 412)
|
|
340
|
+
/** Capability not found */
|
|
341
|
+
#define RAC_ERROR_CAPABILITY_NOT_FOUND ((rac_result_t) - 420)
|
|
342
|
+
/** Provider not found */
|
|
343
|
+
#define RAC_ERROR_PROVIDER_NOT_FOUND ((rac_result_t) - 421)
|
|
344
|
+
/** No capable provider */
|
|
345
|
+
#define RAC_ERROR_NO_CAPABLE_PROVIDER ((rac_result_t) - 422)
|
|
346
|
+
/** Generic not found */
|
|
347
|
+
#define RAC_ERROR_NOT_FOUND ((rac_result_t) - 423)
|
|
348
|
+
|
|
349
|
+
// =============================================================================
|
|
350
|
+
// PLATFORM ADAPTER ERRORS (-500 to -599)
|
|
351
|
+
// =============================================================================
|
|
352
|
+
|
|
353
|
+
/** Adapter not set */
|
|
354
|
+
#define RAC_ERROR_ADAPTER_NOT_SET ((rac_result_t) - 500)
|
|
355
|
+
|
|
356
|
+
// =============================================================================
|
|
357
|
+
// BACKEND ERRORS (-600 to -699)
|
|
358
|
+
// =============================================================================
|
|
359
|
+
|
|
360
|
+
/** Backend not found */
|
|
361
|
+
#define RAC_ERROR_BACKEND_NOT_FOUND ((rac_result_t) - 600)
|
|
362
|
+
/** Backend not ready */
|
|
363
|
+
#define RAC_ERROR_BACKEND_NOT_READY ((rac_result_t) - 601)
|
|
364
|
+
/** Backend init failed */
|
|
365
|
+
#define RAC_ERROR_BACKEND_INIT_FAILED ((rac_result_t) - 602)
|
|
366
|
+
/** Backend busy */
|
|
367
|
+
#define RAC_ERROR_BACKEND_BUSY ((rac_result_t) - 603)
|
|
368
|
+
/** Invalid handle */
|
|
369
|
+
#define RAC_ERROR_INVALID_HANDLE ((rac_result_t) - 610)
|
|
370
|
+
|
|
371
|
+
// =============================================================================
|
|
372
|
+
// EVENT ERRORS (-700 to -799)
|
|
373
|
+
// =============================================================================
|
|
374
|
+
|
|
375
|
+
/** Invalid event category */
|
|
376
|
+
#define RAC_ERROR_EVENT_INVALID_CATEGORY ((rac_result_t) - 700)
|
|
377
|
+
/** Event subscription failed */
|
|
378
|
+
#define RAC_ERROR_EVENT_SUBSCRIPTION_FAILED ((rac_result_t) - 701)
|
|
379
|
+
/** Event publish failed */
|
|
380
|
+
#define RAC_ERROR_EVENT_PUBLISH_FAILED ((rac_result_t) - 702)
|
|
381
|
+
|
|
382
|
+
// =============================================================================
|
|
383
|
+
// OTHER ERRORS (-800 to -899)
|
|
384
|
+
// Mirrors Swift's ErrorCode: Other Errors
|
|
385
|
+
// =============================================================================
|
|
386
|
+
|
|
387
|
+
/** Feature is not implemented */
|
|
388
|
+
#define RAC_ERROR_NOT_IMPLEMENTED ((rac_result_t) - 800)
|
|
389
|
+
/** Feature is not available */
|
|
390
|
+
#define RAC_ERROR_FEATURE_NOT_AVAILABLE ((rac_result_t) - 801)
|
|
391
|
+
/** Framework is not available */
|
|
392
|
+
#define RAC_ERROR_FRAMEWORK_NOT_AVAILABLE ((rac_result_t) - 802)
|
|
393
|
+
/** Unsupported modality */
|
|
394
|
+
#define RAC_ERROR_UNSUPPORTED_MODALITY ((rac_result_t) - 803)
|
|
395
|
+
/** Unknown error */
|
|
396
|
+
#define RAC_ERROR_UNKNOWN ((rac_result_t) - 804)
|
|
397
|
+
/** Internal error */
|
|
398
|
+
#define RAC_ERROR_INTERNAL ((rac_result_t) - 805)
|
|
399
|
+
|
|
400
|
+
// =============================================================================
|
|
401
|
+
// ERROR MESSAGE API
|
|
402
|
+
// =============================================================================
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Gets a human-readable error message for an error code.
|
|
406
|
+
*
|
|
407
|
+
* @param error_code The error code to get a message for
|
|
408
|
+
* @return A static string describing the error (never NULL)
|
|
409
|
+
*/
|
|
410
|
+
RAC_API const char* rac_error_message(rac_result_t error_code);
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Gets the last detailed error message.
|
|
414
|
+
*
|
|
415
|
+
* This returns additional context beyond the error code, such as file paths
|
|
416
|
+
* or specific failure reasons. Returns NULL if no detailed message is set.
|
|
417
|
+
*
|
|
418
|
+
* @return The last error detail string, or NULL
|
|
419
|
+
*
|
|
420
|
+
* @note The returned string is thread-local and valid until the next
|
|
421
|
+
* RAC function call on the same thread.
|
|
422
|
+
*/
|
|
423
|
+
RAC_API const char* rac_error_get_details(void);
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Sets the detailed error message for the current thread.
|
|
427
|
+
*
|
|
428
|
+
* This is typically called internally by RAC functions to provide
|
|
429
|
+
* additional context for errors.
|
|
430
|
+
*
|
|
431
|
+
* @param details The detail string (will be copied internally)
|
|
432
|
+
*/
|
|
433
|
+
RAC_API void rac_error_set_details(const char* details);
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Clears the detailed error message for the current thread.
|
|
437
|
+
*/
|
|
438
|
+
RAC_API void rac_error_clear_details(void);
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Checks if an error code is in the commons range (-100 to -999).
|
|
442
|
+
*
|
|
443
|
+
* @param error_code The error code to check
|
|
444
|
+
* @return RAC_TRUE if the error is from commons, RAC_FALSE otherwise
|
|
445
|
+
*/
|
|
446
|
+
RAC_API rac_bool_t rac_error_is_commons_error(rac_result_t error_code);
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Checks if an error code is in the core range (0 to -99).
|
|
450
|
+
*
|
|
451
|
+
* @param error_code The error code to check
|
|
452
|
+
* @return RAC_TRUE if the error is from core, RAC_FALSE otherwise
|
|
453
|
+
*/
|
|
454
|
+
RAC_API rac_bool_t rac_error_is_core_error(rac_result_t error_code);
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Checks if an error is expected/routine (like cancellation).
|
|
458
|
+
* Mirrors Swift's ErrorCode.isExpected property.
|
|
459
|
+
*
|
|
460
|
+
* @param error_code The error code to check
|
|
461
|
+
* @return RAC_TRUE if expected, RAC_FALSE otherwise
|
|
462
|
+
*/
|
|
463
|
+
RAC_API rac_bool_t rac_error_is_expected(rac_result_t error_code);
|
|
464
|
+
|
|
465
|
+
#ifdef __cplusplus
|
|
466
|
+
}
|
|
467
|
+
#endif
|
|
468
|
+
|
|
469
|
+
#endif /* RAC_ERROR_H */
|