@runanywhere/core 0.16.11 → 0.17.1

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 (217) hide show
  1. package/README.md +427 -0
  2. package/RunAnywhereCore.podspec +4 -4
  3. package/android/src/main/jniLibs/arm64-v8a/librac_commons.so +0 -0
  4. package/cpp/HybridRunAnywhereCore.cpp +10 -4
  5. package/cpp/bridges/TelemetryBridge.cpp +10 -3
  6. package/ios/.testlocal +0 -0
  7. package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/RACommons +0 -0
  8. package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/RACommons +0 -0
  9. package/nitrogen/generated/shared/c++/HybridRunAnywhereCoreSpec.hpp +1 -1
  10. package/package.json +12 -11
  11. package/src/Features/VoiceSession/AudioCaptureManager.ts +274 -109
  12. package/src/Features/VoiceSession/AudioPlaybackManager.ts +247 -59
  13. package/src/Features/VoiceSession/VoiceSessionHandle.ts +200 -133
  14. package/src/Public/Extensions/RunAnywhere+Audio.ts +688 -0
  15. package/src/Public/Extensions/RunAnywhere+VoiceSession.ts +15 -11
  16. package/src/Public/Extensions/index.ts +25 -0
  17. package/src/Public/RunAnywhere.ts +36 -14
  18. package/android/src/main/include/rac/backends/rac_llm_llamacpp.h +0 -218
  19. package/android/src/main/include/rac/backends/rac_stt_onnx.h +0 -99
  20. package/android/src/main/include/rac/backends/rac_stt_whispercpp.h +0 -153
  21. package/android/src/main/include/rac/backends/rac_tts_onnx.h +0 -71
  22. package/android/src/main/include/rac/backends/rac_vad_onnx.h +0 -84
  23. package/android/src/main/include/rac/core/capabilities/rac_lifecycle.h +0 -290
  24. package/android/src/main/include/rac/core/rac_analytics_events.h +0 -610
  25. package/android/src/main/include/rac/core/rac_audio_utils.h +0 -88
  26. package/android/src/main/include/rac/core/rac_component_types.h +0 -160
  27. package/android/src/main/include/rac/core/rac_core.h +0 -331
  28. package/android/src/main/include/rac/core/rac_error.h +0 -469
  29. package/android/src/main/include/rac/core/rac_events.h +0 -334
  30. package/android/src/main/include/rac/core/rac_logger.h +0 -416
  31. package/android/src/main/include/rac/core/rac_platform_adapter.h +0 -340
  32. package/android/src/main/include/rac/core/rac_sdk_state.h +0 -292
  33. package/android/src/main/include/rac/core/rac_structured_error.h +0 -594
  34. package/android/src/main/include/rac/features/llm/rac_llm.h +0 -17
  35. package/android/src/main/include/rac/features/llm/rac_llm_analytics.h +0 -188
  36. package/android/src/main/include/rac/features/llm/rac_llm_component.h +0 -228
  37. package/android/src/main/include/rac/features/llm/rac_llm_events.h +0 -215
  38. package/android/src/main/include/rac/features/llm/rac_llm_metrics.h +0 -402
  39. package/android/src/main/include/rac/features/llm/rac_llm_service.h +0 -163
  40. package/android/src/main/include/rac/features/llm/rac_llm_structured_output.h +0 -141
  41. package/android/src/main/include/rac/features/llm/rac_llm_types.h +0 -384
  42. package/android/src/main/include/rac/features/platform/rac_llm_platform.h +0 -204
  43. package/android/src/main/include/rac/features/platform/rac_tts_platform.h +0 -197
  44. package/android/src/main/include/rac/features/stt/rac_stt.h +0 -17
  45. package/android/src/main/include/rac/features/stt/rac_stt_analytics.h +0 -204
  46. package/android/src/main/include/rac/features/stt/rac_stt_component.h +0 -162
  47. package/android/src/main/include/rac/features/stt/rac_stt_events.h +0 -62
  48. package/android/src/main/include/rac/features/stt/rac_stt_service.h +0 -154
  49. package/android/src/main/include/rac/features/stt/rac_stt_types.h +0 -389
  50. package/android/src/main/include/rac/features/tts/rac_tts.h +0 -17
  51. package/android/src/main/include/rac/features/tts/rac_tts_analytics.h +0 -181
  52. package/android/src/main/include/rac/features/tts/rac_tts_component.h +0 -158
  53. package/android/src/main/include/rac/features/tts/rac_tts_events.h +0 -54
  54. package/android/src/main/include/rac/features/tts/rac_tts_service.h +0 -162
  55. package/android/src/main/include/rac/features/tts/rac_tts_types.h +0 -374
  56. package/android/src/main/include/rac/features/vad/rac_vad.h +0 -17
  57. package/android/src/main/include/rac/features/vad/rac_vad_analytics.h +0 -236
  58. package/android/src/main/include/rac/features/vad/rac_vad_component.h +0 -185
  59. package/android/src/main/include/rac/features/vad/rac_vad_energy.h +0 -443
  60. package/android/src/main/include/rac/features/vad/rac_vad_events.h +0 -76
  61. package/android/src/main/include/rac/features/vad/rac_vad_service.h +0 -167
  62. package/android/src/main/include/rac/features/vad/rac_vad_types.h +0 -244
  63. package/android/src/main/include/rac/features/voice_agent/rac_voice_agent.h +0 -612
  64. package/android/src/main/include/rac/infrastructure/device/rac_device_manager.h +0 -176
  65. package/android/src/main/include/rac/infrastructure/download/rac_download.h +0 -418
  66. package/android/src/main/include/rac/infrastructure/events/rac_events.h +0 -177
  67. package/android/src/main/include/rac/infrastructure/model_management/rac_model_assignment.h +0 -169
  68. package/android/src/main/include/rac/infrastructure/model_management/rac_model_paths.h +0 -258
  69. package/android/src/main/include/rac/infrastructure/model_management/rac_model_registry.h +0 -357
  70. package/android/src/main/include/rac/infrastructure/model_management/rac_model_strategy.h +0 -374
  71. package/android/src/main/include/rac/infrastructure/model_management/rac_model_types.h +0 -613
  72. package/android/src/main/include/rac/infrastructure/network/rac_auth_manager.h +0 -252
  73. package/android/src/main/include/rac/infrastructure/network/rac_dev_config.h +0 -85
  74. package/android/src/main/include/rac/infrastructure/network/rac_endpoints.h +0 -102
  75. package/android/src/main/include/rac/infrastructure/network/rac_environment.h +0 -220
  76. package/android/src/main/include/rac/infrastructure/storage/rac_storage_analyzer.h +0 -286
  77. package/android/src/main/include/rac/infrastructure/telemetry/rac_telemetry_manager.h +0 -206
  78. package/android/src/main/include/rac/infrastructure/telemetry/rac_telemetry_types.h +0 -234
  79. package/android/src/main/jniLibs/arm64-v8a/libc++_shared.so +0 -0
  80. package/android/src/main/jniLibs/arm64-v8a/libomp.so +0 -0
  81. package/android/src/main/jniLibs/arm64-v8a/librunanywhere_jni.so +0 -0
  82. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_api_types.h +0 -335
  83. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_http_client.h +0 -233
  84. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_types.h +0 -264
  85. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/Info.plist +0 -0
  86. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/RACommons.h +0 -0
  87. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_analytics_events.h +0 -0
  88. /package/{android/src/main/include/rac/infrastructure/network → ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers}/rac_api_types.h +0 -0
  89. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_audio_utils.h +0 -0
  90. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_auth_manager.h +0 -0
  91. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_component_types.h +0 -0
  92. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_core.h +0 -0
  93. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_dev_config.h +0 -0
  94. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_device_manager.h +0 -0
  95. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_download.h +0 -0
  96. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_endpoints.h +0 -0
  97. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_environment.h +0 -0
  98. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_error.h +0 -0
  99. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_events.h +0 -0
  100. /package/{android/src/main/include/rac/infrastructure/network → ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers}/rac_http_client.h +0 -0
  101. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_lifecycle.h +0 -0
  102. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm.h +0 -0
  103. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_analytics.h +0 -0
  104. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_component.h +0 -0
  105. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_events.h +0 -0
  106. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_llamacpp.h +0 -0
  107. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_metrics.h +0 -0
  108. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_platform.h +0 -0
  109. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_service.h +0 -0
  110. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_structured_output.h +0 -0
  111. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_types.h +0 -0
  112. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_logger.h +0 -0
  113. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_assignment.h +0 -0
  114. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_paths.h +0 -0
  115. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_registry.h +0 -0
  116. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_strategy.h +0 -0
  117. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_types.h +0 -0
  118. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_platform_adapter.h +0 -0
  119. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_sdk_state.h +0 -0
  120. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_storage_analyzer.h +0 -0
  121. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_structured_error.h +0 -0
  122. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt.h +0 -0
  123. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_analytics.h +0 -0
  124. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_component.h +0 -0
  125. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_events.h +0 -0
  126. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_onnx.h +0 -0
  127. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_service.h +0 -0
  128. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_types.h +0 -0
  129. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_whispercpp.h +0 -0
  130. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_telemetry_manager.h +0 -0
  131. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_telemetry_types.h +0 -0
  132. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts.h +0 -0
  133. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_analytics.h +0 -0
  134. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_component.h +0 -0
  135. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_events.h +0 -0
  136. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_onnx.h +0 -0
  137. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_platform.h +0 -0
  138. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_service.h +0 -0
  139. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_types.h +0 -0
  140. /package/{android/src/main/include/rac/core → ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers}/rac_types.h +0 -0
  141. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad.h +0 -0
  142. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_analytics.h +0 -0
  143. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_component.h +0 -0
  144. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_energy.h +0 -0
  145. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_events.h +0 -0
  146. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_onnx.h +0 -0
  147. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_service.h +0 -0
  148. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_types.h +0 -0
  149. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_voice_agent.h +0 -0
  150. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Info.plist +0 -0
  151. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64/RACommons.framework/Modules/module.modulemap +0 -0
  152. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/RACommons.h +0 -0
  153. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_analytics_events.h +0 -0
  154. /package/ios/{Frameworks/RACommons.xcframework/ios-arm64 → Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator}/RACommons.framework/Headers/rac_api_types.h +0 -0
  155. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_audio_utils.h +0 -0
  156. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_auth_manager.h +0 -0
  157. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_component_types.h +0 -0
  158. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_core.h +0 -0
  159. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_dev_config.h +0 -0
  160. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_device_manager.h +0 -0
  161. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_download.h +0 -0
  162. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_endpoints.h +0 -0
  163. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_environment.h +0 -0
  164. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_error.h +0 -0
  165. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_events.h +0 -0
  166. /package/ios/{Frameworks/RACommons.xcframework/ios-arm64 → Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator}/RACommons.framework/Headers/rac_http_client.h +0 -0
  167. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_lifecycle.h +0 -0
  168. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm.h +0 -0
  169. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_analytics.h +0 -0
  170. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_component.h +0 -0
  171. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_events.h +0 -0
  172. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_llamacpp.h +0 -0
  173. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_metrics.h +0 -0
  174. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_platform.h +0 -0
  175. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_service.h +0 -0
  176. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_structured_output.h +0 -0
  177. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_types.h +0 -0
  178. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_logger.h +0 -0
  179. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_assignment.h +0 -0
  180. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_paths.h +0 -0
  181. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_registry.h +0 -0
  182. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_strategy.h +0 -0
  183. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_types.h +0 -0
  184. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_platform_adapter.h +0 -0
  185. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_sdk_state.h +0 -0
  186. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_storage_analyzer.h +0 -0
  187. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_structured_error.h +0 -0
  188. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt.h +0 -0
  189. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_analytics.h +0 -0
  190. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_component.h +0 -0
  191. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_events.h +0 -0
  192. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_onnx.h +0 -0
  193. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_service.h +0 -0
  194. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_types.h +0 -0
  195. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_whispercpp.h +0 -0
  196. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_telemetry_manager.h +0 -0
  197. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_telemetry_types.h +0 -0
  198. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts.h +0 -0
  199. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_analytics.h +0 -0
  200. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_component.h +0 -0
  201. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_events.h +0 -0
  202. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_onnx.h +0 -0
  203. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_platform.h +0 -0
  204. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_service.h +0 -0
  205. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_types.h +0 -0
  206. /package/ios/{Frameworks/RACommons.xcframework/ios-arm64 → Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator}/RACommons.framework/Headers/rac_types.h +0 -0
  207. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad.h +0 -0
  208. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_analytics.h +0 -0
  209. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_component.h +0 -0
  210. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_energy.h +0 -0
  211. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_events.h +0 -0
  212. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_onnx.h +0 -0
  213. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_service.h +0 -0
  214. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_types.h +0 -0
  215. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_voice_agent.h +0 -0
  216. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Info.plist +0 -0
  217. /package/ios/{Frameworks → Binaries}/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Modules/module.modulemap +0 -0
