cactus-react-native 0.2.11 → 1.0.2

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 (510) hide show
  1. package/Cactus.podspec +34 -0
  2. package/LICENSE +38 -0
  3. package/README.md +550 -69
  4. package/android/CMakeLists.txt +40 -0
  5. package/android/build.gradle +68 -44
  6. package/android/gradle.properties +5 -5
  7. package/android/src/main/AndroidManifest.xml +1 -3
  8. package/android/src/main/cpp/cpp-adapter.cpp +6 -0
  9. package/android/src/main/java/com/margelo/nitro/cactus/CactusPackage.kt +22 -0
  10. package/android/src/main/java/com/margelo/nitro/cactus/HybridCactusCrypto.kt +38 -0
  11. package/android/src/main/java/com/margelo/nitro/cactus/HybridCactusDeviceInfo.kt +24 -0
  12. package/android/src/main/java/com/margelo/nitro/cactus/HybridCactusFileSystem.kt +227 -0
  13. package/android/src/main/jniLibs/arm64-v8a/{libcactus_v8.so → libcactus.a} +0 -0
  14. package/android/src/main/jniLibs/arm64-v8a/libcactus_util.so +0 -0
  15. package/cpp/HybridCactus.cpp +135 -0
  16. package/cpp/HybridCactus.hpp +42 -0
  17. package/cpp/HybridCactusUtil.cpp +47 -0
  18. package/cpp/HybridCactusUtil.hpp +26 -0
  19. package/cpp/cactus_ffi.h +55 -0
  20. package/cpp/cactus_util.h +25 -0
  21. package/ios/HybridCactusCrypto.swift +37 -0
  22. package/ios/HybridCactusDeviceInfo.swift +32 -0
  23. package/ios/HybridCactusFileSystem.swift +234 -0
  24. package/ios/cactus.xcframework/{info.plist → Info.plist} +2 -37
  25. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/cactus.h +8 -229
  26. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/cactus_ffi.h +28 -229
  27. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/engine.h +545 -0
  28. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/ffi_utils.h +400 -0
  29. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/graph.h +338 -0
  30. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/kernel.h +275 -0
  31. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/kernel_utils.h +343 -0
  32. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Info.plist +0 -0
  33. package/ios/cactus.xcframework/ios-arm64/cactus.framework/cactus +0 -0
  34. package/ios/cactus.xcframework/ios-arm64-simulator/cactus.framework/Headers/cactus.h +11 -0
  35. package/ios/cactus.xcframework/ios-arm64-simulator/cactus.framework/Headers/cactus_ffi.h +55 -0
  36. package/ios/cactus.xcframework/ios-arm64-simulator/cactus.framework/Headers/engine.h +545 -0
  37. package/ios/cactus.xcframework/ios-arm64-simulator/cactus.framework/Headers/ffi_utils.h +400 -0
  38. package/ios/cactus.xcframework/ios-arm64-simulator/cactus.framework/Headers/graph.h +338 -0
  39. package/ios/cactus.xcframework/ios-arm64-simulator/cactus.framework/Headers/kernel.h +275 -0
  40. package/ios/cactus.xcframework/ios-arm64-simulator/cactus.framework/Headers/kernel_utils.h +343 -0
  41. package/ios/cactus.xcframework/ios-arm64-simulator/cactus.framework/Info.plist +0 -0
  42. package/ios/cactus.xcframework/{tvos-arm64_x86_64-simulator → ios-arm64-simulator}/cactus.framework/_CodeSignature/CodeResources +1 -1
  43. package/ios/cactus.xcframework/ios-arm64-simulator/cactus.framework/cactus +0 -0
  44. package/ios/cactus_util.xcframework/Info.plist +39 -0
  45. package/ios/cactus_util.xcframework/ios-arm64/cactus_util.framework/Headers/cactus_util.h +25 -0
  46. package/ios/cactus_util.xcframework/ios-arm64/cactus_util.framework/Headers/ios_utils.h +10 -0
  47. package/ios/cactus_util.xcframework/ios-arm64/cactus_util.framework/Headers/logging.h +25 -0
  48. package/ios/cactus_util.xcframework/ios-arm64/cactus_util.framework/Info.plist +0 -0
  49. package/ios/cactus_util.xcframework/ios-arm64/cactus_util.framework/cactus_util +0 -0
  50. package/ios/cactus_util.xcframework/ios-arm64-simulator/cactus_util.framework/Headers/cactus_util.h +25 -0
  51. package/ios/cactus_util.xcframework/ios-arm64-simulator/cactus_util.framework/Headers/ios_utils.h +10 -0
  52. package/ios/cactus_util.xcframework/ios-arm64-simulator/cactus_util.framework/Headers/logging.h +25 -0
  53. package/ios/{cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework → cactus_util.xcframework/ios-arm64-simulator/cactus_util.framework}/Info.plist +0 -0
  54. package/ios/{cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework → cactus_util.xcframework/ios-arm64-simulator/cactus_util.framework}/_CodeSignature/CodeResources +36 -2
  55. package/ios/cactus_util.xcframework/ios-arm64-simulator/cactus_util.framework/cactus_util +0 -0
  56. package/lib/module/api/Database.js +60 -0
  57. package/lib/module/api/Database.js.map +1 -0
  58. package/lib/module/classes/CactusLM.js +151 -0
  59. package/lib/module/classes/CactusLM.js.map +1 -0
  60. package/lib/module/config/CactusConfig.js +6 -0
  61. package/lib/module/config/CactusConfig.js.map +1 -0
  62. package/lib/module/constants/packageVersion.js +4 -0
  63. package/lib/module/constants/packageVersion.js.map +1 -0
  64. package/lib/module/hooks/useCactusLM.js +238 -0
  65. package/lib/module/hooks/useCactusLM.js.map +1 -0
  66. package/lib/module/index.js +9 -409
  67. package/lib/module/index.js.map +1 -1
  68. package/lib/module/native/Cactus.js +50 -0
  69. package/lib/module/native/Cactus.js.map +1 -0
  70. package/lib/module/native/CactusCrypto.js +10 -0
  71. package/lib/module/native/CactusCrypto.js.map +1 -0
  72. package/lib/module/native/CactusDeviceInfo.js +13 -0
  73. package/lib/module/native/CactusDeviceInfo.js.map +1 -0
  74. package/lib/module/native/CactusFileSystem.js +35 -0
  75. package/lib/module/native/CactusFileSystem.js.map +1 -0
  76. package/lib/module/native/CactusUtil.js +23 -0
  77. package/lib/module/native/CactusUtil.js.map +1 -0
  78. package/lib/module/native/index.js +8 -0
  79. package/lib/module/native/index.js.map +1 -0
  80. package/lib/module/specs/Cactus.nitro.js +4 -0
  81. package/lib/module/specs/Cactus.nitro.js.map +1 -0
  82. package/lib/module/specs/CactusCrypto.nitro.js +4 -0
  83. package/lib/module/specs/CactusCrypto.nitro.js.map +1 -0
  84. package/lib/module/specs/CactusDeviceInfo.nitro.js +4 -0
  85. package/lib/module/specs/CactusDeviceInfo.nitro.js.map +1 -0
  86. package/lib/module/specs/CactusFileSystem.nitro.js +4 -0
  87. package/lib/module/specs/CactusFileSystem.nitro.js.map +1 -0
  88. package/lib/module/specs/CactusUtil.nitro.js +4 -0
  89. package/lib/module/specs/CactusUtil.nitro.js.map +1 -0
  90. package/lib/module/telemetry/Telemetry.js +100 -0
  91. package/lib/module/telemetry/Telemetry.js.map +1 -0
  92. package/lib/module/types/CactusLM.js +2 -0
  93. package/lib/module/types/CactusLM.js.map +1 -0
  94. package/lib/module/types/CactusModel.js +2 -0
  95. package/lib/module/types/CactusModel.js.map +1 -0
  96. package/lib/module/utils/error.js +4 -0
  97. package/lib/module/utils/error.js.map +1 -0
  98. package/lib/typescript/package.json +1 -0
  99. package/lib/typescript/src/api/Database.d.ts +11 -0
  100. package/lib/typescript/src/api/Database.d.ts.map +1 -0
  101. package/lib/typescript/src/classes/CactusLM.d.ts +26 -0
  102. package/lib/typescript/src/classes/CactusLM.d.ts.map +1 -0
  103. package/lib/typescript/src/config/CactusConfig.d.ts +5 -0
  104. package/lib/typescript/src/config/CactusConfig.d.ts.map +1 -0
  105. package/lib/typescript/src/constants/packageVersion.d.ts +2 -0
  106. package/lib/typescript/src/constants/packageVersion.d.ts.map +1 -0
  107. package/lib/typescript/src/hooks/useCactusLM.d.ts +20 -0
  108. package/lib/typescript/src/hooks/useCactusLM.d.ts.map +1 -0
  109. package/lib/typescript/src/index.d.ts +6 -0
  110. package/lib/typescript/src/index.d.ts.map +1 -0
  111. package/lib/typescript/src/native/Cactus.d.ts +11 -0
  112. package/lib/typescript/src/native/Cactus.d.ts.map +1 -0
  113. package/lib/typescript/src/native/CactusCrypto.d.ts +5 -0
  114. package/lib/typescript/src/native/CactusCrypto.d.ts.map +1 -0
  115. package/lib/typescript/src/native/CactusDeviceInfo.d.ts +7 -0
  116. package/lib/typescript/src/native/CactusDeviceInfo.d.ts.map +1 -0
  117. package/lib/typescript/src/native/CactusFileSystem.d.ts +13 -0
  118. package/lib/typescript/src/native/CactusFileSystem.d.ts.map +1 -0
  119. package/lib/typescript/src/native/CactusUtil.d.ts +6 -0
  120. package/lib/typescript/src/native/CactusUtil.d.ts.map +1 -0
  121. package/lib/typescript/src/native/index.d.ts +6 -0
  122. package/lib/typescript/src/native/index.d.ts.map +1 -0
  123. package/lib/typescript/src/specs/Cactus.nitro.d.ts +13 -0
  124. package/lib/typescript/src/specs/Cactus.nitro.d.ts.map +1 -0
  125. package/lib/typescript/src/specs/CactusCrypto.nitro.d.ts +8 -0
  126. package/lib/typescript/src/specs/CactusCrypto.nitro.d.ts.map +1 -0
  127. package/lib/typescript/src/specs/CactusDeviceInfo.nitro.d.ts +16 -0
  128. package/lib/typescript/src/specs/CactusDeviceInfo.nitro.d.ts.map +1 -0
  129. package/lib/typescript/src/specs/CactusFileSystem.nitro.d.ts +16 -0
  130. package/lib/typescript/src/specs/CactusFileSystem.nitro.d.ts.map +1 -0
  131. package/lib/typescript/src/specs/CactusUtil.nitro.d.ts +10 -0
  132. package/lib/typescript/src/specs/CactusUtil.nitro.d.ts.map +1 -0
  133. package/lib/typescript/src/telemetry/Telemetry.d.ts +30 -0
  134. package/lib/typescript/src/telemetry/Telemetry.d.ts.map +1 -0
  135. package/lib/typescript/src/types/CactusLM.d.ts +67 -0
  136. package/lib/typescript/src/types/CactusLM.d.ts.map +1 -0
  137. package/lib/typescript/src/types/CactusModel.d.ts +12 -0
  138. package/lib/typescript/src/types/CactusModel.d.ts.map +1 -0
  139. package/lib/typescript/src/utils/error.d.ts +2 -0
  140. package/lib/typescript/src/utils/error.d.ts.map +1 -0
  141. package/nitro.json +31 -0
  142. package/nitrogen/generated/android/c++/JDeviceInfo.hpp +74 -0
  143. package/nitrogen/generated/android/c++/JFunc_void_double.hpp +74 -0
  144. package/nitrogen/generated/android/c++/JHybridCactusCryptoSpec.cpp +65 -0
  145. package/nitrogen/generated/android/c++/JHybridCactusCryptoSpec.hpp +65 -0
  146. package/nitrogen/generated/android/c++/JHybridCactusDeviceInfoSpec.cpp +85 -0
  147. package/nitrogen/generated/android/c++/JHybridCactusDeviceInfoSpec.hpp +66 -0
  148. package/nitrogen/generated/android/c++/JHybridCactusFileSystemSpec.cpp +192 -0
  149. package/nitrogen/generated/android/c++/JHybridCactusFileSystemSpec.hpp +73 -0
  150. package/nitrogen/generated/android/cactus+autolinking.cmake +87 -0
  151. package/nitrogen/generated/android/cactus+autolinking.gradle +27 -0
  152. package/nitrogen/generated/android/cactusOnLoad.cpp +86 -0
  153. package/nitrogen/generated/android/cactusOnLoad.hpp +25 -0
  154. package/nitrogen/generated/android/kotlin/com/margelo/nitro/cactus/DeviceInfo.kt +50 -0
  155. package/nitrogen/generated/android/kotlin/com/margelo/nitro/cactus/Func_void_double.kt +80 -0
  156. package/nitrogen/generated/android/kotlin/com/margelo/nitro/cactus/HybridCactusCryptoSpec.kt +58 -0
  157. package/nitrogen/generated/android/kotlin/com/margelo/nitro/cactus/HybridCactusDeviceInfoSpec.kt +62 -0
  158. package/nitrogen/generated/android/kotlin/com/margelo/nitro/cactus/HybridCactusFileSystemSpec.kt +95 -0
  159. package/nitrogen/generated/android/kotlin/com/margelo/nitro/cactus/cactusOnLoad.kt +35 -0
  160. package/nitrogen/generated/ios/Cactus+autolinking.rb +60 -0
  161. package/nitrogen/generated/ios/Cactus-Swift-Cxx-Bridge.cpp +122 -0
  162. package/nitrogen/generated/ios/Cactus-Swift-Cxx-Bridge.hpp +373 -0
  163. package/nitrogen/generated/ios/Cactus-Swift-Cxx-Umbrella.hpp +60 -0
  164. package/nitrogen/generated/ios/CactusAutolinking.mm +69 -0
  165. package/nitrogen/generated/ios/CactusAutolinking.swift +55 -0
  166. package/nitrogen/generated/ios/c++/HybridCactusCryptoSpecSwift.cpp +11 -0
  167. package/nitrogen/generated/ios/c++/HybridCactusCryptoSpecSwift.hpp +77 -0
  168. package/nitrogen/generated/ios/c++/HybridCactusDeviceInfoSpecSwift.cpp +11 -0
  169. package/nitrogen/generated/ios/c++/HybridCactusDeviceInfoSpecSwift.hpp +88 -0
  170. package/nitrogen/generated/ios/c++/HybridCactusFileSystemSpecSwift.cpp +11 -0
  171. package/nitrogen/generated/ios/c++/HybridCactusFileSystemSpecSwift.hpp +143 -0
  172. package/nitrogen/generated/ios/swift/DeviceInfo.swift +98 -0
  173. package/nitrogen/generated/ios/swift/Func_void.swift +47 -0
  174. package/nitrogen/generated/ios/swift/Func_void_DeviceInfo.swift +47 -0
  175. package/nitrogen/generated/ios/swift/Func_void_bool.swift +47 -0
  176. package/nitrogen/generated/ios/swift/Func_void_double.swift +47 -0
  177. package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
  178. package/nitrogen/generated/ios/swift/Func_void_std__optional_std__string_.swift +54 -0
  179. package/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
  180. package/nitrogen/generated/ios/swift/HybridCactusCryptoSpec.swift +57 -0
  181. package/nitrogen/generated/ios/swift/HybridCactusCryptoSpec_cxx.swift +139 -0
  182. package/nitrogen/generated/ios/swift/HybridCactusDeviceInfoSpec.swift +58 -0
  183. package/nitrogen/generated/ios/swift/HybridCactusDeviceInfoSpec_cxx.swift +164 -0
  184. package/nitrogen/generated/ios/swift/HybridCactusFileSystemSpec.swift +65 -0
  185. package/nitrogen/generated/ios/swift/HybridCactusFileSystemSpec_cxx.swift +303 -0
  186. package/nitrogen/generated/shared/c++/DeviceInfo.hpp +92 -0
  187. package/nitrogen/generated/shared/c++/HybridCactusCryptoSpec.cpp +21 -0
  188. package/nitrogen/generated/shared/c++/HybridCactusCryptoSpec.hpp +63 -0
  189. package/nitrogen/generated/shared/c++/HybridCactusDeviceInfoSpec.cpp +22 -0
  190. package/nitrogen/generated/shared/c++/HybridCactusDeviceInfoSpec.hpp +67 -0
  191. package/nitrogen/generated/shared/c++/HybridCactusFileSystemSpec.cpp +29 -0
  192. package/nitrogen/generated/shared/c++/HybridCactusFileSystemSpec.hpp +73 -0
  193. package/nitrogen/generated/shared/c++/HybridCactusSpec.cpp +26 -0
  194. package/nitrogen/generated/shared/c++/HybridCactusSpec.hpp +71 -0
  195. package/nitrogen/generated/shared/c++/HybridCactusUtilSpec.cpp +23 -0
  196. package/nitrogen/generated/shared/c++/HybridCactusUtilSpec.hpp +66 -0
  197. package/package.json +84 -143
  198. package/src/api/Database.ts +83 -0
  199. package/src/classes/CactusLM.ts +205 -0
  200. package/src/config/CactusConfig.ts +4 -0
  201. package/src/constants/packageVersion.ts +1 -0
  202. package/src/hooks/useCactusLM.ts +285 -0
  203. package/src/index.tsx +23 -0
  204. package/src/native/Cactus.ts +83 -0
  205. package/src/native/CactusCrypto.ts +11 -0
  206. package/src/native/CactusDeviceInfo.ts +18 -0
  207. package/src/native/CactusFileSystem.ts +47 -0
  208. package/src/native/CactusUtil.ts +27 -0
  209. package/src/native/index.ts +5 -0
  210. package/src/specs/Cactus.nitro.ts +20 -0
  211. package/src/specs/CactusCrypto.nitro.ts +6 -0
  212. package/src/specs/CactusDeviceInfo.nitro.ts +15 -0
  213. package/src/specs/CactusFileSystem.nitro.ts +21 -0
  214. package/src/specs/CactusUtil.nitro.ts +8 -0
  215. package/src/telemetry/Telemetry.ts +159 -0
  216. package/src/types/CactusLM.ts +73 -0
  217. package/src/types/CactusModel.ts +14 -0
  218. package/src/utils/error.ts +2 -0
  219. package/LICENSE.txt +0 -20
  220. package/android/src/main/CMakeLists.txt +0 -140
  221. package/android/src/main/java/com/cactus/Cactus.java +0 -1190
  222. package/android/src/main/java/com/cactus/CactusPackage.java +0 -48
  223. package/android/src/main/java/com/cactus/LlamaContext.java +0 -748
  224. package/android/src/main/jni-utils.h +0 -100
  225. package/android/src/main/jni.cpp +0 -1605
  226. package/android/src/main/jniLibs/arm64-v8a/libcactus.so +0 -0
  227. package/android/src/main/jniLibs/arm64-v8a/libcactus_v8_2.so +0 -0
  228. package/android/src/main/jniLibs/arm64-v8a/libcactus_v8_2_dotprod.so +0 -0
  229. package/android/src/main/jniLibs/arm64-v8a/libcactus_v8_2_dotprod_i8mm.so +0 -0
  230. package/android/src/main/jniLibs/arm64-v8a/libcactus_v8_2_i8mm.so +0 -0
  231. package/android/src/newarch/java/com/cactus/CactusModule.java +0 -204
  232. package/android/src/oldarch/java/com/cactus/CactusModule.java +0 -205
  233. package/cactus-react-native.podspec +0 -42
  234. package/ios/CMakeLists.txt +0 -131
  235. package/ios/Cactus.h +0 -6
  236. package/ios/Cactus.mm +0 -681
  237. package/ios/CactusContext.h +0 -81
  238. package/ios/CactusContext.mm +0 -1032
  239. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/chat.h +0 -145
  240. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/common.h +0 -674
  241. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/ggml-alloc.h +0 -76
  242. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/ggml-backend-impl.h +0 -255
  243. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/ggml-backend.h +0 -354
  244. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/ggml-common.h +0 -1857
  245. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/ggml-cpp.h +0 -39
  246. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/ggml-cpu.h +0 -143
  247. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/ggml-impl.h +0 -601
  248. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/ggml-metal-impl.h +0 -622
  249. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/ggml-metal.h +0 -66
  250. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/ggml-opt.h +0 -237
  251. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/ggml-quants.h +0 -100
  252. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/ggml-threading.h +0 -14
  253. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/ggml.h +0 -2202
  254. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/gguf.h +0 -202
  255. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/json-schema-to-grammar.h +0 -21
  256. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/json.hpp +0 -24766
  257. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/llama-adapter.h +0 -76
  258. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/llama-arch.h +0 -437
  259. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/llama-batch.h +0 -89
  260. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/llama-chat.h +0 -58
  261. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/llama-context.h +0 -276
  262. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/llama-cparams.h +0 -39
  263. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/llama-cpp.h +0 -30
  264. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/llama-grammar.h +0 -173
  265. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/llama-graph.h +0 -640
  266. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/llama-hparams.h +0 -190
  267. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/llama-impl.h +0 -61
  268. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/llama-io.h +0 -35
  269. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/llama-kv-cache.h +0 -515
  270. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/llama-memory.h +0 -32
  271. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/llama-mmap.h +0 -68
  272. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/llama-model-loader.h +0 -169
  273. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/llama-model-saver.h +0 -37
  274. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/llama-model.h +0 -425
  275. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/llama-sampling.h +0 -32
  276. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/llama-vocab.h +0 -131
  277. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/llama.h +0 -1376
  278. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/log.h +0 -103
  279. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/minja/chat-template.hpp +0 -542
  280. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/minja/minja.hpp +0 -2974
  281. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/sampling.h +0 -107
  282. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/unicode-data.h +0 -20
  283. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/unicode.h +0 -66
  284. package/ios/cactus.xcframework/ios-arm64/cactus.framework/ggml-llama.metallib +0 -0
  285. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/cactus.h +0 -232
  286. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/cactus_ffi.h +0 -256
  287. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/chat.h +0 -145
  288. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/common.h +0 -674
  289. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/ggml-alloc.h +0 -76
  290. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/ggml-backend-impl.h +0 -255
  291. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/ggml-backend.h +0 -354
  292. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/ggml-common.h +0 -1857
  293. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/ggml-cpp.h +0 -39
  294. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/ggml-cpu.h +0 -143
  295. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/ggml-impl.h +0 -601
  296. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/ggml-metal-impl.h +0 -622
  297. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/ggml-metal.h +0 -66
  298. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/ggml-opt.h +0 -237
  299. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/ggml-quants.h +0 -100
  300. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/ggml-threading.h +0 -14
  301. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/ggml.h +0 -2202
  302. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/gguf.h +0 -202
  303. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/json-schema-to-grammar.h +0 -21
  304. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/json.hpp +0 -24766
  305. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/llama-adapter.h +0 -76
  306. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/llama-arch.h +0 -437
  307. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/llama-batch.h +0 -89
  308. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/llama-chat.h +0 -58
  309. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/llama-context.h +0 -276
  310. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/llama-cparams.h +0 -39
  311. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/llama-cpp.h +0 -30
  312. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/llama-grammar.h +0 -173
  313. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/llama-graph.h +0 -640
  314. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/llama-hparams.h +0 -190
  315. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/llama-impl.h +0 -61
  316. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/llama-io.h +0 -35
  317. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/llama-kv-cache.h +0 -515
  318. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/llama-memory.h +0 -32
  319. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/llama-mmap.h +0 -68
  320. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/llama-model-loader.h +0 -169
  321. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/llama-model-saver.h +0 -37
  322. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/llama-model.h +0 -425
  323. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/llama-sampling.h +0 -32
  324. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/llama-vocab.h +0 -131
  325. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/llama.h +0 -1376
  326. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/log.h +0 -103
  327. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/minja/chat-template.hpp +0 -542
  328. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/minja/minja.hpp +0 -2974
  329. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/sampling.h +0 -107
  330. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/unicode-data.h +0 -20
  331. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/Headers/unicode.h +0 -66
  332. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/cactus +0 -0
  333. package/ios/cactus.xcframework/ios-arm64_x86_64-simulator/cactus.framework/ggml-llama-sim.metallib +0 -0
  334. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/cactus.h +0 -232
  335. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/cactus_ffi.h +0 -256
  336. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/chat.h +0 -145
  337. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/common.h +0 -674
  338. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/ggml-alloc.h +0 -76
  339. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/ggml-backend-impl.h +0 -255
  340. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/ggml-backend.h +0 -354
  341. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/ggml-common.h +0 -1857
  342. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/ggml-cpp.h +0 -39
  343. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/ggml-cpu.h +0 -143
  344. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/ggml-impl.h +0 -601
  345. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/ggml-metal-impl.h +0 -622
  346. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/ggml-metal.h +0 -66
  347. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/ggml-opt.h +0 -237
  348. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/ggml-quants.h +0 -100
  349. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/ggml-threading.h +0 -14
  350. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/ggml.h +0 -2202
  351. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/gguf.h +0 -202
  352. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/json-schema-to-grammar.h +0 -21
  353. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/json.hpp +0 -24766
  354. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/llama-adapter.h +0 -76
  355. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/llama-arch.h +0 -437
  356. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/llama-batch.h +0 -89
  357. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/llama-chat.h +0 -58
  358. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/llama-context.h +0 -276
  359. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/llama-cparams.h +0 -39
  360. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/llama-cpp.h +0 -30
  361. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/llama-grammar.h +0 -173
  362. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/llama-graph.h +0 -640
  363. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/llama-hparams.h +0 -190
  364. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/llama-impl.h +0 -61
  365. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/llama-io.h +0 -35
  366. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/llama-kv-cache.h +0 -515
  367. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/llama-memory.h +0 -32
  368. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/llama-mmap.h +0 -68
  369. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/llama-model-loader.h +0 -169
  370. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/llama-model-saver.h +0 -37
  371. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/llama-model.h +0 -425
  372. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/llama-sampling.h +0 -32
  373. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/llama-vocab.h +0 -131
  374. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/llama.h +0 -1376
  375. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/log.h +0 -103
  376. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/minja/chat-template.hpp +0 -542
  377. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/minja/minja.hpp +0 -2974
  378. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/sampling.h +0 -107
  379. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/unicode-data.h +0 -20
  380. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Headers/unicode.h +0 -66
  381. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/Info.plist +0 -0
  382. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/cactus +0 -0
  383. package/ios/cactus.xcframework/tvos-arm64/cactus.framework/ggml-llama.metallib +0 -0
  384. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/cactus.h +0 -232
  385. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/cactus_ffi.h +0 -256
  386. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/chat.h +0 -145
  387. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/common.h +0 -674
  388. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/ggml-alloc.h +0 -76
  389. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/ggml-backend-impl.h +0 -255
  390. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/ggml-backend.h +0 -354
  391. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/ggml-common.h +0 -1857
  392. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/ggml-cpp.h +0 -39
  393. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/ggml-cpu.h +0 -143
  394. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/ggml-impl.h +0 -601
  395. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/ggml-metal-impl.h +0 -622
  396. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/ggml-metal.h +0 -66
  397. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/ggml-opt.h +0 -237
  398. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/ggml-quants.h +0 -100
  399. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/ggml-threading.h +0 -14
  400. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/ggml.h +0 -2202
  401. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/gguf.h +0 -202
  402. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/json-schema-to-grammar.h +0 -21
  403. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/json.hpp +0 -24766
  404. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/llama-adapter.h +0 -76
  405. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/llama-arch.h +0 -437
  406. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/llama-batch.h +0 -89
  407. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/llama-chat.h +0 -58
  408. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/llama-context.h +0 -276
  409. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/llama-cparams.h +0 -39
  410. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/llama-cpp.h +0 -30
  411. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/llama-grammar.h +0 -173
  412. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/llama-graph.h +0 -640
  413. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/llama-hparams.h +0 -190
  414. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/llama-impl.h +0 -61
  415. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/llama-io.h +0 -35
  416. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/llama-kv-cache.h +0 -515
  417. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/llama-memory.h +0 -32
  418. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/llama-mmap.h +0 -68
  419. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/llama-model-loader.h +0 -169
  420. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/llama-model-saver.h +0 -37
  421. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/llama-model.h +0 -425
  422. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/llama-sampling.h +0 -32
  423. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/llama-vocab.h +0 -131
  424. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/llama.h +0 -1376
  425. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/log.h +0 -103
  426. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/minja/chat-template.hpp +0 -542
  427. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/minja/minja.hpp +0 -2974
  428. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/sampling.h +0 -107
  429. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/unicode-data.h +0 -20
  430. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Headers/unicode.h +0 -66
  431. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/Info.plist +0 -0
  432. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/cactus +0 -0
  433. package/ios/cactus.xcframework/tvos-arm64_x86_64-simulator/cactus.framework/ggml-llama-sim.metallib +0 -0
  434. package/lib/commonjs/NativeCactus.js +0 -9
  435. package/lib/commonjs/NativeCactus.js.map +0 -1
  436. package/lib/commonjs/agent.js +0 -73
  437. package/lib/commonjs/agent.js.map +0 -1
  438. package/lib/commonjs/chat.js +0 -73
  439. package/lib/commonjs/chat.js.map +0 -1
  440. package/lib/commonjs/index.js +0 -523
  441. package/lib/commonjs/index.js.map +0 -1
  442. package/lib/commonjs/lm.js +0 -272
  443. package/lib/commonjs/lm.js.map +0 -1
  444. package/lib/commonjs/package.json +0 -1
  445. package/lib/commonjs/projectId.js +0 -9
  446. package/lib/commonjs/projectId.js.map +0 -1
  447. package/lib/commonjs/remote.js +0 -100
  448. package/lib/commonjs/remote.js.map +0 -1
  449. package/lib/commonjs/telemetry.js +0 -102
  450. package/lib/commonjs/telemetry.js.map +0 -1
  451. package/lib/commonjs/tools.js +0 -72
  452. package/lib/commonjs/tools.js.map +0 -1
  453. package/lib/commonjs/tts.js +0 -141
  454. package/lib/commonjs/tts.js.map +0 -1
  455. package/lib/commonjs/vlm.js +0 -221
  456. package/lib/commonjs/vlm.js.map +0 -1
  457. package/lib/module/NativeCactus.js +0 -5
  458. package/lib/module/NativeCactus.js.map +0 -1
  459. package/lib/module/agent.js +0 -68
  460. package/lib/module/agent.js.map +0 -1
  461. package/lib/module/chat.js +0 -67
  462. package/lib/module/chat.js.map +0 -1
  463. package/lib/module/lm.js +0 -267
  464. package/lib/module/lm.js.map +0 -1
  465. package/lib/module/projectId.js +0 -5
  466. package/lib/module/projectId.js.map +0 -1
  467. package/lib/module/remote.js +0 -91
  468. package/lib/module/remote.js.map +0 -1
  469. package/lib/module/telemetry.js +0 -97
  470. package/lib/module/telemetry.js.map +0 -1
  471. package/lib/module/tools.js +0 -66
  472. package/lib/module/tools.js.map +0 -1
  473. package/lib/module/tts.js +0 -135
  474. package/lib/module/tts.js.map +0 -1
  475. package/lib/module/vlm.js +0 -216
  476. package/lib/module/vlm.js.map +0 -1
  477. package/lib/typescript/NativeCactus.d.ts +0 -252
  478. package/lib/typescript/NativeCactus.d.ts.map +0 -1
  479. package/lib/typescript/agent.d.ts +0 -31
  480. package/lib/typescript/agent.d.ts.map +0 -1
  481. package/lib/typescript/chat.d.ts +0 -23
  482. package/lib/typescript/chat.d.ts.map +0 -1
  483. package/lib/typescript/index.d.ts +0 -114
  484. package/lib/typescript/index.d.ts.map +0 -1
  485. package/lib/typescript/lm.d.ts +0 -36
  486. package/lib/typescript/lm.d.ts.map +0 -1
  487. package/lib/typescript/projectId.d.ts +0 -2
  488. package/lib/typescript/projectId.d.ts.map +0 -1
  489. package/lib/typescript/remote.d.ts +0 -8
  490. package/lib/typescript/remote.d.ts.map +0 -1
  491. package/lib/typescript/telemetry.d.ts +0 -25
  492. package/lib/typescript/telemetry.d.ts.map +0 -1
  493. package/lib/typescript/tools.d.ts +0 -36
  494. package/lib/typescript/tools.d.ts.map +0 -1
  495. package/lib/typescript/tts.d.ts +0 -54
  496. package/lib/typescript/tts.d.ts.map +0 -1
  497. package/lib/typescript/vlm.d.ts +0 -33
  498. package/lib/typescript/vlm.d.ts.map +0 -1
  499. package/scripts/postInstall.js +0 -33
  500. package/src/NativeCactus.ts +0 -317
  501. package/src/agent.ts +0 -112
  502. package/src/chat.ts +0 -91
  503. package/src/index.ts +0 -663
  504. package/src/lm.ts +0 -324
  505. package/src/projectId.ts +0 -1
  506. package/src/remote.ts +0 -113
  507. package/src/telemetry.ts +0 -137
  508. package/src/tools.ts +0 -94
  509. package/src/tts.ts +0 -236
  510. package/src/vlm.ts +0 -276
