@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,579 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RunAnywhere React Native SDK - Data Models
|
|
3
|
+
*
|
|
4
|
+
* These interfaces match the iOS Swift SDK data structures.
|
|
5
|
+
* Reference: sdk/runanywhere-swift/Sources/RunAnywhere/
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type {
|
|
9
|
+
ConfigurationSource,
|
|
10
|
+
ExecutionTarget,
|
|
11
|
+
HardwareAcceleration,
|
|
12
|
+
LLMFramework,
|
|
13
|
+
ModelCategory,
|
|
14
|
+
ModelFormat,
|
|
15
|
+
SDKEnvironment,
|
|
16
|
+
} from './enums';
|
|
17
|
+
|
|
18
|
+
// Structured output types (inline definitions since handler was deleted)
|
|
19
|
+
export type GeneratableType = 'string' | 'number' | 'boolean' | 'object' | 'array';
|
|
20
|
+
|
|
21
|
+
export interface StructuredOutputConfig {
|
|
22
|
+
schema?: Record<string, unknown>;
|
|
23
|
+
jsonMode?: boolean;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface StructuredOutputValidation {
|
|
27
|
+
isValid: boolean;
|
|
28
|
+
errors?: string[];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// ============================================================================
|
|
32
|
+
// Model Information
|
|
33
|
+
// ============================================================================
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Thinking tag pattern for reasoning models
|
|
37
|
+
*/
|
|
38
|
+
export interface ThinkingTagPattern {
|
|
39
|
+
openTag: string;
|
|
40
|
+
closeTag: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Model metadata
|
|
45
|
+
*/
|
|
46
|
+
export interface ModelInfoMetadata {
|
|
47
|
+
description?: string;
|
|
48
|
+
author?: string;
|
|
49
|
+
license?: string;
|
|
50
|
+
tags?: string[];
|
|
51
|
+
version?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Information about a model
|
|
56
|
+
* Reference: ModelInfo.swift
|
|
57
|
+
*/
|
|
58
|
+
export interface ModelInfo {
|
|
59
|
+
/** Unique identifier */
|
|
60
|
+
id: string;
|
|
61
|
+
|
|
62
|
+
/** Human-readable name */
|
|
63
|
+
name: string;
|
|
64
|
+
|
|
65
|
+
/** Model category (language, speech, vision, etc.) */
|
|
66
|
+
category: ModelCategory;
|
|
67
|
+
|
|
68
|
+
/** Model file format */
|
|
69
|
+
format: ModelFormat;
|
|
70
|
+
|
|
71
|
+
/** Download URL (if remote) */
|
|
72
|
+
downloadURL?: string;
|
|
73
|
+
|
|
74
|
+
/** Local file path (if downloaded) */
|
|
75
|
+
localPath?: string;
|
|
76
|
+
|
|
77
|
+
/** Download size in bytes */
|
|
78
|
+
downloadSize?: number;
|
|
79
|
+
|
|
80
|
+
/** Memory required to run the model in bytes */
|
|
81
|
+
memoryRequired?: number;
|
|
82
|
+
|
|
83
|
+
/** Compatible frameworks */
|
|
84
|
+
compatibleFrameworks: LLMFramework[];
|
|
85
|
+
|
|
86
|
+
/** Preferred framework for this model */
|
|
87
|
+
preferredFramework?: LLMFramework;
|
|
88
|
+
|
|
89
|
+
/** Context length for language models */
|
|
90
|
+
contextLength?: number;
|
|
91
|
+
|
|
92
|
+
/** Whether the model supports thinking/reasoning */
|
|
93
|
+
supportsThinking: boolean;
|
|
94
|
+
|
|
95
|
+
/** Custom thinking pattern if supportsThinking */
|
|
96
|
+
thinkingPattern?: ThinkingTagPattern;
|
|
97
|
+
|
|
98
|
+
/** Optional metadata */
|
|
99
|
+
metadata?: ModelInfoMetadata;
|
|
100
|
+
|
|
101
|
+
/** Configuration source */
|
|
102
|
+
source: ConfigurationSource;
|
|
103
|
+
|
|
104
|
+
/** Creation timestamp */
|
|
105
|
+
createdAt: string;
|
|
106
|
+
|
|
107
|
+
/** Last update timestamp */
|
|
108
|
+
updatedAt: string;
|
|
109
|
+
|
|
110
|
+
/** Whether sync is pending */
|
|
111
|
+
syncPending: boolean;
|
|
112
|
+
|
|
113
|
+
/** Last used timestamp */
|
|
114
|
+
lastUsed?: string;
|
|
115
|
+
|
|
116
|
+
/** Usage count */
|
|
117
|
+
usageCount: number;
|
|
118
|
+
|
|
119
|
+
/** Whether the model is downloaded */
|
|
120
|
+
isDownloaded: boolean;
|
|
121
|
+
|
|
122
|
+
/** Whether the model is available for use */
|
|
123
|
+
isAvailable: boolean;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// ============================================================================
|
|
127
|
+
// Generation Types
|
|
128
|
+
// ============================================================================
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Performance metrics for generation
|
|
132
|
+
* Reference: GenerationResult.swift
|
|
133
|
+
*/
|
|
134
|
+
export interface PerformanceMetrics {
|
|
135
|
+
/** Time to first token in milliseconds */
|
|
136
|
+
timeToFirstTokenMs?: number;
|
|
137
|
+
|
|
138
|
+
/** Tokens generated per second */
|
|
139
|
+
tokensPerSecond?: number;
|
|
140
|
+
|
|
141
|
+
/** Total inference time in milliseconds */
|
|
142
|
+
inferenceTimeMs: number;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Structured output types are defined above
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Result of a text generation request
|
|
149
|
+
* Reference: GenerationResult.swift
|
|
150
|
+
*/
|
|
151
|
+
export interface GenerationResult {
|
|
152
|
+
/** Generated text (with thinking content removed if extracted) */
|
|
153
|
+
text: string;
|
|
154
|
+
|
|
155
|
+
/** Thinking/reasoning content extracted from the response */
|
|
156
|
+
thinkingContent?: string;
|
|
157
|
+
|
|
158
|
+
/** Number of tokens used */
|
|
159
|
+
tokensUsed: number;
|
|
160
|
+
|
|
161
|
+
/** Model used for generation */
|
|
162
|
+
modelUsed: string;
|
|
163
|
+
|
|
164
|
+
/** Latency in milliseconds */
|
|
165
|
+
latencyMs: number;
|
|
166
|
+
|
|
167
|
+
/** Execution target (device/cloud/hybrid) */
|
|
168
|
+
executionTarget: ExecutionTarget;
|
|
169
|
+
|
|
170
|
+
/** Amount saved by using on-device execution */
|
|
171
|
+
savedAmount: number;
|
|
172
|
+
|
|
173
|
+
/** Framework used for generation (if on-device) */
|
|
174
|
+
framework?: LLMFramework;
|
|
175
|
+
|
|
176
|
+
/** Hardware acceleration used */
|
|
177
|
+
hardwareUsed: HardwareAcceleration;
|
|
178
|
+
|
|
179
|
+
/** Memory used during generation (in bytes) */
|
|
180
|
+
memoryUsed: number;
|
|
181
|
+
|
|
182
|
+
/** Detailed performance metrics */
|
|
183
|
+
performanceMetrics: PerformanceMetrics;
|
|
184
|
+
|
|
185
|
+
/** Structured output validation result */
|
|
186
|
+
structuredOutputValidation?: StructuredOutputValidation;
|
|
187
|
+
|
|
188
|
+
/** Number of tokens used for thinking/reasoning */
|
|
189
|
+
thinkingTokens?: number;
|
|
190
|
+
|
|
191
|
+
/** Number of tokens in the actual response content */
|
|
192
|
+
responseTokens: number;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Options for text generation
|
|
197
|
+
* Reference: GenerationOptions.swift
|
|
198
|
+
*/
|
|
199
|
+
export interface GenerationOptions {
|
|
200
|
+
/** Maximum number of tokens to generate */
|
|
201
|
+
maxTokens?: number;
|
|
202
|
+
|
|
203
|
+
/** Temperature for sampling (0.0 - 1.0) */
|
|
204
|
+
temperature?: number;
|
|
205
|
+
|
|
206
|
+
/** Top-p sampling parameter */
|
|
207
|
+
topP?: number;
|
|
208
|
+
|
|
209
|
+
/** Enable real-time tracking for cost dashboard */
|
|
210
|
+
enableRealTimeTracking?: boolean;
|
|
211
|
+
|
|
212
|
+
/** Stop sequences */
|
|
213
|
+
stopSequences?: string[];
|
|
214
|
+
|
|
215
|
+
/** Enable streaming mode */
|
|
216
|
+
streamingEnabled?: boolean;
|
|
217
|
+
|
|
218
|
+
/** Preferred execution target */
|
|
219
|
+
preferredExecutionTarget?: ExecutionTarget;
|
|
220
|
+
|
|
221
|
+
/** Preferred framework for generation */
|
|
222
|
+
preferredFramework?: LLMFramework;
|
|
223
|
+
|
|
224
|
+
/** Structured output configuration */
|
|
225
|
+
structuredOutput?: StructuredOutputConfig;
|
|
226
|
+
|
|
227
|
+
/** System prompt to define AI behavior */
|
|
228
|
+
systemPrompt?: string;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Alias for GenerationOptions to match iOS SDK naming convention.
|
|
233
|
+
* @see GenerationOptions
|
|
234
|
+
*/
|
|
235
|
+
export type LLMGenerationOptions = GenerationOptions;
|
|
236
|
+
|
|
237
|
+
// ============================================================================
|
|
238
|
+
// Voice Types
|
|
239
|
+
// ============================================================================
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Voice audio chunk for streaming
|
|
243
|
+
*/
|
|
244
|
+
export interface VoiceAudioChunk {
|
|
245
|
+
/** Float32 audio samples (base64 encoded) */
|
|
246
|
+
samples: string;
|
|
247
|
+
|
|
248
|
+
/** Timestamp */
|
|
249
|
+
timestamp: number;
|
|
250
|
+
|
|
251
|
+
/** Sample rate */
|
|
252
|
+
sampleRate: number;
|
|
253
|
+
|
|
254
|
+
/** Number of channels */
|
|
255
|
+
channels: number;
|
|
256
|
+
|
|
257
|
+
/** Sequence number */
|
|
258
|
+
sequenceNumber: number;
|
|
259
|
+
|
|
260
|
+
/** Whether this is the final chunk */
|
|
261
|
+
isFinal: boolean;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* STT segment with timing information
|
|
266
|
+
*/
|
|
267
|
+
export interface STTSegment {
|
|
268
|
+
/** Transcribed text */
|
|
269
|
+
text: string;
|
|
270
|
+
|
|
271
|
+
/** Start time in seconds */
|
|
272
|
+
startTime: number;
|
|
273
|
+
|
|
274
|
+
/** End time in seconds */
|
|
275
|
+
endTime: number;
|
|
276
|
+
|
|
277
|
+
/** Speaker ID if diarization is enabled */
|
|
278
|
+
speakerId?: string;
|
|
279
|
+
|
|
280
|
+
/** Confidence score */
|
|
281
|
+
confidence: number;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* STT alternative transcription
|
|
286
|
+
*/
|
|
287
|
+
export interface STTAlternative {
|
|
288
|
+
/** Alternative text */
|
|
289
|
+
text: string;
|
|
290
|
+
|
|
291
|
+
/** Confidence score */
|
|
292
|
+
confidence: number;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Speech-to-text result
|
|
297
|
+
*/
|
|
298
|
+
export interface STTResult {
|
|
299
|
+
/** Main transcription text */
|
|
300
|
+
text: string;
|
|
301
|
+
|
|
302
|
+
/** Segments with timing */
|
|
303
|
+
segments: STTSegment[];
|
|
304
|
+
|
|
305
|
+
/** Detected language */
|
|
306
|
+
language?: string;
|
|
307
|
+
|
|
308
|
+
/** Overall confidence */
|
|
309
|
+
confidence: number;
|
|
310
|
+
|
|
311
|
+
/** Duration in seconds */
|
|
312
|
+
duration: number;
|
|
313
|
+
|
|
314
|
+
/** Alternative transcriptions */
|
|
315
|
+
alternatives: STTAlternative[];
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* STT options for transcription
|
|
320
|
+
*/
|
|
321
|
+
export interface STTOptions {
|
|
322
|
+
/** Language code (e.g., 'en', 'es') */
|
|
323
|
+
language?: string;
|
|
324
|
+
|
|
325
|
+
/** Enable punctuation */
|
|
326
|
+
punctuation?: boolean;
|
|
327
|
+
|
|
328
|
+
/** Enable speaker diarization */
|
|
329
|
+
diarization?: boolean;
|
|
330
|
+
|
|
331
|
+
/** Enable word timestamps */
|
|
332
|
+
wordTimestamps?: boolean;
|
|
333
|
+
|
|
334
|
+
/** Sample rate */
|
|
335
|
+
sampleRate?: number;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* TTS configuration
|
|
340
|
+
*/
|
|
341
|
+
export interface TTSConfiguration {
|
|
342
|
+
/** Voice identifier */
|
|
343
|
+
voice?: string;
|
|
344
|
+
|
|
345
|
+
/** Speech rate (0.5 - 2.0) */
|
|
346
|
+
rate?: number;
|
|
347
|
+
|
|
348
|
+
/** Pitch (0.5 - 2.0) */
|
|
349
|
+
pitch?: number;
|
|
350
|
+
|
|
351
|
+
/** Volume (0.0 - 1.0) */
|
|
352
|
+
volume?: number;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* TTS synthesis result
|
|
357
|
+
*/
|
|
358
|
+
export interface TTSResult {
|
|
359
|
+
/** Base64 encoded audio data */
|
|
360
|
+
audio: string;
|
|
361
|
+
|
|
362
|
+
/** Sample rate of the audio */
|
|
363
|
+
sampleRate: number;
|
|
364
|
+
|
|
365
|
+
/** Number of samples */
|
|
366
|
+
numSamples: number;
|
|
367
|
+
|
|
368
|
+
/** Duration in seconds */
|
|
369
|
+
duration: number;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* VAD configuration
|
|
374
|
+
*/
|
|
375
|
+
export interface VADConfiguration {
|
|
376
|
+
/** Energy threshold */
|
|
377
|
+
energyThreshold?: number;
|
|
378
|
+
|
|
379
|
+
/** Sample rate */
|
|
380
|
+
sampleRate?: number;
|
|
381
|
+
|
|
382
|
+
/** Frame length in milliseconds */
|
|
383
|
+
frameLength?: number;
|
|
384
|
+
|
|
385
|
+
/** Enable auto calibration */
|
|
386
|
+
autoCalibration?: boolean;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
// ============================================================================
|
|
390
|
+
// Configuration Types
|
|
391
|
+
// ============================================================================
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Configuration data returned by the native SDK
|
|
395
|
+
*/
|
|
396
|
+
export interface ConfigurationData {
|
|
397
|
+
/** Current environment */
|
|
398
|
+
environment: SDKEnvironment;
|
|
399
|
+
|
|
400
|
+
/** API key (masked for security) */
|
|
401
|
+
apiKey?: string;
|
|
402
|
+
|
|
403
|
+
/** Base URL for API requests */
|
|
404
|
+
baseURL?: string;
|
|
405
|
+
|
|
406
|
+
/** Configuration source */
|
|
407
|
+
source: ConfigurationSource;
|
|
408
|
+
|
|
409
|
+
/** Default generation settings */
|
|
410
|
+
defaultGenerationSettings?: DefaultGenerationSettings;
|
|
411
|
+
|
|
412
|
+
/** Feature flags */
|
|
413
|
+
featureFlags?: Record<string, boolean>;
|
|
414
|
+
|
|
415
|
+
/** Last updated timestamp */
|
|
416
|
+
lastUpdated?: string;
|
|
417
|
+
|
|
418
|
+
/** Additional configuration values */
|
|
419
|
+
[key: string]: unknown;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* SDK initialization options
|
|
424
|
+
*/
|
|
425
|
+
export interface SDKInitOptions {
|
|
426
|
+
/** API key for authentication (production/staging) */
|
|
427
|
+
apiKey?: string;
|
|
428
|
+
|
|
429
|
+
/** Base URL for API requests (production: Railway endpoint) */
|
|
430
|
+
baseURL?: string;
|
|
431
|
+
|
|
432
|
+
/** SDK environment */
|
|
433
|
+
environment?: SDKEnvironment;
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Supabase project URL (development mode)
|
|
437
|
+
* When set, SDK makes calls directly to Supabase
|
|
438
|
+
*/
|
|
439
|
+
supabaseURL?: string;
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Supabase anon key (development mode)
|
|
443
|
+
*/
|
|
444
|
+
supabaseKey?: string;
|
|
445
|
+
|
|
446
|
+
/** Enable debug logging */
|
|
447
|
+
debug?: boolean;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Default generation settings
|
|
452
|
+
*/
|
|
453
|
+
export interface DefaultGenerationSettings {
|
|
454
|
+
maxTokens: number;
|
|
455
|
+
temperature: number;
|
|
456
|
+
topP: number;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Storage information
|
|
461
|
+
*/
|
|
462
|
+
export interface StorageInfo {
|
|
463
|
+
/** Total storage available in bytes */
|
|
464
|
+
totalSpace: number;
|
|
465
|
+
|
|
466
|
+
/** Storage used by SDK in bytes */
|
|
467
|
+
usedSpace: number;
|
|
468
|
+
|
|
469
|
+
/** Free space available in bytes */
|
|
470
|
+
freeSpace: number;
|
|
471
|
+
|
|
472
|
+
/** Models storage path */
|
|
473
|
+
modelsPath: string;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Stored model information
|
|
478
|
+
*/
|
|
479
|
+
export interface StoredModel {
|
|
480
|
+
/** Model ID */
|
|
481
|
+
id: string;
|
|
482
|
+
|
|
483
|
+
/** Model name */
|
|
484
|
+
name: string;
|
|
485
|
+
|
|
486
|
+
/** Size on disk in bytes */
|
|
487
|
+
sizeOnDisk: number;
|
|
488
|
+
|
|
489
|
+
/** Download date */
|
|
490
|
+
downloadedAt: string;
|
|
491
|
+
|
|
492
|
+
/** Last used date */
|
|
493
|
+
lastUsed?: string;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
// ============================================================================
|
|
497
|
+
// Device Types
|
|
498
|
+
// ============================================================================
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Device information
|
|
502
|
+
*/
|
|
503
|
+
export interface DeviceInfoData {
|
|
504
|
+
/** Device model */
|
|
505
|
+
model: string;
|
|
506
|
+
|
|
507
|
+
/** Device name */
|
|
508
|
+
name: string;
|
|
509
|
+
|
|
510
|
+
/** OS version */
|
|
511
|
+
osVersion: string;
|
|
512
|
+
|
|
513
|
+
/** Chip/processor name */
|
|
514
|
+
chipName: string;
|
|
515
|
+
|
|
516
|
+
/** Total memory in bytes */
|
|
517
|
+
totalMemory: number;
|
|
518
|
+
|
|
519
|
+
/** Whether device has Neural Engine */
|
|
520
|
+
hasNeuralEngine: boolean;
|
|
521
|
+
|
|
522
|
+
/** Processor architecture */
|
|
523
|
+
architecture: string;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Framework availability information
|
|
528
|
+
*/
|
|
529
|
+
export interface FrameworkAvailability {
|
|
530
|
+
/** Framework */
|
|
531
|
+
framework: LLMFramework;
|
|
532
|
+
|
|
533
|
+
/** Whether available */
|
|
534
|
+
isAvailable: boolean;
|
|
535
|
+
|
|
536
|
+
/** Reason if not available */
|
|
537
|
+
reason?: string;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
// ============================================================================
|
|
541
|
+
// Component Types
|
|
542
|
+
// ============================================================================
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* Initialization result for components
|
|
546
|
+
*/
|
|
547
|
+
export interface InitializationResult {
|
|
548
|
+
/** Whether initialization succeeded */
|
|
549
|
+
success: boolean;
|
|
550
|
+
|
|
551
|
+
/** Components that are ready */
|
|
552
|
+
readyComponents: string[];
|
|
553
|
+
|
|
554
|
+
/** Components that failed */
|
|
555
|
+
failedComponents: string[];
|
|
556
|
+
|
|
557
|
+
/** Error message if failed */
|
|
558
|
+
error?: string;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* Component health information
|
|
563
|
+
*/
|
|
564
|
+
export interface ComponentHealth {
|
|
565
|
+
/** Component identifier */
|
|
566
|
+
component: string;
|
|
567
|
+
|
|
568
|
+
/** Whether healthy */
|
|
569
|
+
isHealthy: boolean;
|
|
570
|
+
|
|
571
|
+
/** Last check timestamp */
|
|
572
|
+
lastCheck: string;
|
|
573
|
+
|
|
574
|
+
/** Memory usage in bytes */
|
|
575
|
+
memoryUsage?: number;
|
|
576
|
+
|
|
577
|
+
/** Error message if unhealthy */
|
|
578
|
+
error?: string;
|
|
579
|
+
}
|