@@ -1,252 +0,0 @@
1
- /**
2
- * @file rac_auth_manager.h
3
- * @brief Authentication state management
4
- *
5
- * Manages authentication state including tokens, expiry, and refresh logic.
6
- * Platform SDKs provide HTTP transport and secure storage callbacks.
7
- */
8
-
9
- #ifndef RAC_AUTH_MANAGER_H
10
- #define RAC_AUTH_MANAGER_H
11
-
12
- #include <stdbool.h>
13
- #include <stdint.h>
14
-
15
- #include "rac/infrastructure/network/rac_api_types.h"
16
- #include "rac/infrastructure/network/rac_environment.h"
17
-
18
- #ifdef __cplusplus
19
- extern "C" {
20
- #endif
21
-
22
- // =============================================================================
23
- // Auth State
24
- // =============================================================================
25
-
26
- /**
27
- * @brief Authentication state structure
28
- *
29
- * Managed internally - use accessor functions.
30
- */
31
- typedef struct {
32
- char* access_token;
33
- char* refresh_token;
34
- char* device_id;
35
- char* user_id; // Can be NULL
36
- char* organization_id;
37
- int64_t token_expires_at; // Unix timestamp (seconds)
38
- bool is_authenticated;
39
- } rac_auth_state_t;
40
-
41
- // =============================================================================
42
- // Platform Callbacks
43
- // =============================================================================
44
-
45
- /**
46
- * @brief Callback for secure storage operations
47
- *
48
- * Platform implements to store tokens in Keychain/KeyStore.
49
- */
50
- typedef struct {
51
- /**
52
- * @brief Store string value securely
53
- * @param key Storage key
54
- * @param value Value to store
55
- * @return 0 on success, -1 on error
56
- */
57
- int (*store)(const char* key, const char* value, void* context);
58
-
59
- /**
60
- * @brief Retrieve string value
61
- * @param key Storage key
62
- * @param out_value Output buffer (caller provides)
63
- * @param buffer_size Size of output buffer
64
- * @return Length of value, or -1 on error/not found
65
- */
66
- int (*retrieve)(const char* key, char* out_value, size_t buffer_size, void* context);
67
-
68
- /**
69
- * @brief Delete stored value
70
- * @param key Storage key
71
- * @return 0 on success, -1 on error
72
- */
73
- int (*delete_key)(const char* key, void* context);
74
-
75
- /**
76
- * @brief Context pointer passed to all callbacks
77
- */
78
- void* context;
79
- } rac_secure_storage_t;
80
-
81
- // =============================================================================
82
- // Keychain Keys (for platform implementations)
83
- // =============================================================================
84
-
85
- #define RAC_KEY_ACCESS_TOKEN "com.runanywhere.sdk.accessToken"
86
- #define RAC_KEY_REFRESH_TOKEN "com.runanywhere.sdk.refreshToken"
87
- #define RAC_KEY_DEVICE_ID "com.runanywhere.sdk.deviceId"
88
- #define RAC_KEY_USER_ID "com.runanywhere.sdk.userId"
89
- #define RAC_KEY_ORGANIZATION_ID "com.runanywhere.sdk.organizationId"
90
-
91
- // =============================================================================
92
- // Initialization
93
- // =============================================================================
94
-
95
- /**
96
- * @brief Initialize auth manager
97
- * @param storage Secure storage callbacks (can be NULL for in-memory only)
98
- */
99
- void rac_auth_init(const rac_secure_storage_t* storage);
100
-
101
- /**
102
- * @brief Reset auth manager state
103
- */
104
- void rac_auth_reset(void);
105
-
106
- // =============================================================================
107
- // Token State
108
- // =============================================================================
109
-
110
- /**
111
- * @brief Check if currently authenticated
112
- * @return true if valid access token exists
113
- */
114
- bool rac_auth_is_authenticated(void);
115
-
116
- /**
117
- * @brief Check if token needs refresh
118
- *
119
- * Returns true if token expires within 60 seconds.
120
- *
121
- * @return true if token should be refreshed
122
- */
123
- bool rac_auth_needs_refresh(void);
124
-
125
- /**
126
- * @brief Get current access token
127
- * @return Access token string, or NULL if not authenticated
128
- */
129
- const char* rac_auth_get_access_token(void);
130
-
131
- /**
132
- * @brief Get current device ID
133
- * @return Device ID string, or NULL if not set
134
- */
135
- const char* rac_auth_get_device_id(void);
136
-
137
- /**
138
- * @brief Get current user ID
139
- * @return User ID string, or NULL if not set
140
- */
141
- const char* rac_auth_get_user_id(void);
142
-
143
- /**
144
- * @brief Get current organization ID
145
- * @return Organization ID string, or NULL if not set
146
- */
147
- const char* rac_auth_get_organization_id(void);
148
-
149
- // =============================================================================
150
- // Request Building
151
- // =============================================================================
152
-
153
- /**
154
- * @brief Build authentication request JSON
155
- *
156
- * Creates JSON payload for POST /api/v1/auth/sdk/authenticate
157
- *
158
- * @param config SDK configuration with credentials
159
- * @return JSON string (caller must free), or NULL on error
160
- */
161
- char* rac_auth_build_authenticate_request(const rac_sdk_config_t* config);
162
-
163
- /**
164
- * @brief Build token refresh request JSON
165
- *
166
- * Creates JSON payload for POST /api/v1/auth/sdk/refresh
167
- *
168
- * @return JSON string (caller must free), or NULL if no refresh token
169
- */
170
- char* rac_auth_build_refresh_request(void);
171
-
172
- // =============================================================================
173
- // Response Handling
174
- // =============================================================================
175
-
176
- /**
177
- * @brief Parse and store authentication response
178
- *
179
- * Updates internal auth state and optionally persists to secure storage.
180
- *
181
- * @param json JSON response body
182
- * @return 0 on success, -1 on parse error
183
- */
184
- int rac_auth_handle_authenticate_response(const char* json);
185
-
186
- /**
187
- * @brief Parse and store refresh response
188
- *
189
- * Updates internal auth state and optionally persists to secure storage.
190
- *
191
- * @param json JSON response body
192
- * @return 0 on success, -1 on parse error
193
- */
194
- int rac_auth_handle_refresh_response(const char* json);
195
-
196
- // =============================================================================
197
- // Token Management
198
- // =============================================================================
199
-
200
- /**
201
- * @brief Get valid access token, triggering refresh if needed
202
- *
203
- * This is the main entry point for getting a token. If the current token
204
- * is expired or about to expire, it will:
205
- * 1. Build a refresh request
206
- * 2. Return a pending state indicating refresh is needed
207
- *
208
- * Platform must then:
209
- * 1. Execute the HTTP request
210
- * 2. Call rac_auth_handle_refresh_response with result
211
- * 3. Call this function again to get the new token
212
- *
213
- * @param out_token Output pointer for token string
214
- * @param out_needs_refresh Set to true if refresh HTTP call is needed
215
- * @return 0 on success (token valid), 1 if refresh needed, -1 on error
216
- */
217
- int rac_auth_get_valid_token(const char** out_token, bool* out_needs_refresh);
218
-
219
- /**
220
- * @brief Clear all authentication state
221
- *
222
- * Clears in-memory state and secure storage.
223
- */
224
- void rac_auth_clear(void);
225
-
226
- // =============================================================================
227
- // Persistence
228
- // =============================================================================
229
-
230
- /**
231
- * @brief Load tokens from secure storage
232
- *
233
- * Call during initialization to restore saved auth state.
234
- *
235
- * @return 0 on success (tokens loaded), -1 if not found or error
236
- */
237
- int rac_auth_load_stored_tokens(void);
238
-
239
- /**
240
- * @brief Save current tokens to secure storage
241
- *
242
- * Called automatically by response handlers, but can be called manually.
243
- *
244
- * @return 0 on success, -1 on error
245
- */
246
- int rac_auth_save_tokens(void);
247
-
248
- #ifdef __cplusplus
249
- }
250
- #endif
251
-
252
- #endif // RAC_AUTH_MANAGER_H
@@ -1,85 +0,0 @@
1
- /**
2
- * @file rac_dev_config.h
3
- * @brief Development mode configuration API
4
- *
5
- * Provides access to development mode configuration values.
6
- * The actual values are defined in development_config.cpp which is git-ignored.
7
- *
8
- * This allows:
9
- * - Cross-platform sharing of dev config (iOS, Android, Flutter)
10
- * - Git-ignored secrets with template for developers
11
- * - Consistent development environment across SDKs
12
- *
13
- * Security Model:
14
- * - development_config.cpp is in .gitignore (not committed to main branch)
15
- * - Real values are ONLY in release tags (for SPM/Maven distribution)
16
- * - Used ONLY when SDK is in .development mode
17
- * - Backend validates build token via POST /api/v1/devices/register/dev
18
- */
19
-
20
- #ifndef RAC_DEV_CONFIG_H
21
- #define RAC_DEV_CONFIG_H
22
-
23
- #include <stdbool.h>
24
-
25
- #include "rac/core/rac_types.h"
26
-
27
- #ifdef __cplusplus
28
- extern "C" {
29
- #endif
30
-
31
- // =============================================================================
32
- // Development Configuration API
33
- // =============================================================================
34
-
35
- /**
36
- * @brief Check if development config is available
37
- * @return true if development config is properly configured
38
- */
39
- RAC_API bool rac_dev_config_is_available(void);
40
-
41
- /**
42
- * @brief Get Supabase project URL for development mode
43
- * @return URL string (static, do not free)
44
- */
45
- RAC_API const char* rac_dev_config_get_supabase_url(void);
46
-
47
- /**
48
- * @brief Get Supabase anon key for development mode
49
- * @return API key string (static, do not free)
50
- */
51
- RAC_API const char* rac_dev_config_get_supabase_key(void);
52
-
53
- /**
54
- * @brief Get build token for development mode
55
- * @return Build token string (static, do not free)
56
- */
57
- RAC_API const char* rac_dev_config_get_build_token(void);
58
-
59
- /**
60
- * @brief Get Sentry DSN for crash reporting (optional)
61
- * @return Sentry DSN string, or NULL if not configured
62
- */
63
- RAC_API const char* rac_dev_config_get_sentry_dsn(void);
64
-
65
- // =============================================================================
66
- // Convenience Functions
67
- // =============================================================================
68
-
69
- /**
70
- * @brief Check if Supabase config is valid
71
- * @return true if URL and key are non-empty
72
- */
73
- RAC_API bool rac_dev_config_has_supabase(void);
74
-
75
- /**
76
- * @brief Check if build token is valid
77
- * @return true if build token is non-empty
78
- */
79
- RAC_API bool rac_dev_config_has_build_token(void);
80
-
81
- #ifdef __cplusplus
82
- }
83
- #endif
84
-
85
- #endif // RAC_DEV_CONFIG_H
@@ -1,102 +0,0 @@
1
- /**
2
- * @file rac_endpoints.h
3
- * @brief API endpoint definitions
4
- *
5
- * Defines all API endpoint paths as constants.
6
- * This is the canonical source of truth - platform SDKs should not duplicate these.
7
- */
8
-
9
- #ifndef RAC_ENDPOINTS_H
10
- #define RAC_ENDPOINTS_H
11
-
12
- #include "rac/infrastructure/network/rac_environment.h"
13
-
14
- #ifdef __cplusplus
15
- extern "C" {
16
- #endif
17
-
18
- // =============================================================================
19
- // Authentication & Health Endpoints
20
- // =============================================================================
21
-
22
- #define RAC_ENDPOINT_AUTHENTICATE "/api/v1/auth/sdk/authenticate"
23
- #define RAC_ENDPOINT_REFRESH "/api/v1/auth/sdk/refresh"
24
- #define RAC_ENDPOINT_HEALTH "/v1/health"
25
-
26
- // =============================================================================
27
- // Device Management - Production/Staging
28
- // =============================================================================
29
-
30
- #define RAC_ENDPOINT_DEVICE_REGISTER "/api/v1/devices/register"
31
- #define RAC_ENDPOINT_TELEMETRY "/api/v1/sdk/telemetry"
32
-
33
- // =============================================================================
34
- // Device Management - Development (Supabase REST API)
35
- // =============================================================================
36
-
37
- #define RAC_ENDPOINT_DEV_DEVICE_REGISTER "/rest/v1/sdk_devices"
38
- #define RAC_ENDPOINT_DEV_TELEMETRY "/rest/v1/telemetry_events"
39
-
40
- // =============================================================================
41
- // Model Management
42
- // =============================================================================
43
-
44
- #define RAC_ENDPOINT_MODELS_AVAILABLE "/api/v1/models/available"
45
-
46
- // =============================================================================
47
- // Environment-Based Endpoint Selection
48
- // =============================================================================
49
-
50
- /**
51
- * @brief Get device registration endpoint for environment
52
- * @param env The environment
53
- * @return Endpoint path string
54
- */
55
- const char* rac_endpoint_device_registration(rac_environment_t env);
56
-
57
- /**
58
- * @brief Get telemetry endpoint for environment
59
- * @param env The environment
60
- * @return Endpoint path string
61
- */
62
- const char* rac_endpoint_telemetry(rac_environment_t env);
63
-
64
- /**
65
- * @brief Build model assignments endpoint with query params
66
- * @param device_type Device type (e.g., "iphone", "android_phone")
67
- * @param platform Platform (e.g., "ios", "android")
68
- * @param out_buffer Buffer to write endpoint path
69
- * @param buffer_size Size of buffer
70
- * @return Length of written string, or -1 on error
71
- */
72
- int rac_endpoint_model_assignments(const char* device_type, const char* platform, char* out_buffer,
73
- size_t buffer_size);
74
-
75
- /**
76
- * @brief Build model download endpoint
77
- * @param model_id The model ID
78
- * @param out_buffer Buffer to write endpoint path
79
- * @param buffer_size Size of buffer
80
- * @return Length of written string, or -1 on error
81
- */
82
- int rac_endpoint_model_download(const char* model_id, char* out_buffer, size_t buffer_size);
83
-
84
- // =============================================================================
85
- // Full URL Building
86
- // =============================================================================
87
-
88
- /**
89
- * @brief Build full URL from base URL and endpoint
90
- * @param base_url The base URL (e.g., "https://api.runanywhere.ai")
91
- * @param endpoint The endpoint path (e.g., "/api/v1/health")
92
- * @param out_buffer Buffer to write full URL
93
- * @param buffer_size Size of buffer
94
- * @return Length of written string, or -1 on error
95
- */
96
- int rac_build_url(const char* base_url, const char* endpoint, char* out_buffer, size_t buffer_size);
97
-
98
- #ifdef __cplusplus
99
- }
100
- #endif
101
-
102
- #endif // RAC_ENDPOINTS_H
@@ -1,220 +0,0 @@
1
- /**
2
- * @file rac_environment.h
3
- * @brief SDK environment configuration
4
- *
5
- * Defines environment types (development, staging, production) and their
6
- * associated settings like authentication requirements, log levels, etc.
7
- * This is the canonical source of truth - platform SDKs create thin wrappers.
8
- */
9
-
10
- #ifndef RAC_ENVIRONMENT_H
11
- #define RAC_ENVIRONMENT_H
12
-
13
- #include <stdbool.h>
14
- #include <stdint.h>
15
-
16
- #include "rac/core/rac_types.h" // For rac_log_level_t
17
-
18
- #ifdef __cplusplus
19
- extern "C" {
20
- #endif
21
-
22
- // =============================================================================
23
- // Environment Types
24
- // =============================================================================
25
-
26
- /**
27
- * @brief SDK environment mode
28
- *
29
- * - DEVELOPMENT: Local/testing mode, no auth required, uses Supabase
30
- * - STAGING: Testing with real services, requires API key + URL
31
- * - PRODUCTION: Live environment, requires API key + HTTPS URL
32
- */
33
- typedef enum {
34
- RAC_ENV_DEVELOPMENT = 0,
35
- RAC_ENV_STAGING = 1,
36
- RAC_ENV_PRODUCTION = 2
37
- } rac_environment_t;
38
-
39
- // Note: rac_log_level_t is defined in rac_types.h
40
- // We use the existing definition for consistency
41
-
42
- // =============================================================================
43
- // SDK Configuration
44
- // =============================================================================
45
-
46
- /**
47
- * @brief SDK initialization configuration
48
- *
49
- * Contains all parameters needed to initialize the SDK.
50
- * Platform SDKs populate this from their native config types.
51
- */
52
- typedef struct {
53
- rac_environment_t environment;
54
- const char* api_key; // Required for staging/production
55
- const char* base_url; // Required for staging/production
56
- const char* device_id; // Set by platform (Keychain UUID, etc.)
57
- const char* platform; // "ios", "android", "flutter", etc.
58
- const char* sdk_version; // SDK version string
59
- } rac_sdk_config_t;
60
-
61
- /**
62
- * @brief Development network configuration
63
- *
64
- * Contains Supabase credentials for development mode.
65
- * These are built into the SDK binary.
66
- */
67
- typedef struct {
68
- const char* base_url; // Supabase project URL
69
- const char* api_key; // Supabase anon key
70
- const char* build_token; // SDK build token for validation
71
- } rac_dev_config_t;
72
-
73
- // =============================================================================
74
- // Environment Query Functions
75
- // =============================================================================
76
-
77
- /**
78
- * @brief Check if environment requires API authentication
79
- * @param env The environment to check
80
- * @return true for staging/production, false for development
81
- */
82
- bool rac_env_requires_auth(rac_environment_t env);
83
-
84
- /**
85
- * @brief Check if environment requires a backend URL
86
- * @param env The environment to check
87
- * @return true for staging/production, false for development
88
- */
89
- bool rac_env_requires_backend_url(rac_environment_t env);
90
-
91
- /**
92
- * @brief Check if environment is production
93
- * @param env The environment to check
94
- * @return true only for production
95
- */
96
- bool rac_env_is_production(rac_environment_t env);
97
-
98
- /**
99
- * @brief Check if environment is a testing environment
100
- * @param env The environment to check
101
- * @return true for development and staging
102
- */
103
- bool rac_env_is_testing(rac_environment_t env);
104
-
105
- /**
106
- * @brief Get the default log level for an environment
107
- * @param env The environment
108
- * @return DEBUG for development, INFO for staging, WARNING for production
109
- */
110
- rac_log_level_t rac_env_default_log_level(rac_environment_t env);
111
-
112
- /**
113
- * @brief Check if telemetry should be sent for this environment
114
- * @param env The environment
115
- * @return true only for production
116
- */
117
- bool rac_env_should_send_telemetry(rac_environment_t env);
118
-
119
- /**
120
- * @brief Check if environment should sync with backend
121
- * @param env The environment
122
- * @return true for staging/production, false for development
123
- */
124
- bool rac_env_should_sync_with_backend(rac_environment_t env);
125
-
126
- /**
127
- * @brief Get human-readable environment description
128
- * @param env The environment
129
- * @return String like "Development Environment"
130
- */
131
- const char* rac_env_description(rac_environment_t env);
132
-
133
- // =============================================================================
134
- // Validation Functions
135
- // =============================================================================
136
-
137
- /**
138
- * @brief Validation result codes
139
- */
140
- typedef enum {
141
- RAC_VALIDATION_OK = 0,
142
- RAC_VALIDATION_API_KEY_REQUIRED,
143
- RAC_VALIDATION_API_KEY_TOO_SHORT,
144
- RAC_VALIDATION_URL_REQUIRED,
145
- RAC_VALIDATION_URL_INVALID_SCHEME,
146
- RAC_VALIDATION_URL_HTTPS_REQUIRED,
147
- RAC_VALIDATION_URL_INVALID_HOST,
148
- RAC_VALIDATION_URL_LOCALHOST_NOT_ALLOWED,
149
- RAC_VALIDATION_PRODUCTION_DEBUG_BUILD
150
- } rac_validation_result_t;
151
-
152
- /**
153
- * @brief Validate API key for the given environment
154
- * @param api_key The API key to validate (can be NULL)
155
- * @param env The target environment
156
- * @return RAC_VALIDATION_OK if valid, error code otherwise
157
- */
158
- rac_validation_result_t rac_validate_api_key(const char* api_key, rac_environment_t env);
159
-
160
- /**
161
- * @brief Validate base URL for the given environment
162
- * @param url The URL to validate (can be NULL)
163
- * @param env The target environment
164
- * @return RAC_VALIDATION_OK if valid, error code otherwise
165
- */
166
- rac_validation_result_t rac_validate_base_url(const char* url, rac_environment_t env);
167
-
168
- /**
169
- * @brief Validate complete SDK configuration
170
- * @param config The configuration to validate
171
- * @return RAC_VALIDATION_OK if valid, first error code otherwise
172
- */
173
- rac_validation_result_t rac_validate_config(const rac_sdk_config_t* config);
174
-
175
- /**
176
- * @brief Get error message for validation result
177
- * @param result The validation result code
178
- * @return Human-readable error message
179
- */
180
- const char* rac_validation_error_message(rac_validation_result_t result);
181
-
182
- // =============================================================================
183
- // Global SDK State
184
- // =============================================================================
185
-
186
- /**
187
- * @brief Initialize SDK with configuration
188
- * @param config The SDK configuration
189
- * @return RAC_VALIDATION_OK on success, error code on validation failure
190
- */
191
- RAC_API rac_validation_result_t rac_sdk_init(const rac_sdk_config_t* config);
192
-
193
- /**
194
- * @brief Get current SDK configuration
195
- * @return Pointer to current config, or NULL if not initialized
196
- */
197
- RAC_API const rac_sdk_config_t* rac_sdk_get_config(void);
198
-
199
- /**
200
- * @brief Get current environment
201
- * @return Current environment, or RAC_ENV_DEVELOPMENT if not initialized
202
- */
203
- RAC_API rac_environment_t rac_sdk_get_environment(void);
204
-
205
- /**
206
- * @brief Check if SDK is initialized
207
- * @return true if rac_sdk_init has been called successfully
208
- */
209
- RAC_API bool rac_sdk_is_initialized(void);
210
-
211
- /**
212
- * @brief Reset SDK state (for testing)
213
- */
214
- RAC_API void rac_sdk_reset(void);
215
-
216
- #ifdef __cplusplus
217
- }
218
- #endif
219
-
220
- #endif // RAC_ENVIRONMENT_H