@@ -0,0 +1,65 @@
1
+ ///
2
+ /// HybridCactusFileSystemSpec.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ import Foundation
9
+ import NitroModules
10
+ import NitroModules
11
+
12
+ /// See ``HybridCactusFileSystemSpec``
13
+ public protocol HybridCactusFileSystemSpec_protocol: HybridObject {
14
+ // Properties
15
+
16
+
17
+ // Methods
18
+ func getCactusDirectory() throws -> Promise<String>
19
+ func fileExists(path: String) throws -> Promise<Bool>
20
+ func writeFile(path: String, content: String) throws -> Promise<Void>
21
+ func readFile(path: String) throws -> Promise<String>
22
+ func deleteFile(path: String) throws -> Promise<Void>
23
+ func modelExists(model: String) throws -> Promise<Bool>
24
+ func getModelPath(model: String) throws -> Promise<String>
25
+ func downloadModel(model: String, from: String, callback: ((_ progress: Double) -> Void)?) throws -> Promise<Void>
26
+ func deleteModel(model: String) throws -> Promise<Void>
27
+ }
28
+
29
+ public extension HybridCactusFileSystemSpec_protocol {
30
+ /// Default implementation of ``HybridObject.toString``
31
+ func toString() -> String {
32
+ return "[HybridObject CactusFileSystem]"
33
+ }
34
+ }
35
+
36
+ /// See ``HybridCactusFileSystemSpec``
37
+ open class HybridCactusFileSystemSpec_base {
38
+ private weak var cxxWrapper: HybridCactusFileSystemSpec_cxx? = nil
39
+ public init() { }
40
+ public func getCxxWrapper() -> HybridCactusFileSystemSpec_cxx {
41
+ #if DEBUG
42
+ guard self is HybridCactusFileSystemSpec else {
43
+ fatalError("`self` is not a `HybridCactusFileSystemSpec`! Did you accidentally inherit from `HybridCactusFileSystemSpec_base` instead of `HybridCactusFileSystemSpec`?")
44
+ }
45
+ #endif
46
+ if let cxxWrapper = self.cxxWrapper {
47
+ return cxxWrapper
48
+ } else {
49
+ let cxxWrapper = HybridCactusFileSystemSpec_cxx(self as! HybridCactusFileSystemSpec)
50
+ self.cxxWrapper = cxxWrapper
51
+ return cxxWrapper
52
+ }
53
+ }
54
+ }
55
+
56
+ /**
57
+ * A Swift base-protocol representing the CactusFileSystem HybridObject.
58
+ * Implement this protocol to create Swift-based instances of CactusFileSystem.
59
+ * ```swift
60
+ * class HybridCactusFileSystem : HybridCactusFileSystemSpec {
61
+ * // ...
62
+ * }
63
+ * ```
64
+ */
65
+ public typealias HybridCactusFileSystemSpec = HybridCactusFileSystemSpec_protocol & HybridCactusFileSystemSpec_base
@@ -0,0 +1,303 @@
1
+ ///
2
+ /// HybridCactusFileSystemSpec_cxx.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ import Foundation
9
+ import NitroModules
10
+ import NitroModules
11
+
12
+ /**
13
+ * A class implementation that bridges HybridCactusFileSystemSpec over to C++.
14
+ * In C++, we cannot use Swift protocols - so we need to wrap it in a class to make it strongly defined.
15
+ *
16
+ * Also, some Swift types need to be bridged with special handling:
17
+ * - Enums need to be wrapped in Structs, otherwise they cannot be accessed bi-directionally (Swift bug: https://github.com/swiftlang/swift/issues/75330)
18
+ * - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
19
+ * - Throwing methods need to be wrapped with a Result<T, Error> type, as exceptions cannot be propagated to C++
20
+ */
21
+ open class HybridCactusFileSystemSpec_cxx {
22
+ /**
23
+ * The Swift <> C++ bridge's namespace (`margelo::nitro::cactus::bridge::swift`)
24
+ * from `Cactus-Swift-Cxx-Bridge.hpp`.
25
+ * This contains specialized C++ templates, and C++ helper functions that can be accessed from Swift.
26
+ */
27
+ public typealias bridge = margelo.nitro.cactus.bridge.swift
28
+
29
+ /**
30
+ * Holds an instance of the `HybridCactusFileSystemSpec` Swift protocol.
31
+ */
32
+ private var __implementation: any HybridCactusFileSystemSpec
33
+
34
+ /**
35
+ * Holds a weak pointer to the C++ class that wraps the Swift class.
36
+ */
37
+ private var __cxxPart: bridge.std__weak_ptr_HybridCactusFileSystemSpec_
38
+
39
+ /**
40
+ * Create a new `HybridCactusFileSystemSpec_cxx` that wraps the given `HybridCactusFileSystemSpec`.
41
+ * All properties and methods bridge to C++ types.
42
+ */
43
+ public init(_ implementation: any HybridCactusFileSystemSpec) {
44
+ self.__implementation = implementation
45
+ self.__cxxPart = .init()
46
+ /* no base class */
47
+ }
48
+
49
+ /**
50
+ * Get the actual `HybridCactusFileSystemSpec` instance this class wraps.
51
+ */
52
+ @inline(__always)
53
+ public func getHybridCactusFileSystemSpec() -> any HybridCactusFileSystemSpec {
54
+ return __implementation
55
+ }
56
+
57
+ /**
58
+ * Casts this instance to a retained unsafe raw pointer.
59
+ * This acquires one additional strong reference on the object!
60
+ */
61
+ public func toUnsafe() -> UnsafeMutableRawPointer {
62
+ return Unmanaged.passRetained(self).toOpaque()
63
+ }
64
+
65
+ /**
66
+ * Casts an unsafe pointer to a `HybridCactusFileSystemSpec_cxx`.
67
+ * The pointer has to be a retained opaque `Unmanaged<HybridCactusFileSystemSpec_cxx>`.
68
+ * This removes one strong reference from the object!
69
+ */
70
+ public class func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> HybridCactusFileSystemSpec_cxx {
71
+ return Unmanaged<HybridCactusFileSystemSpec_cxx>.fromOpaque(pointer).takeRetainedValue()
72
+ }
73
+
74
+ /**
75
+ * Gets (or creates) the C++ part of this Hybrid Object.
76
+ * The C++ part is a `std::shared_ptr<HybridCactusFileSystemSpec>`.
77
+ */
78
+ public func getCxxPart() -> bridge.std__shared_ptr_HybridCactusFileSystemSpec_ {
79
+ let cachedCxxPart = self.__cxxPart.lock()
80
+ if Bool(fromCxx: cachedCxxPart) {
81
+ return cachedCxxPart
82
+ } else {
83
+ let newCxxPart = bridge.create_std__shared_ptr_HybridCactusFileSystemSpec_(self.toUnsafe())
84
+ __cxxPart = bridge.weakify_std__shared_ptr_HybridCactusFileSystemSpec_(newCxxPart)
85
+ return newCxxPart
86
+ }
87
+ }
88
+
89
+
90
+
91
+ /**
92
+ * Get the memory size of the Swift class (plus size of any other allocations)
93
+ * so the JS VM can properly track it and garbage-collect the JS object if needed.
94
+ */
95
+ @inline(__always)
96
+ public var memorySize: Int {
97
+ return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
98
+ }
99
+
100
+ /**
101
+ * Call dispose() on the Swift class.
102
+ * This _may_ be called manually from JS.
103
+ */
104
+ @inline(__always)
105
+ public func dispose() {
106
+ self.__implementation.dispose()
107
+ }
108
+
109
+ /**
110
+ * Call toString() on the Swift class.
111
+ */
112
+ @inline(__always)
113
+ public func toString() -> String {
114
+ return self.__implementation.toString()
115
+ }
116
+
117
+ // Properties
118
+
119
+
120
+ // Methods
121
+ @inline(__always)
122
+ public final func getCactusDirectory() -> bridge.Result_std__shared_ptr_Promise_std__string___ {
123
+ do {
124
+ let __result = try self.__implementation.getCactusDirectory()
125
+ let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__string__ in
126
+ let __promise = bridge.create_std__shared_ptr_Promise_std__string__()
127
+ let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__string__(__promise)
128
+ __result
129
+ .then({ __result in __promiseHolder.resolve(std.string(__result)) })
130
+ .catch({ __error in __promiseHolder.reject(__error.toCpp()) })
131
+ return __promise
132
+ }()
133
+ return bridge.create_Result_std__shared_ptr_Promise_std__string___(__resultCpp)
134
+ } catch (let __error) {
135
+ let __exceptionPtr = __error.toCpp()
136
+ return bridge.create_Result_std__shared_ptr_Promise_std__string___(__exceptionPtr)
137
+ }
138
+ }
139
+
140
+ @inline(__always)
141
+ public final func fileExists(path: std.string) -> bridge.Result_std__shared_ptr_Promise_bool___ {
142
+ do {
143
+ let __result = try self.__implementation.fileExists(path: String(path))
144
+ let __resultCpp = { () -> bridge.std__shared_ptr_Promise_bool__ in
145
+ let __promise = bridge.create_std__shared_ptr_Promise_bool__()
146
+ let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_bool__(__promise)
147
+ __result
148
+ .then({ __result in __promiseHolder.resolve(__result) })
149
+ .catch({ __error in __promiseHolder.reject(__error.toCpp()) })
150
+ return __promise
151
+ }()
152
+ return bridge.create_Result_std__shared_ptr_Promise_bool___(__resultCpp)
153
+ } catch (let __error) {
154
+ let __exceptionPtr = __error.toCpp()
155
+ return bridge.create_Result_std__shared_ptr_Promise_bool___(__exceptionPtr)
156
+ }
157
+ }
158
+
159
+ @inline(__always)
160
+ public final func writeFile(path: std.string, content: std.string) -> bridge.Result_std__shared_ptr_Promise_void___ {
161
+ do {
162
+ let __result = try self.__implementation.writeFile(path: String(path), content: String(content))
163
+ let __resultCpp = { () -> bridge.std__shared_ptr_Promise_void__ in
164
+ let __promise = bridge.create_std__shared_ptr_Promise_void__()
165
+ let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_void__(__promise)
166
+ __result
167
+ .then({ __result in __promiseHolder.resolve() })
168
+ .catch({ __error in __promiseHolder.reject(__error.toCpp()) })
169
+ return __promise
170
+ }()
171
+ return bridge.create_Result_std__shared_ptr_Promise_void___(__resultCpp)
172
+ } catch (let __error) {
173
+ let __exceptionPtr = __error.toCpp()
174
+ return bridge.create_Result_std__shared_ptr_Promise_void___(__exceptionPtr)
175
+ }
176
+ }
177
+
178
+ @inline(__always)
179
+ public final func readFile(path: std.string) -> bridge.Result_std__shared_ptr_Promise_std__string___ {
180
+ do {
181
+ let __result = try self.__implementation.readFile(path: String(path))
182
+ let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__string__ in
183
+ let __promise = bridge.create_std__shared_ptr_Promise_std__string__()
184
+ let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__string__(__promise)
185
+ __result
186
+ .then({ __result in __promiseHolder.resolve(std.string(__result)) })
187
+ .catch({ __error in __promiseHolder.reject(__error.toCpp()) })
188
+ return __promise
189
+ }()
190
+ return bridge.create_Result_std__shared_ptr_Promise_std__string___(__resultCpp)
191
+ } catch (let __error) {
192
+ let __exceptionPtr = __error.toCpp()
193
+ return bridge.create_Result_std__shared_ptr_Promise_std__string___(__exceptionPtr)
194
+ }
195
+ }
196
+
197
+ @inline(__always)
198
+ public final func deleteFile(path: std.string) -> bridge.Result_std__shared_ptr_Promise_void___ {
199
+ do {
200
+ let __result = try self.__implementation.deleteFile(path: String(path))
201
+ let __resultCpp = { () -> bridge.std__shared_ptr_Promise_void__ in
202
+ let __promise = bridge.create_std__shared_ptr_Promise_void__()
203
+ let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_void__(__promise)
204
+ __result
205
+ .then({ __result in __promiseHolder.resolve() })
206
+ .catch({ __error in __promiseHolder.reject(__error.toCpp()) })
207
+ return __promise
208
+ }()
209
+ return bridge.create_Result_std__shared_ptr_Promise_void___(__resultCpp)
210
+ } catch (let __error) {
211
+ let __exceptionPtr = __error.toCpp()
212
+ return bridge.create_Result_std__shared_ptr_Promise_void___(__exceptionPtr)
213
+ }
214
+ }
215
+
216
+ @inline(__always)
217
+ public final func modelExists(model: std.string) -> bridge.Result_std__shared_ptr_Promise_bool___ {
218
+ do {
219
+ let __result = try self.__implementation.modelExists(model: String(model))
220
+ let __resultCpp = { () -> bridge.std__shared_ptr_Promise_bool__ in
221
+ let __promise = bridge.create_std__shared_ptr_Promise_bool__()
222
+ let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_bool__(__promise)
223
+ __result
224
+ .then({ __result in __promiseHolder.resolve(__result) })
225
+ .catch({ __error in __promiseHolder.reject(__error.toCpp()) })
226
+ return __promise
227
+ }()
228
+ return bridge.create_Result_std__shared_ptr_Promise_bool___(__resultCpp)
229
+ } catch (let __error) {
230
+ let __exceptionPtr = __error.toCpp()
231
+ return bridge.create_Result_std__shared_ptr_Promise_bool___(__exceptionPtr)
232
+ }
233
+ }
234
+
235
+ @inline(__always)
236
+ public final func getModelPath(model: std.string) -> bridge.Result_std__shared_ptr_Promise_std__string___ {
237
+ do {
238
+ let __result = try self.__implementation.getModelPath(model: String(model))
239
+ let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__string__ in
240
+ let __promise = bridge.create_std__shared_ptr_Promise_std__string__()
241
+ let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__string__(__promise)
242
+ __result
243
+ .then({ __result in __promiseHolder.resolve(std.string(__result)) })
244
+ .catch({ __error in __promiseHolder.reject(__error.toCpp()) })
245
+ return __promise
246
+ }()
247
+ return bridge.create_Result_std__shared_ptr_Promise_std__string___(__resultCpp)
248
+ } catch (let __error) {
249
+ let __exceptionPtr = __error.toCpp()
250
+ return bridge.create_Result_std__shared_ptr_Promise_std__string___(__exceptionPtr)
251
+ }
252
+ }
253
+
254
+ @inline(__always)
255
+ public final func downloadModel(model: std.string, from: std.string, callback: bridge.std__optional_std__function_void_double____progress______) -> bridge.Result_std__shared_ptr_Promise_void___ {
256
+ do {
257
+ let __result = try self.__implementation.downloadModel(model: String(model), from: String(from), callback: { () -> ((_ progress: Double) -> Void)? in
258
+ if bridge.has_value_std__optional_std__function_void_double____progress______(callback) {
259
+ let __unwrapped = bridge.get_std__optional_std__function_void_double____progress______(callback)
260
+ return { () -> (Double) -> Void in
261
+ let __wrappedFunction = bridge.wrap_Func_void_double(__unwrapped)
262
+ return { (__progress: Double) -> Void in
263
+ __wrappedFunction.call(__progress)
264
+ }
265
+ }()
266
+ } else {
267
+ return nil
268
+ }
269
+ }())
270
+ let __resultCpp = { () -> bridge.std__shared_ptr_Promise_void__ in
271
+ let __promise = bridge.create_std__shared_ptr_Promise_void__()
272
+ let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_void__(__promise)
273
+ __result
274
+ .then({ __result in __promiseHolder.resolve() })
275
+ .catch({ __error in __promiseHolder.reject(__error.toCpp()) })
276
+ return __promise
277
+ }()
278
+ return bridge.create_Result_std__shared_ptr_Promise_void___(__resultCpp)
279
+ } catch (let __error) {
280
+ let __exceptionPtr = __error.toCpp()
281
+ return bridge.create_Result_std__shared_ptr_Promise_void___(__exceptionPtr)
282
+ }
283
+ }
284
+
285
+ @inline(__always)
286
+ public final func deleteModel(model: std.string) -> bridge.Result_std__shared_ptr_Promise_void___ {
287
+ do {
288
+ let __result = try self.__implementation.deleteModel(model: String(model))
289
+ let __resultCpp = { () -> bridge.std__shared_ptr_Promise_void__ in
290
+ let __promise = bridge.create_std__shared_ptr_Promise_void__()
291
+ let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_void__(__promise)
292
+ __result
293
+ .then({ __result in __promiseHolder.resolve() })
294
+ .catch({ __error in __promiseHolder.reject(__error.toCpp()) })
295
+ return __promise
296
+ }()
297
+ return bridge.create_Result_std__shared_ptr_Promise_void___(__resultCpp)
298
+ } catch (let __error) {
299
+ let __exceptionPtr = __error.toCpp()
300
+ return bridge.create_Result_std__shared_ptr_Promise_void___(__exceptionPtr)
301
+ }
302
+ }
303
+ }
@@ -0,0 +1,92 @@
1
+ ///
2
+ /// DeviceInfo.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
11
+ #include <NitroModules/JSIConverter.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
16
+ #include <NitroModules/NitroDefines.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+ #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
+ #include <NitroModules/JSIHelpers.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
25
+
26
+
27
+
28
+ #include <string>
29
+ #include <optional>
30
+
31
+ namespace margelo::nitro::cactus {
32
+
33
+ /**
34
+ * A struct which can be represented as a JavaScript object (DeviceInfo).
35
+ */
36
+ struct DeviceInfo {
37
+ public:
38
+ std::string brand SWIFT_PRIVATE;
39
+ std::string model SWIFT_PRIVATE;
40
+ std::optional<std::string> device_id SWIFT_PRIVATE;
41
+ std::string os SWIFT_PRIVATE;
42
+ std::string os_version SWIFT_PRIVATE;
43
+
44
+ public:
45
+ DeviceInfo() = default;
46
+ explicit DeviceInfo(std::string brand, std::string model, std::optional<std::string> device_id, std::string os, std::string os_version): brand(brand), model(model), device_id(device_id), os(os), os_version(os_version) {}
47
+ };
48
+
49
+ } // namespace margelo::nitro::cactus
50
+
51
+ namespace margelo::nitro {
52
+
53
+ // C++ DeviceInfo <> JS DeviceInfo (object)
54
+ template <>
55
+ struct JSIConverter<margelo::nitro::cactus::DeviceInfo> final {
56
+ static inline margelo::nitro::cactus::DeviceInfo fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
57
+ jsi::Object obj = arg.asObject(runtime);
58
+ return margelo::nitro::cactus::DeviceInfo(
59
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "brand")),
60
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "model")),
61
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "device_id")),
62
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "os")),
63
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "os_version"))
64
+ );
65
+ }
66
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::cactus::DeviceInfo& arg) {
67
+ jsi::Object obj(runtime);
68
+ obj.setProperty(runtime, "brand", JSIConverter<std::string>::toJSI(runtime, arg.brand));
69
+ obj.setProperty(runtime, "model", JSIConverter<std::string>::toJSI(runtime, arg.model));
70
+ obj.setProperty(runtime, "device_id", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.device_id));
71
+ obj.setProperty(runtime, "os", JSIConverter<std::string>::toJSI(runtime, arg.os));
72
+ obj.setProperty(runtime, "os_version", JSIConverter<std::string>::toJSI(runtime, arg.os_version));
73
+ return obj;
74
+ }
75
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
76
+ if (!value.isObject()) {
77
+ return false;
78
+ }
79
+ jsi::Object obj = value.getObject(runtime);
80
+ if (!nitro::isPlainObject(runtime, obj)) {
81
+ return false;
82
+ }
83
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "brand"))) return false;
84
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "model"))) return false;
85
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "device_id"))) return false;
86
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "os"))) return false;
87
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "os_version"))) return false;
88
+ return true;
89
+ }
90
+ };
91
+
92
+ } // namespace margelo::nitro
@@ -0,0 +1,21 @@
1
+ ///
2
+ /// HybridCactusCryptoSpec.cpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #include "HybridCactusCryptoSpec.hpp"
9
+
10
+ namespace margelo::nitro::cactus {
11
+
12
+ void HybridCactusCryptoSpec::loadHybridMethods() {
13
+ // load base methods/properties
14
+ HybridObject::loadHybridMethods();
15
+ // load custom methods/properties
16
+ registerHybrids(this, [](Prototype& prototype) {
17
+ prototype.registerHybridMethod("uuidv5", &HybridCactusCryptoSpec::uuidv5);
18
+ });
19
+ }
20
+
21
+ } // namespace margelo::nitro::cactus
@@ -0,0 +1,63 @@
1
+ ///
2
+ /// HybridCactusCryptoSpec.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #if __has_include(<NitroModules/HybridObject.hpp>)
11
+ #include <NitroModules/HybridObject.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+
16
+
17
+
18
+ #include <string>
19
+ #include <NitroModules/Promise.hpp>
20
+
21
+ namespace margelo::nitro::cactus {
22
+
23
+ using namespace margelo::nitro;
24
+
25
+ /**
26
+ * An abstract base class for `CactusCrypto`
27
+ * Inherit this class to create instances of `HybridCactusCryptoSpec` in C++.
28
+ * You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
29
+ * @example
30
+ * ```cpp
31
+ * class HybridCactusCrypto: public HybridCactusCryptoSpec {
32
+ * public:
33
+ * HybridCactusCrypto(...): HybridObject(TAG) { ... }
34
+ * // ...
35
+ * };
36
+ * ```
37
+ */
38
+ class HybridCactusCryptoSpec: public virtual HybridObject {
39
+ public:
40
+ // Constructor
41
+ explicit HybridCactusCryptoSpec(): HybridObject(TAG) { }
42
+
43
+ // Destructor
44
+ ~HybridCactusCryptoSpec() override = default;
45
+
46
+ public:
47
+ // Properties
48
+
49
+
50
+ public:
51
+ // Methods
52
+ virtual std::shared_ptr<Promise<std::string>> uuidv5(const std::string& namespaceUuid, const std::string& name) = 0;
53
+
54
+ protected:
55
+ // Hybrid Setup
56
+ void loadHybridMethods() override;
57
+
58
+ protected:
59
+ // Tag for logging
60
+ static constexpr auto TAG = "CactusCrypto";
61
+ };
62
+
63
+ } // namespace margelo::nitro::cactus
@@ -0,0 +1,22 @@
1
+ ///
2
+ /// HybridCactusDeviceInfoSpec.cpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #include "HybridCactusDeviceInfoSpec.hpp"
9
+
10
+ namespace margelo::nitro::cactus {
11
+
12
+ void HybridCactusDeviceInfoSpec::loadHybridMethods() {
13
+ // load base methods/properties
14
+ HybridObject::loadHybridMethods();
15
+ // load custom methods/properties
16
+ registerHybrids(this, [](Prototype& prototype) {
17
+ prototype.registerHybridMethod("getAppIdentifier", &HybridCactusDeviceInfoSpec::getAppIdentifier);
18
+ prototype.registerHybridMethod("getDeviceInfo", &HybridCactusDeviceInfoSpec::getDeviceInfo);
19
+ });
20
+ }
21
+
22
+ } // namespace margelo::nitro::cactus
@@ -0,0 +1,67 @@
1
+ ///
2
+ /// HybridCactusDeviceInfoSpec.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #if __has_include(<NitroModules/HybridObject.hpp>)
11
+ #include <NitroModules/HybridObject.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+
16
+ // Forward declaration of `DeviceInfo` to properly resolve imports.
17
+ namespace margelo::nitro::cactus { struct DeviceInfo; }
18
+
19
+ #include <string>
20
+ #include <optional>
21
+ #include <NitroModules/Promise.hpp>
22
+ #include "DeviceInfo.hpp"
23
+
24
+ namespace margelo::nitro::cactus {
25
+
26
+ using namespace margelo::nitro;
27
+
28
+ /**
29
+ * An abstract base class for `CactusDeviceInfo`
30
+ * Inherit this class to create instances of `HybridCactusDeviceInfoSpec` in C++.
31
+ * You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
32
+ * @example
33
+ * ```cpp
34
+ * class HybridCactusDeviceInfo: public HybridCactusDeviceInfoSpec {
35
+ * public:
36
+ * HybridCactusDeviceInfo(...): HybridObject(TAG) { ... }
37
+ * // ...
38
+ * };
39
+ * ```
40
+ */
41
+ class HybridCactusDeviceInfoSpec: public virtual HybridObject {
42
+ public:
43
+ // Constructor
44
+ explicit HybridCactusDeviceInfoSpec(): HybridObject(TAG) { }
45
+
46
+ // Destructor
47
+ ~HybridCactusDeviceInfoSpec() override = default;
48
+
49
+ public:
50
+ // Properties
51
+
52
+
53
+ public:
54
+ // Methods
55
+ virtual std::shared_ptr<Promise<std::optional<std::string>>> getAppIdentifier() = 0;
56
+ virtual std::shared_ptr<Promise<DeviceInfo>> getDeviceInfo() = 0;
57
+
58
+ protected:
59
+ // Hybrid Setup
60
+ void loadHybridMethods() override;
61
+
62
+ protected:
63
+ // Tag for logging
64
+ static constexpr auto TAG = "CactusDeviceInfo";
65
+ };
66
+
67
+ } // namespace margelo::nitro::cactus
@@ -0,0 +1,29 @@
1
+ ///
2
+ /// HybridCactusFileSystemSpec.cpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #include "HybridCactusFileSystemSpec.hpp"
9
+
10
+ namespace margelo::nitro::cactus {
11
+
12
+ void HybridCactusFileSystemSpec::loadHybridMethods() {
13
+ // load base methods/properties
14
+ HybridObject::loadHybridMethods();
15
+ // load custom methods/properties
16
+ registerHybrids(this, [](Prototype& prototype) {
17
+ prototype.registerHybridMethod("getCactusDirectory", &HybridCactusFileSystemSpec::getCactusDirectory);
18
+ prototype.registerHybridMethod("fileExists", &HybridCactusFileSystemSpec::fileExists);
19
+ prototype.registerHybridMethod("writeFile", &HybridCactusFileSystemSpec::writeFile);
20
+ prototype.registerHybridMethod("readFile", &HybridCactusFileSystemSpec::readFile);
21
+ prototype.registerHybridMethod("deleteFile", &HybridCactusFileSystemSpec::deleteFile);
22
+ prototype.registerHybridMethod("modelExists", &HybridCactusFileSystemSpec::modelExists);
23
+ prototype.registerHybridMethod("getModelPath", &HybridCactusFileSystemSpec::getModelPath);
24
+ prototype.registerHybridMethod("downloadModel", &HybridCactusFileSystemSpec::downloadModel);
25
+ prototype.registerHybridMethod("deleteModel", &HybridCactusFileSystemSpec::deleteModel);
26
+ });
27
+ }
28
+
29
+ } // namespace margelo::nitro::cactus