@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.
Files changed (354) hide show
  1. package/RunAnywhereCore.podspec +130 -0
  2. package/android/CMakeLists.txt +92 -0
  3. package/android/build.gradle +321 -0
  4. package/android/consumer-rules.pro +5 -0
  5. package/android/src/main/AndroidManifest.xml +3 -0
  6. package/android/src/main/cpp/cpp-adapter.cpp +271 -0
  7. package/android/src/main/include/rac/backends/rac_llm_llamacpp.h +218 -0
  8. package/android/src/main/include/rac/backends/rac_stt_onnx.h +99 -0
  9. package/android/src/main/include/rac/backends/rac_stt_whispercpp.h +153 -0
  10. package/android/src/main/include/rac/backends/rac_tts_onnx.h +71 -0
  11. package/android/src/main/include/rac/backends/rac_vad_onnx.h +84 -0
  12. package/android/src/main/include/rac/core/capabilities/rac_lifecycle.h +290 -0
  13. package/android/src/main/include/rac/core/rac_analytics_events.h +610 -0
  14. package/android/src/main/include/rac/core/rac_audio_utils.h +88 -0
  15. package/android/src/main/include/rac/core/rac_component_types.h +160 -0
  16. package/android/src/main/include/rac/core/rac_core.h +331 -0
  17. package/android/src/main/include/rac/core/rac_error.h +469 -0
  18. package/android/src/main/include/rac/core/rac_events.h +334 -0
  19. package/android/src/main/include/rac/core/rac_logger.h +416 -0
  20. package/android/src/main/include/rac/core/rac_platform_adapter.h +340 -0
  21. package/android/src/main/include/rac/core/rac_sdk_state.h +292 -0
  22. package/android/src/main/include/rac/core/rac_structured_error.h +594 -0
  23. package/android/src/main/include/rac/core/rac_types.h +264 -0
  24. package/android/src/main/include/rac/features/llm/rac_llm.h +17 -0
  25. package/android/src/main/include/rac/features/llm/rac_llm_analytics.h +188 -0
  26. package/android/src/main/include/rac/features/llm/rac_llm_component.h +228 -0
  27. package/android/src/main/include/rac/features/llm/rac_llm_events.h +215 -0
  28. package/android/src/main/include/rac/features/llm/rac_llm_metrics.h +402 -0
  29. package/android/src/main/include/rac/features/llm/rac_llm_service.h +163 -0
  30. package/android/src/main/include/rac/features/llm/rac_llm_structured_output.h +141 -0
  31. package/android/src/main/include/rac/features/llm/rac_llm_types.h +384 -0
  32. package/android/src/main/include/rac/features/platform/rac_llm_platform.h +204 -0
  33. package/android/src/main/include/rac/features/platform/rac_tts_platform.h +197 -0
  34. package/android/src/main/include/rac/features/stt/rac_stt.h +17 -0
  35. package/android/src/main/include/rac/features/stt/rac_stt_analytics.h +204 -0
  36. package/android/src/main/include/rac/features/stt/rac_stt_component.h +162 -0
  37. package/android/src/main/include/rac/features/stt/rac_stt_events.h +62 -0
  38. package/android/src/main/include/rac/features/stt/rac_stt_service.h +154 -0
  39. package/android/src/main/include/rac/features/stt/rac_stt_types.h +389 -0
  40. package/android/src/main/include/rac/features/tts/rac_tts.h +17 -0
  41. package/android/src/main/include/rac/features/tts/rac_tts_analytics.h +181 -0
  42. package/android/src/main/include/rac/features/tts/rac_tts_component.h +158 -0
  43. package/android/src/main/include/rac/features/tts/rac_tts_events.h +54 -0
  44. package/android/src/main/include/rac/features/tts/rac_tts_service.h +162 -0
  45. package/android/src/main/include/rac/features/tts/rac_tts_types.h +374 -0
  46. package/android/src/main/include/rac/features/vad/rac_vad.h +17 -0
  47. package/android/src/main/include/rac/features/vad/rac_vad_analytics.h +236 -0
  48. package/android/src/main/include/rac/features/vad/rac_vad_component.h +185 -0
  49. package/android/src/main/include/rac/features/vad/rac_vad_energy.h +443 -0
  50. package/android/src/main/include/rac/features/vad/rac_vad_events.h +76 -0
  51. package/android/src/main/include/rac/features/vad/rac_vad_service.h +167 -0
  52. package/android/src/main/include/rac/features/vad/rac_vad_types.h +244 -0
  53. package/android/src/main/include/rac/features/voice_agent/rac_voice_agent.h +612 -0
  54. package/android/src/main/include/rac/infrastructure/device/rac_device_manager.h +176 -0
  55. package/android/src/main/include/rac/infrastructure/download/rac_download.h +418 -0
  56. package/android/src/main/include/rac/infrastructure/events/rac_events.h +177 -0
  57. package/android/src/main/include/rac/infrastructure/model_management/rac_model_assignment.h +169 -0
  58. package/android/src/main/include/rac/infrastructure/model_management/rac_model_paths.h +258 -0
  59. package/android/src/main/include/rac/infrastructure/model_management/rac_model_registry.h +357 -0
  60. package/android/src/main/include/rac/infrastructure/model_management/rac_model_strategy.h +374 -0
  61. package/android/src/main/include/rac/infrastructure/model_management/rac_model_types.h +613 -0
  62. package/android/src/main/include/rac/infrastructure/network/rac_api_types.h +335 -0
  63. package/android/src/main/include/rac/infrastructure/network/rac_auth_manager.h +252 -0
  64. package/android/src/main/include/rac/infrastructure/network/rac_dev_config.h +85 -0
  65. package/android/src/main/include/rac/infrastructure/network/rac_endpoints.h +102 -0
  66. package/android/src/main/include/rac/infrastructure/network/rac_environment.h +220 -0
  67. package/android/src/main/include/rac/infrastructure/network/rac_http_client.h +233 -0
  68. package/android/src/main/include/rac/infrastructure/storage/rac_storage_analyzer.h +286 -0
  69. package/android/src/main/include/rac/infrastructure/telemetry/rac_telemetry_manager.h +206 -0
  70. package/android/src/main/include/rac/infrastructure/telemetry/rac_telemetry_types.h +234 -0
  71. package/android/src/main/java/com/margelo/nitro/runanywhere/ArchiveUtility.kt +308 -0
  72. package/android/src/main/java/com/margelo/nitro/runanywhere/HybridRunAnywhereDeviceInfo.kt +229 -0
  73. package/android/src/main/java/com/margelo/nitro/runanywhere/PlatformAdapterBridge.kt +392 -0
  74. package/android/src/main/java/com/margelo/nitro/runanywhere/RunAnywhereCorePackage.kt +28 -0
  75. package/android/src/main/java/com/margelo/nitro/runanywhere/SDKLogger.kt +357 -0
  76. package/android/src/main/java/com/margelo/nitro/runanywhere/SecureStorageManager.kt +147 -0
  77. package/android/src/main/jniLibs/arm64-v8a/libc++_shared.so +0 -0
  78. package/android/src/main/jniLibs/arm64-v8a/libomp.so +0 -0
  79. package/android/src/main/jniLibs/arm64-v8a/librac_commons.so +0 -0
  80. package/android/src/main/jniLibs/arm64-v8a/librunanywhere_jni.so +0 -0
  81. package/cpp/HybridRunAnywhereCore.cpp +2505 -0
  82. package/cpp/HybridRunAnywhereCore.hpp +271 -0
  83. package/cpp/bridges/AuthBridge.cpp +209 -0
  84. package/cpp/bridges/AuthBridge.hpp +157 -0
  85. package/cpp/bridges/DeviceBridge.cpp +257 -0
  86. package/cpp/bridges/DeviceBridge.hpp +155 -0
  87. package/cpp/bridges/DownloadBridge.cpp +299 -0
  88. package/cpp/bridges/DownloadBridge.hpp +197 -0
  89. package/cpp/bridges/EventBridge.cpp +125 -0
  90. package/cpp/bridges/EventBridge.hpp +139 -0
  91. package/cpp/bridges/HTTPBridge.cpp +96 -0
  92. package/cpp/bridges/HTTPBridge.hpp +144 -0
  93. package/cpp/bridges/InitBridge.cpp +1273 -0
  94. package/cpp/bridges/InitBridge.hpp +306 -0
  95. package/cpp/bridges/ModelRegistryBridge.cpp +394 -0
  96. package/cpp/bridges/ModelRegistryBridge.hpp +177 -0
  97. package/cpp/bridges/StorageBridge.cpp +269 -0
  98. package/cpp/bridges/StorageBridge.hpp +172 -0
  99. package/cpp/bridges/TelemetryBridge.cpp +352 -0
  100. package/cpp/bridges/TelemetryBridge.hpp +126 -0
  101. package/ios/.testlocal +0 -0
  102. package/ios/ArchiveUtility.swift +526 -0
  103. package/ios/ArchiveUtilityBridge.m +52 -0
  104. package/ios/AudioDecoder.h +38 -0
  105. package/ios/AudioDecoder.m +162 -0
  106. package/ios/Binaries/RACommons.xcframework/Info.plist +44 -0
  107. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/RACommons.h +67 -0
  108. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_analytics_events.h +610 -0
  109. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_api_types.h +335 -0
  110. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_audio_utils.h +88 -0
  111. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_auth_manager.h +252 -0
  112. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_component_types.h +160 -0
  113. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_core.h +331 -0
  114. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_dev_config.h +85 -0
  115. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_device_manager.h +176 -0
  116. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_download.h +418 -0
  117. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_endpoints.h +102 -0
  118. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_environment.h +220 -0
  119. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_error.h +469 -0
  120. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_events.h +177 -0
  121. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_http_client.h +233 -0
  122. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_lifecycle.h +290 -0
  123. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm.h +17 -0
  124. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_analytics.h +188 -0
  125. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_component.h +228 -0
  126. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_events.h +215 -0
  127. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_llamacpp.h +218 -0
  128. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_metrics.h +402 -0
  129. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_platform.h +204 -0
  130. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_service.h +163 -0
  131. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_structured_output.h +141 -0
  132. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_types.h +384 -0
  133. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_logger.h +416 -0
  134. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_assignment.h +169 -0
  135. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_paths.h +258 -0
  136. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_registry.h +357 -0
  137. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_strategy.h +374 -0
  138. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_types.h +613 -0
  139. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_platform_adapter.h +340 -0
  140. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_sdk_state.h +292 -0
  141. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_storage_analyzer.h +286 -0
  142. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_structured_error.h +594 -0
  143. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt.h +17 -0
  144. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_analytics.h +204 -0
  145. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_component.h +162 -0
  146. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_events.h +62 -0
  147. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_onnx.h +99 -0
  148. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_service.h +154 -0
  149. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_types.h +389 -0
  150. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_whispercpp.h +153 -0
  151. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_telemetry_manager.h +206 -0
  152. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_telemetry_types.h +234 -0
  153. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts.h +17 -0
  154. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_analytics.h +181 -0
  155. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_component.h +158 -0
  156. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_events.h +54 -0
  157. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_onnx.h +71 -0
  158. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_platform.h +197 -0
  159. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_service.h +162 -0
  160. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_types.h +374 -0
  161. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_types.h +264 -0
  162. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad.h +17 -0
  163. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_analytics.h +236 -0
  164. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_component.h +185 -0
  165. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_energy.h +443 -0
  166. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_events.h +76 -0
  167. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_onnx.h +84 -0
  168. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_service.h +167 -0
  169. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_types.h +244 -0
  170. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_voice_agent.h +612 -0
  171. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Info.plist +11 -0
  172. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Modules/module.modulemap +5 -0
  173. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/RACommons +0 -0
  174. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/RACommons.h +67 -0
  175. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_analytics_events.h +610 -0
  176. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_api_types.h +335 -0
  177. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_audio_utils.h +88 -0
  178. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_auth_manager.h +252 -0
  179. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_component_types.h +160 -0
  180. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_core.h +331 -0
  181. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_dev_config.h +85 -0
  182. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_device_manager.h +176 -0
  183. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_download.h +418 -0
  184. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_endpoints.h +102 -0
  185. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_environment.h +220 -0
  186. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_error.h +469 -0
  187. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_events.h +177 -0
  188. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_http_client.h +233 -0
  189. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_lifecycle.h +290 -0
  190. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm.h +17 -0
  191. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_analytics.h +188 -0
  192. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_component.h +228 -0
  193. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_events.h +215 -0
  194. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_llamacpp.h +218 -0
  195. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_metrics.h +402 -0
  196. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_platform.h +204 -0
  197. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_service.h +163 -0
  198. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_structured_output.h +141 -0
  199. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_types.h +384 -0
  200. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_logger.h +416 -0
  201. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_assignment.h +169 -0
  202. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_paths.h +258 -0
  203. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_registry.h +357 -0
  204. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_strategy.h +374 -0
  205. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_types.h +613 -0
  206. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_platform_adapter.h +340 -0
  207. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_sdk_state.h +292 -0
  208. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_storage_analyzer.h +286 -0
  209. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_structured_error.h +594 -0
  210. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt.h +17 -0
  211. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_analytics.h +204 -0
  212. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_component.h +162 -0
  213. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_events.h +62 -0
  214. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_onnx.h +99 -0
  215. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_service.h +154 -0
  216. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_types.h +389 -0
  217. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_whispercpp.h +153 -0
  218. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_telemetry_manager.h +206 -0
  219. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_telemetry_types.h +234 -0
  220. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts.h +17 -0
  221. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_analytics.h +181 -0
  222. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_component.h +158 -0
  223. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_events.h +54 -0
  224. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_onnx.h +71 -0
  225. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_platform.h +197 -0
  226. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_service.h +162 -0
  227. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_types.h +374 -0
  228. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_types.h +264 -0
  229. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad.h +17 -0
  230. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_analytics.h +236 -0
  231. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_component.h +185 -0
  232. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_energy.h +443 -0
  233. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_events.h +76 -0
  234. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_onnx.h +84 -0
  235. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_service.h +167 -0
  236. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_types.h +244 -0
  237. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_voice_agent.h +612 -0
  238. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Info.plist +11 -0
  239. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Modules/module.modulemap +5 -0
  240. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/RACommons +0 -0
  241. package/ios/HybridRunAnywhereDeviceInfo.swift +214 -0
  242. package/ios/KeychainManager.swift +116 -0
  243. package/ios/PlatformAdapter.swift +100 -0
  244. package/ios/PlatformAdapterBridge.h +152 -0
  245. package/ios/PlatformAdapterBridge.m +570 -0
  246. package/ios/RNSDKLoggerBridge.h +41 -0
  247. package/ios/RNSDKLoggerBridge.m +66 -0
  248. package/ios/SDKLogger.swift +329 -0
  249. package/nitro.json +20 -0
  250. package/nitrogen/generated/.gitattributes +1 -0
  251. package/nitrogen/generated/android/c++/JHybridRunAnywhereDeviceInfoSpec.cpp +257 -0
  252. package/nitrogen/generated/android/c++/JHybridRunAnywhereDeviceInfoSpec.hpp +77 -0
  253. package/nitrogen/generated/android/kotlin/com/margelo/nitro/runanywhere/HybridRunAnywhereDeviceInfoSpec.kt +106 -0
  254. package/nitrogen/generated/android/kotlin/com/margelo/nitro/runanywhere/runanywherecoreOnLoad.kt +35 -0
  255. package/nitrogen/generated/android/runanywherecore+autolinking.cmake +82 -0
  256. package/nitrogen/generated/android/runanywherecore+autolinking.gradle +27 -0
  257. package/nitrogen/generated/android/runanywherecoreOnLoad.cpp +54 -0
  258. package/nitrogen/generated/android/runanywherecoreOnLoad.hpp +25 -0
  259. package/nitrogen/generated/ios/RunAnywhereCore+autolinking.rb +60 -0
  260. package/nitrogen/generated/ios/RunAnywhereCore-Swift-Cxx-Bridge.cpp +65 -0
  261. package/nitrogen/generated/ios/RunAnywhereCore-Swift-Cxx-Bridge.hpp +197 -0
  262. package/nitrogen/generated/ios/RunAnywhereCore-Swift-Cxx-Umbrella.hpp +45 -0
  263. package/nitrogen/generated/ios/RunAnywhereCoreAutolinking.mm +43 -0
  264. package/nitrogen/generated/ios/RunAnywhereCoreAutolinking.swift +25 -0
  265. package/nitrogen/generated/ios/c++/HybridRunAnywhereDeviceInfoSpecSwift.cpp +11 -0
  266. package/nitrogen/generated/ios/c++/HybridRunAnywhereDeviceInfoSpecSwift.hpp +173 -0
  267. package/nitrogen/generated/ios/swift/Func_void_bool.swift +47 -0
  268. package/nitrogen/generated/ios/swift/Func_void_double.swift +47 -0
  269. package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
  270. package/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
  271. package/nitrogen/generated/ios/swift/HybridRunAnywhereDeviceInfoSpec.swift +68 -0
  272. package/nitrogen/generated/ios/swift/HybridRunAnywhereDeviceInfoSpec_cxx.swift +366 -0
  273. package/nitrogen/generated/shared/c++/HybridRunAnywhereCoreSpec.cpp +92 -0
  274. package/nitrogen/generated/shared/c++/HybridRunAnywhereCoreSpec.hpp +138 -0
  275. package/nitrogen/generated/shared/c++/HybridRunAnywhereDeviceInfoSpec.cpp +33 -0
  276. package/nitrogen/generated/shared/c++/HybridRunAnywhereDeviceInfoSpec.hpp +75 -0
  277. package/package.json +76 -0
  278. package/react-native.config.js +14 -0
  279. package/src/Features/VoiceSession/AudioCaptureManager.ts +286 -0
  280. package/src/Features/VoiceSession/AudioPlaybackManager.ts +300 -0
  281. package/src/Features/VoiceSession/VoiceSessionHandle.ts +530 -0
  282. package/src/Features/VoiceSession/index.ts +20 -0
  283. package/src/Features/index.ts +7 -0
  284. package/src/Foundation/Constants/SDKConstants.ts +47 -0
  285. package/src/Foundation/Constants/index.ts +8 -0
  286. package/src/Foundation/DependencyInjection/ServiceContainer.ts +154 -0
  287. package/src/Foundation/DependencyInjection/ServiceRegistry.ts +51 -0
  288. package/src/Foundation/DependencyInjection/index.ts +6 -0
  289. package/src/Foundation/ErrorTypes/ErrorCategory.ts +184 -0
  290. package/src/Foundation/ErrorTypes/ErrorCodes.ts +151 -0
  291. package/src/Foundation/ErrorTypes/ErrorContext.ts +201 -0
  292. package/src/Foundation/ErrorTypes/SDKError.ts +507 -0
  293. package/src/Foundation/ErrorTypes/index.ts +57 -0
  294. package/src/Foundation/Initialization/InitializationPhase.ts +85 -0
  295. package/src/Foundation/Initialization/InitializationState.ts +168 -0
  296. package/src/Foundation/Initialization/index.ts +26 -0
  297. package/src/Foundation/Logging/Destinations/NativeLogBridge.ts +147 -0
  298. package/src/Foundation/Logging/Destinations/SentryDestination.ts +209 -0
  299. package/src/Foundation/Logging/Logger/SDKLogger.ts +232 -0
  300. package/src/Foundation/Logging/Models/LogLevel.ts +36 -0
  301. package/src/Foundation/Logging/Models/LoggingConfiguration.ts +117 -0
  302. package/src/Foundation/Logging/Services/LoggingManager.ts +407 -0
  303. package/src/Foundation/Logging/index.ts +59 -0
  304. package/src/Foundation/Security/DeviceIdentity.ts +92 -0
  305. package/src/Foundation/Security/SecureStorageError.ts +132 -0
  306. package/src/Foundation/Security/SecureStorageKeys.ts +35 -0
  307. package/src/Foundation/Security/SecureStorageService.ts +449 -0
  308. package/src/Foundation/Security/index.ts +17 -0
  309. package/src/Foundation/index.ts +26 -0
  310. package/src/Infrastructure/Events/EventPublisher.ts +165 -0
  311. package/src/Infrastructure/Events/SDKEvent.ts +214 -0
  312. package/src/Infrastructure/Events/index.ts +15 -0
  313. package/src/Infrastructure/index.ts +9 -0
  314. package/src/Public/Events/EventBus.ts +488 -0
  315. package/src/Public/Events/index.ts +8 -0
  316. package/src/Public/Extensions/RunAnywhere+Logging.ts +51 -0
  317. package/src/Public/Extensions/RunAnywhere+Models.ts +392 -0
  318. package/src/Public/Extensions/RunAnywhere+STT.ts +424 -0
  319. package/src/Public/Extensions/RunAnywhere+Storage.ts +151 -0
  320. package/src/Public/Extensions/RunAnywhere+StructuredOutput.ts +316 -0
  321. package/src/Public/Extensions/RunAnywhere+TTS.ts +430 -0
  322. package/src/Public/Extensions/RunAnywhere+TextGeneration.ts +320 -0
  323. package/src/Public/Extensions/RunAnywhere+VAD.ts +359 -0
  324. package/src/Public/Extensions/RunAnywhere+VoiceAgent.ts +225 -0
  325. package/src/Public/Extensions/RunAnywhere+VoiceSession.ts +155 -0
  326. package/src/Public/Extensions/index.ts +126 -0
  327. package/src/Public/RunAnywhere.ts +695 -0
  328. package/src/index.ts +238 -0
  329. package/src/native/NativeRunAnywhereCore.ts +291 -0
  330. package/src/native/NativeRunAnywhereModule.ts +32 -0
  331. package/src/native/index.ts +21 -0
  332. package/src/services/DownloadService.ts +282 -0
  333. package/src/services/FileSystem.ts +810 -0
  334. package/src/services/ModelRegistry.ts +246 -0
  335. package/src/services/Network/APIEndpoints.ts +84 -0
  336. package/src/services/Network/HTTPService.ts +479 -0
  337. package/src/services/Network/NetworkConfiguration.ts +130 -0
  338. package/src/services/Network/TelemetryService.ts +318 -0
  339. package/src/services/Network/index.ts +29 -0
  340. package/src/services/SystemTTSService.ts +130 -0
  341. package/src/services/index.ts +66 -0
  342. package/src/specs/RunAnywhereCore.nitro.ts +627 -0
  343. package/src/specs/RunAnywhereDeviceInfo.nitro.ts +73 -0
  344. package/src/types/LLMTypes.ts +127 -0
  345. package/src/types/STTTypes.ts +124 -0
  346. package/src/types/StructuredOutputTypes.ts +156 -0
  347. package/src/types/TTSTypes.ts +126 -0
  348. package/src/types/VADTypes.ts +70 -0
  349. package/src/types/VoiceAgentTypes.ts +182 -0
  350. package/src/types/enums.ts +258 -0
  351. package/src/types/events.ts +337 -0
  352. package/src/types/external.d.ts +142 -0
  353. package/src/types/index.ts +146 -0
  354. package/src/types/models.ts +579 -0
@@ -0,0 +1,337 @@
1
+ /**
2
+ * RunAnywhere React Native SDK - Event Types
3
+ *
4
+ * These event types match the iOS Swift SDK event system.
5
+ * Reference: sdk/runanywhere-swift/Sources/RunAnywhere/Public/Events/SDKEvent.swift
6
+ */
7
+
8
+ import type { LLMFramework, SDKComponent, SDKEventType } from './enums';
9
+ import type {
10
+ DefaultGenerationSettings,
11
+ DeviceInfoData,
12
+ FrameworkAvailability,
13
+ InitializationResult,
14
+ ModelInfo,
15
+ StorageInfo,
16
+ StoredModel,
17
+ } from './models';
18
+
19
+ // ============================================================================
20
+ // Base Event Interface
21
+ // ============================================================================
22
+
23
+ /**
24
+ * Base interface for all SDK events
25
+ */
26
+ export interface SDKEvent {
27
+ /** Event timestamp */
28
+ timestamp: string;
29
+
30
+ /** Event type category */
31
+ eventType: SDKEventType;
32
+ }
33
+
34
+ // ============================================================================
35
+ // Initialization Events
36
+ // ============================================================================
37
+
38
+ export type SDKInitializationEvent =
39
+ | { type: 'started' }
40
+ | { type: 'configurationLoaded'; source: string }
41
+ | { type: 'servicesBootstrapped' }
42
+ | { type: 'completed' }
43
+ | { type: 'failed'; error: string };
44
+
45
+ // ============================================================================
46
+ // Configuration Events
47
+ // ============================================================================
48
+
49
+ export type SDKConfigurationEvent =
50
+ | { type: 'fetchStarted' }
51
+ | { type: 'fetchCompleted'; source: string }
52
+ | { type: 'fetchFailed'; error: string }
53
+ | { type: 'loaded'; configuration: Record<string, unknown> | null }
54
+ | { type: 'updated'; changes: string[] }
55
+ | { type: 'syncStarted' }
56
+ | { type: 'syncCompleted' }
57
+ | { type: 'syncFailed'; error: string }
58
+ | { type: 'settingsRequested' }
59
+ | { type: 'settingsRetrieved'; settings: DefaultGenerationSettings }
60
+ | { type: 'routingPolicyRequested' }
61
+ | { type: 'routingPolicyRetrieved'; policy: string }
62
+ | { type: 'privacyModeRequested' }
63
+ | { type: 'privacyModeRetrieved'; mode: string }
64
+ | { type: 'analyticsStatusRequested' }
65
+ | { type: 'analyticsStatusRetrieved'; enabled: boolean }
66
+ | { type: 'syncRequested' };
67
+
68
+ // ============================================================================
69
+ // Generation Events
70
+ // ============================================================================
71
+
72
+ export type SDKGenerationEvent =
73
+ | { type: 'sessionStarted'; sessionId: string }
74
+ | { type: 'sessionEnded'; sessionId: string }
75
+ | { type: 'started'; prompt: string; sessionId?: string }
76
+ | { type: 'firstTokenGenerated'; token: string; latencyMs: number }
77
+ | { type: 'tokenGenerated'; token: string }
78
+ | { type: 'streamingUpdate'; text: string; tokensCount: number }
79
+ | {
80
+ type: 'completed';
81
+ response: string;
82
+ tokensUsed: number;
83
+ latencyMs: number;
84
+ }
85
+ | { type: 'failed'; error: string }
86
+ | { type: 'modelLoaded'; modelId: string }
87
+ | { type: 'modelUnloaded'; modelId: string }
88
+ | { type: 'costCalculated'; amount: number; savedAmount: number }
89
+ | { type: 'routingDecision'; target: string; reason: string };
90
+
91
+ // ============================================================================
92
+ // Model Events
93
+ // ============================================================================
94
+
95
+ export type SDKModelEvent =
96
+ | { type: 'loadStarted'; modelId: string }
97
+ | { type: 'loadProgress'; modelId: string; progress: number }
98
+ | { type: 'loadCompleted'; modelId: string }
99
+ | { type: 'loadFailed'; modelId: string; error: string }
100
+ | { type: 'unloadStarted' }
101
+ | { type: 'unloadCompleted' }
102
+ | { type: 'unloadFailed'; error: string }
103
+ | { type: 'downloadStarted'; modelId: string; taskId?: string }
104
+ | {
105
+ type: 'downloadProgress';
106
+ modelId: string;
107
+ taskId?: string;
108
+ progress: number;
109
+ bytesDownloaded?: number;
110
+ totalBytes?: number;
111
+ downloadState?: string;
112
+ error?: string;
113
+ }
114
+ | {
115
+ type: 'downloadCompleted';
116
+ modelId: string;
117
+ taskId?: string;
118
+ localPath?: string;
119
+ }
120
+ | { type: 'downloadFailed'; modelId: string; taskId?: string; error: string }
121
+ | { type: 'downloadCancelled'; modelId: string; taskId?: string }
122
+ | { type: 'listRequested' }
123
+ | { type: 'listCompleted'; models: ModelInfo[] }
124
+ | { type: 'listFailed'; error: string }
125
+ | { type: 'catalogLoaded'; models: ModelInfo[] }
126
+ | { type: 'deleteStarted'; modelId: string }
127
+ | { type: 'deleteCompleted'; modelId: string }
128
+ | { type: 'deleteFailed'; modelId: string; error: string }
129
+ | { type: 'customModelAdded'; name: string; url: string }
130
+ | { type: 'builtInModelRegistered'; modelId: string };
131
+
132
+ // ============================================================================
133
+ // Voice Events
134
+ // ============================================================================
135
+
136
+ export type SDKVoiceEvent =
137
+ | { type: 'listeningStarted' }
138
+ | { type: 'listeningEnded' }
139
+ | { type: 'speechDetected' }
140
+ | { type: 'transcriptionStarted' }
141
+ | { type: 'transcriptionPartial'; text: string }
142
+ | { type: 'transcriptionFinal'; text: string }
143
+ | { type: 'responseGenerated'; text: string }
144
+ | { type: 'synthesisStarted' }
145
+ | { type: 'audioGenerated'; data: string } // base64 encoded
146
+ | { type: 'synthesisCompleted' }
147
+ | { type: 'pipelineError'; error: string }
148
+ | { type: 'pipelineStarted' }
149
+ | { type: 'pipelineCompleted' }
150
+ | { type: 'vadStarted' }
151
+ | { type: 'vadDetected' }
152
+ | { type: 'vadEnded' }
153
+ | { type: 'sttProcessing' }
154
+ | { type: 'llmProcessing' }
155
+ | { type: 'ttsProcessing' }
156
+ // Recording events
157
+ | { type: 'recordingStarted' }
158
+ | { type: 'recordingStopped'; duration?: number }
159
+ // Playback events
160
+ | { type: 'playbackStarted'; duration?: number }
161
+ | { type: 'playbackCompleted'; duration?: number }
162
+ | { type: 'playbackStopped' }
163
+ | { type: 'playbackPaused' }
164
+ | { type: 'playbackResumed' }
165
+ | { type: 'playbackFailed'; error: string }
166
+ // VAD events
167
+ | { type: 'vadInitialized' }
168
+ | { type: 'vadStopped' }
169
+ | { type: 'vadCleanedUp' }
170
+ | { type: 'speechStarted' }
171
+ | { type: 'speechEnded' }
172
+ // STT partial result events
173
+ | { type: 'sttPartialResult'; text?: string; confidence?: number }
174
+ | { type: 'sttCompleted'; text?: string; confidence?: number }
175
+ | { type: 'sttFailed'; error?: string }
176
+ // Voice session events
177
+ | { type: 'voiceSession_started' }
178
+ | { type: 'voiceSession_listening'; audioLevel?: number }
179
+ | { type: 'voiceSession_speechStarted' }
180
+ | { type: 'voiceSession_speechEnded' }
181
+ | { type: 'voiceSession_processing' }
182
+ | { type: 'voiceSession_transcribed'; transcription?: string }
183
+ | { type: 'voiceSession_responded'; response?: string }
184
+ | { type: 'voiceSession_speaking' }
185
+ | { type: 'voiceSession_turnCompleted'; transcription?: string; response?: string; audio?: string }
186
+ | { type: 'voiceSession_stopped' }
187
+ | { type: 'voiceSession_error'; error?: string };
188
+
189
+ // ============================================================================
190
+ // Performance Events
191
+ // ============================================================================
192
+
193
+ export type SDKPerformanceEvent =
194
+ | { type: 'memoryWarning'; usage: number }
195
+ | { type: 'thermalStateChanged'; state: string }
196
+ | { type: 'latencyMeasured'; operation: string; milliseconds: number }
197
+ | { type: 'throughputMeasured'; tokensPerSecond: number };
198
+
199
+ // ============================================================================
200
+ // Network Events
201
+ // ============================================================================
202
+
203
+ export type SDKNetworkEvent =
204
+ | { type: 'requestStarted'; url: string }
205
+ | { type: 'requestCompleted'; url: string; statusCode: number }
206
+ | { type: 'requestFailed'; url: string; error: string }
207
+ | { type: 'connectivityChanged'; isOnline: boolean };
208
+
209
+ // ============================================================================
210
+ // Storage Events
211
+ // ============================================================================
212
+
213
+ export type SDKStorageEvent =
214
+ | { type: 'infoRequested' }
215
+ | { type: 'infoRetrieved'; info: StorageInfo }
216
+ | { type: 'modelsRequested' }
217
+ | { type: 'modelsRetrieved'; models: StoredModel[] }
218
+ | { type: 'clearCacheStarted' }
219
+ | { type: 'clearCacheCompleted' }
220
+ | { type: 'clearCacheFailed'; error: string }
221
+ | { type: 'cleanTempStarted' }
222
+ | { type: 'cleanTempCompleted' }
223
+ | { type: 'cleanTempFailed'; error: string }
224
+ | { type: 'deleteModelStarted'; modelId: string }
225
+ | { type: 'deleteModelCompleted'; modelId: string }
226
+ | { type: 'deleteModelFailed'; modelId: string; error: string };
227
+
228
+ // ============================================================================
229
+ // Framework Events
230
+ // ============================================================================
231
+
232
+ export type SDKFrameworkEvent =
233
+ | { type: 'adapterRegistered'; framework: LLMFramework; name: string }
234
+ | { type: 'adaptersRequested' }
235
+ | { type: 'adaptersRetrieved'; count: number }
236
+ | { type: 'frameworksRequested' }
237
+ | { type: 'frameworksRetrieved'; frameworks: LLMFramework[] }
238
+ | { type: 'availabilityRequested' }
239
+ | { type: 'availabilityRetrieved'; availability: FrameworkAvailability[] }
240
+ | { type: 'modelsForFrameworkRequested'; framework: LLMFramework }
241
+ | {
242
+ type: 'modelsForFrameworkRetrieved';
243
+ framework: LLMFramework;
244
+ models: ModelInfo[];
245
+ }
246
+ | { type: 'frameworksForModalityRequested'; modality: string }
247
+ | {
248
+ type: 'frameworksForModalityRetrieved';
249
+ modality: string;
250
+ frameworks: LLMFramework[];
251
+ };
252
+
253
+ // ============================================================================
254
+ // Device Events
255
+ // ============================================================================
256
+
257
+ export type SDKDeviceEvent =
258
+ | { type: 'deviceInfoCollected'; deviceInfo: DeviceInfoData }
259
+ | { type: 'deviceInfoCollectionFailed'; error: string }
260
+ | { type: 'deviceInfoRefreshed'; deviceInfo: DeviceInfoData }
261
+ | { type: 'deviceInfoSyncStarted' }
262
+ | { type: 'deviceInfoSyncCompleted' }
263
+ | { type: 'deviceInfoSyncFailed'; error: string }
264
+ | { type: 'deviceStateChanged'; property: string; newValue: string };
265
+
266
+ // ============================================================================
267
+ // Component Initialization Events
268
+ // ============================================================================
269
+
270
+ export type ComponentInitializationEvent =
271
+ | { type: 'initializationStarted'; components: SDKComponent[] }
272
+ | { type: 'initializationCompleted'; result: InitializationResult }
273
+ | {
274
+ type: 'componentStateChanged';
275
+ component: SDKComponent;
276
+ oldState: string;
277
+ newState: string;
278
+ }
279
+ | { type: 'componentChecking'; component: SDKComponent; modelId?: string }
280
+ | {
281
+ type: 'componentDownloadRequired';
282
+ component: SDKComponent;
283
+ modelId: string;
284
+ sizeBytes: number;
285
+ }
286
+ | {
287
+ type: 'componentDownloadStarted';
288
+ component: SDKComponent;
289
+ modelId: string;
290
+ }
291
+ | {
292
+ type: 'componentDownloadProgress';
293
+ component: SDKComponent;
294
+ modelId: string;
295
+ progress: number;
296
+ }
297
+ | {
298
+ type: 'componentDownloadCompleted';
299
+ component: SDKComponent;
300
+ modelId: string;
301
+ }
302
+ | { type: 'componentInitializing'; component: SDKComponent; modelId?: string }
303
+ | { type: 'componentReady'; component: SDKComponent; modelId?: string }
304
+ | { type: 'componentFailed'; component: SDKComponent; error: string }
305
+ | { type: 'parallelInitializationStarted'; components: SDKComponent[] }
306
+ | { type: 'sequentialInitializationStarted'; components: SDKComponent[] }
307
+ | { type: 'allComponentsReady' }
308
+ | {
309
+ type: 'someComponentsReady';
310
+ ready: SDKComponent[];
311
+ pending: SDKComponent[];
312
+ };
313
+
314
+ // ============================================================================
315
+ // Union Type for All Events
316
+ // ============================================================================
317
+
318
+ export type AnySDKEvent =
319
+ | SDKInitializationEvent
320
+ | SDKConfigurationEvent
321
+ | SDKGenerationEvent
322
+ | SDKModelEvent
323
+ | SDKVoiceEvent
324
+ | SDKPerformanceEvent
325
+ | SDKNetworkEvent
326
+ | SDKStorageEvent
327
+ | SDKFrameworkEvent
328
+ | SDKDeviceEvent
329
+ | ComponentInitializationEvent;
330
+
331
+ // ============================================================================
332
+ // Event Listener Types
333
+ // ============================================================================
334
+
335
+ export type SDKEventListener<T> = (event: T) => void;
336
+
337
+ export type UnsubscribeFunction = () => void;
@@ -0,0 +1,142 @@
1
+ /**
2
+ * Type declarations for optional external modules
3
+ * These modules are dynamically imported and may not be installed
4
+ */
5
+
6
+ // react-native-fs is an optional dependency for file operations
7
+ declare module 'react-native-fs' {
8
+ const RNFS: {
9
+ DocumentDirectoryPath: string;
10
+ CachesDirectoryPath: string;
11
+ MainBundlePath: string;
12
+ LibraryDirectoryPath: string;
13
+ ExternalDirectoryPath: string;
14
+ ExternalStorageDirectoryPath: string;
15
+ TemporaryDirectoryPath: string;
16
+ DownloadDirectoryPath: string;
17
+ PicturesDirectoryPath: string;
18
+
19
+ mkdir(
20
+ filepath: string,
21
+ options?: { NSURLIsExcludedFromBackupKey?: boolean }
22
+ ): Promise<void>;
23
+ moveFile(filepath: string, destPath: string): Promise<void>;
24
+ copyFile(filepath: string, destPath: string): Promise<void>;
25
+ unlink(filepath: string): Promise<void>;
26
+ exists(filepath: string): Promise<boolean>;
27
+ readFile(filepath: string, encoding?: string): Promise<string>;
28
+ writeFile(
29
+ filepath: string,
30
+ contents: string,
31
+ encoding?: string
32
+ ): Promise<void>;
33
+ appendFile(
34
+ filepath: string,
35
+ contents: string,
36
+ encoding?: string
37
+ ): Promise<void>;
38
+ stat(filepath: string): Promise<{
39
+ name: string;
40
+ path: string;
41
+ size: number;
42
+ mode: number;
43
+ ctime: number;
44
+ mtime: number;
45
+ originalFilepath: string;
46
+ isFile: () => boolean;
47
+ isDirectory: () => boolean;
48
+ }>;
49
+ readDir(dirpath: string): Promise<
50
+ Array<{
51
+ name: string;
52
+ path: string;
53
+ size: number;
54
+ ctime: Date;
55
+ mtime: Date;
56
+ isFile: () => boolean;
57
+ isDirectory: () => boolean;
58
+ }>
59
+ >;
60
+ hash(filepath: string, algorithm: string): Promise<string>;
61
+ getFSInfo(): Promise<{
62
+ totalSpace: number;
63
+ freeSpace: number;
64
+ }>;
65
+ downloadFile(options: {
66
+ fromUrl: string;
67
+ toFile: string;
68
+ headers?: Record<string, string>;
69
+ background?: boolean;
70
+ begin?: (res: {
71
+ jobId: number;
72
+ contentLength: number;
73
+ statusCode: number;
74
+ }) => void;
75
+ progress?: (res: {
76
+ jobId: number;
77
+ bytesWritten: number;
78
+ contentLength: number;
79
+ }) => void;
80
+ progressDivider?: number;
81
+ }): {
82
+ jobId: number;
83
+ promise: Promise<{
84
+ jobId: number;
85
+ statusCode: number;
86
+ bytesWritten: number;
87
+ }>;
88
+ };
89
+ stopDownload(jobId: number): void;
90
+ };
91
+ export = RNFS;
92
+ }
93
+
94
+ // rn-fetch-blob is an optional dependency for large file downloads
95
+ declare module 'rn-fetch-blob' {
96
+ interface FetchBlobResponse {
97
+ path(): string;
98
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- External library JSON type
99
+ json(): any;
100
+ text(): string;
101
+ data: string;
102
+ info(): { status: number; headers: Record<string, string> };
103
+ flush(): void;
104
+ }
105
+
106
+ interface StatefulPromise<T> extends Promise<T> {
107
+ cancel(): void;
108
+ progress(
109
+ callback: (received: number, total: number) => void
110
+ ): StatefulPromise<T>;
111
+ }
112
+
113
+ interface RNFetchBlob {
114
+ fs: {
115
+ dirs: {
116
+ DocumentDir: string;
117
+ CacheDir: string;
118
+ DownloadDir: string;
119
+ };
120
+ exists(path: string): Promise<boolean>;
121
+ unlink(path: string): Promise<void>;
122
+ mkdir(path: string): Promise<void>;
123
+ };
124
+ config(options: {
125
+ fileCache?: boolean;
126
+ path?: string;
127
+ appendExt?: string;
128
+ timeout?: number;
129
+ }): {
130
+ fetch(
131
+ method: string,
132
+ url: string,
133
+ headers?: Record<string, string>,
134
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- External library body type
135
+ body?: any
136
+ ): StatefulPromise<FetchBlobResponse>;
137
+ };
138
+ }
139
+
140
+ const RNFetchBlob: { default: RNFetchBlob };
141
+ export = RNFetchBlob;
142
+ }
@@ -0,0 +1,146 @@
1
+ /**
2
+ * RunAnywhere React Native SDK - Types
3
+ *
4
+ * Re-exports all types for convenient importing.
5
+ */
6
+
7
+ // Enums
8
+ export {
9
+ ComponentState,
10
+ ConfigurationSource,
11
+ ExecutionTarget,
12
+ FrameworkModality,
13
+ HardwareAcceleration,
14
+ LLMFramework,
15
+ LLMFrameworkDisplayNames,
16
+ ModelCategory,
17
+ ModelCategoryDisplayNames,
18
+ ModelFormat,
19
+ PrivacyMode,
20
+ RoutingPolicy,
21
+ SDKComponent,
22
+ SDKEnvironment,
23
+ SDKEventType,
24
+ } from './enums';
25
+
26
+ // Models
27
+ export type {
28
+ ComponentHealth,
29
+ ConfigurationData,
30
+ DefaultGenerationSettings,
31
+ DeviceInfoData,
32
+ FrameworkAvailability,
33
+ GeneratableType,
34
+ GenerationOptions,
35
+ GenerationResult,
36
+ InitializationResult,
37
+ LLMGenerationOptions,
38
+ ModelInfo,
39
+ ModelInfoMetadata,
40
+ PerformanceMetrics,
41
+ SDKInitOptions,
42
+ STTAlternative,
43
+ STTOptions,
44
+ STTResult,
45
+ STTSegment,
46
+ StorageInfo,
47
+ StoredModel,
48
+ StructuredOutputConfig,
49
+ StructuredOutputValidation,
50
+ ThinkingTagPattern,
51
+ TTSConfiguration,
52
+ TTSResult,
53
+ VADConfiguration,
54
+ VoiceAudioChunk,
55
+ } from './models';
56
+
57
+ // Events
58
+ export type {
59
+ AnySDKEvent,
60
+ ComponentInitializationEvent,
61
+ SDKConfigurationEvent,
62
+ SDKDeviceEvent,
63
+ SDKEvent,
64
+ SDKEventListener,
65
+ SDKFrameworkEvent,
66
+ SDKGenerationEvent,
67
+ SDKInitializationEvent,
68
+ SDKModelEvent,
69
+ SDKNetworkEvent,
70
+ SDKPerformanceEvent,
71
+ SDKStorageEvent,
72
+ SDKVoiceEvent,
73
+ UnsubscribeFunction,
74
+ } from './events';
75
+
76
+ // Voice Agent Types
77
+ export type {
78
+ ComponentLoadState,
79
+ ComponentState as VoiceAgentComponentState,
80
+ VoiceAgentComponentStates,
81
+ VoiceAgentConfig,
82
+ VoiceTurnResult,
83
+ VoiceSessionEventType,
84
+ VoiceSessionEvent,
85
+ VoiceSessionCallback,
86
+ VoiceAgentMetrics,
87
+ } from './VoiceAgentTypes';
88
+
89
+ // Structured Output Types
90
+ export type {
91
+ JSONSchemaType,
92
+ JSONSchemaProperty,
93
+ JSONSchema,
94
+ StructuredOutputOptions,
95
+ StructuredOutputResult,
96
+ EntityExtractionResult,
97
+ ClassificationResult,
98
+ SentimentResult,
99
+ NamedEntity,
100
+ NERResult,
101
+ } from './StructuredOutputTypes';
102
+
103
+ // VAD Types
104
+ export type {
105
+ VADConfiguration as VADConfig,
106
+ VADResult,
107
+ SpeechActivityEvent,
108
+ VADSpeechActivityCallback,
109
+ VADAudioBufferCallback,
110
+ VADState,
111
+ } from './VADTypes';
112
+
113
+ // TTS Types
114
+ export type {
115
+ TTSOptions as TTSOpts,
116
+ AudioFormat,
117
+ TTSOutput,
118
+ PhonemeTimestamp,
119
+ TTSSynthesisMetadata,
120
+ TTSSpeakResult,
121
+ TTSVoiceInfo,
122
+ TTSStreamChunkCallback,
123
+ } from './TTSTypes';
124
+
125
+ // STT Types
126
+ export type {
127
+ STTOptions as STTOpts,
128
+ STTOutput,
129
+ WordTimestamp,
130
+ STTAlternative as STTAlt,
131
+ TranscriptionMetadata,
132
+ STTPartialResult,
133
+ STTStreamCallback,
134
+ STTStreamOptions,
135
+ } from './STTTypes';
136
+
137
+ // LLM Types
138
+ export type {
139
+ LLMGenerationOptions as LLMGenOptions,
140
+ LLMGenerationResult as LLMGenResult,
141
+ LLMStreamingResult,
142
+ LLMStreamingMetrics,
143
+ LLMTokenCallback,
144
+ LLMStreamCompleteCallback,
145
+ LLMStreamErrorCallback,
146
+ } from './LLMTypes';