openc3 6.10.4 → 7.0.0.pre.rc2

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 (350) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -1
  3. data/Guardfile +4 -9
  4. data/LICENSE.md +85 -0
  5. data/README.md +8 -8
  6. data/Rakefile +3 -9
  7. data/bin/cstol_converter +3 -8
  8. data/bin/openc3cli +64 -35
  9. data/data/config/command_modifiers.yaml +18 -1
  10. data/data/config/interface_modifiers.yaml +0 -2
  11. data/data/config/plugins.yaml +14 -18
  12. data/data/config/screen.yaml +1 -1
  13. data/data/config/target.yaml +26 -79
  14. data/data/config/telemetry_modifiers.yaml +15 -0
  15. data/data/config/widgets.yaml +32 -32
  16. data/ext/openc3/ext/array/array.c +4 -9
  17. data/ext/openc3/ext/buffered_file/buffered_file.c +4 -9
  18. data/ext/openc3/ext/burst_protocol/burst_protocol.c +3 -8
  19. data/ext/openc3/ext/config_parser/config_parser.c +2 -7
  20. data/ext/openc3/ext/crc/crc.c +3 -8
  21. data/ext/openc3/ext/openc3_io/openc3_io.c +4 -9
  22. data/ext/openc3/ext/packet/packet.c +7 -9
  23. data/ext/openc3/ext/platform/platform.c +3 -8
  24. data/ext/openc3/ext/polynomial_conversion/polynomial_conversion.c +16 -12
  25. data/ext/openc3/ext/string/string.c +4 -9
  26. data/ext/openc3/ext/structure/structure.c +5 -9
  27. data/ext/openc3/ext/tabbed_plots_config/tabbed_plots_config.c +4 -9
  28. data/ext/openc3/ext/telemetry/telemetry.c +8 -12
  29. data/lib/cosmos.rb +4 -9
  30. data/lib/cosmosc2.rb +4 -9
  31. data/lib/openc3/accessors/accessor.rb +10 -13
  32. data/lib/openc3/accessors/binary_accessor.rb +18 -17
  33. data/lib/openc3/accessors/cbor_accessor.rb +3 -8
  34. data/lib/openc3/accessors/form_accessor.rb +4 -9
  35. data/lib/openc3/accessors/html_accessor.rb +3 -8
  36. data/lib/openc3/accessors/http_accessor.rb +4 -9
  37. data/lib/openc3/accessors/json_accessor.rb +4 -9
  38. data/lib/openc3/accessors/template_accessor.rb +4 -9
  39. data/lib/openc3/accessors/xml_accessor.rb +4 -9
  40. data/lib/openc3/accessors.rb +3 -8
  41. data/lib/openc3/api/README.md +1 -1
  42. data/lib/openc3/api/api.rb +3 -8
  43. data/lib/openc3/api/authorized_api.rb +4 -9
  44. data/lib/openc3/api/cmd_api.rb +3 -8
  45. data/lib/openc3/api/config_api.rb +3 -8
  46. data/lib/openc3/api/interface_api.rb +4 -9
  47. data/lib/openc3/api/limits_api.rb +3 -8
  48. data/lib/openc3/api/metrics_api.rb +2 -19
  49. data/lib/openc3/api/offline_access_api.rb +2 -7
  50. data/lib/openc3/api/router_api.rb +5 -10
  51. data/lib/openc3/api/settings_api.rb +3 -8
  52. data/lib/openc3/api/stash_api.rb +2 -7
  53. data/lib/openc3/api/target_api.rb +3 -8
  54. data/lib/openc3/api/tlm_api.rb +15 -38
  55. data/lib/openc3/bridge/bridge.rb +3 -8
  56. data/lib/openc3/bridge/bridge_config.rb +5 -10
  57. data/lib/openc3/bridge/bridge_interface_thread.rb +4 -9
  58. data/lib/openc3/bridge/bridge_router_thread.rb +4 -9
  59. data/lib/openc3/ccsds/ccsds_packet.rb +4 -9
  60. data/lib/openc3/ccsds/ccsds_parser.rb +3 -8
  61. data/lib/openc3/config/config_parser.rb +3 -8
  62. data/lib/openc3/config/meta_config_parser.rb +3 -8
  63. data/lib/openc3/conversions/bit_reverse_conversion.rb +3 -8
  64. data/lib/openc3/conversions/conversion.rb +3 -8
  65. data/lib/openc3/conversions/generic_conversion.rb +3 -8
  66. data/lib/openc3/conversions/ip_read_conversion.rb +3 -8
  67. data/lib/openc3/conversions/ip_write_conversion.rb +3 -8
  68. data/lib/openc3/conversions/object_read_conversion.rb +3 -8
  69. data/lib/openc3/conversions/object_write_conversion.rb +3 -8
  70. data/lib/openc3/conversions/packet_time_formatted_conversion.rb +4 -9
  71. data/lib/openc3/conversions/packet_time_seconds_conversion.rb +4 -9
  72. data/lib/openc3/conversions/polynomial_conversion.rb +6 -8
  73. data/lib/openc3/conversions/processor_conversion.rb +3 -8
  74. data/lib/openc3/conversions/received_count_conversion.rb +4 -9
  75. data/lib/openc3/conversions/received_time_formatted_conversion.rb +4 -9
  76. data/lib/openc3/conversions/received_time_seconds_conversion.rb +4 -9
  77. data/lib/openc3/conversions/segmented_polynomial_conversion.rb +6 -8
  78. data/lib/openc3/conversions/unix_time_conversion.rb +3 -8
  79. data/lib/openc3/conversions/unix_time_formatted_conversion.rb +3 -8
  80. data/lib/openc3/conversions/unix_time_seconds_conversion.rb +3 -8
  81. data/lib/openc3/conversions.rb +3 -8
  82. data/lib/openc3/core_ext/array.rb +3 -8
  83. data/lib/openc3/core_ext/binding.rb +4 -9
  84. data/lib/openc3/core_ext/class.rb +4 -9
  85. data/lib/openc3/core_ext/exception.rb +3 -8
  86. data/lib/openc3/core_ext/file.rb +4 -9
  87. data/lib/openc3/core_ext/io.rb +4 -9
  88. data/lib/openc3/core_ext/kernel.rb +3 -8
  89. data/lib/openc3/core_ext/math.rb +4 -9
  90. data/lib/openc3/core_ext/matrix.rb +4 -9
  91. data/lib/openc3/core_ext/objectspace.rb +4 -9
  92. data/lib/openc3/core_ext/openc3_io.rb +4 -9
  93. data/lib/openc3/core_ext/range.rb +4 -9
  94. data/lib/openc3/core_ext/socket.rb +4 -9
  95. data/lib/openc3/core_ext/string.rb +3 -8
  96. data/lib/openc3/core_ext/stringio.rb +4 -9
  97. data/lib/openc3/core_ext/tempfile.rb +4 -9
  98. data/lib/openc3/core_ext/time.rb +3 -8
  99. data/lib/openc3/core_ext.rb +3 -8
  100. data/lib/openc3/interfaces/file_interface.rb +3 -8
  101. data/lib/openc3/interfaces/http_client_interface.rb +3 -8
  102. data/lib/openc3/interfaces/http_server_interface.rb +3 -8
  103. data/lib/openc3/interfaces/interface.rb +3 -8
  104. data/lib/openc3/interfaces/mqtt_interface.rb +3 -8
  105. data/lib/openc3/interfaces/mqtt_stream_interface.rb +3 -8
  106. data/lib/openc3/interfaces/protocols/burst_protocol.rb +3 -8
  107. data/lib/openc3/interfaces/protocols/cmd_response_protocol.rb +3 -8
  108. data/lib/openc3/interfaces/protocols/cobs_protocol.rb +3 -8
  109. data/lib/openc3/interfaces/protocols/crc_protocol.rb +3 -8
  110. data/lib/openc3/interfaces/protocols/fixed_protocol.rb +3 -8
  111. data/lib/openc3/interfaces/protocols/ignore_packet_protocol.rb +3 -8
  112. data/lib/openc3/interfaces/protocols/length_protocol.rb +3 -8
  113. data/lib/openc3/interfaces/protocols/preidentified_protocol.rb +3 -8
  114. data/lib/openc3/interfaces/protocols/protocol.rb +3 -8
  115. data/lib/openc3/interfaces/protocols/slip_protocol.rb +3 -8
  116. data/lib/openc3/interfaces/protocols/template_protocol.rb +3 -8
  117. data/lib/openc3/interfaces/protocols/terminated_protocol.rb +3 -8
  118. data/lib/openc3/interfaces/serial_interface.rb +3 -8
  119. data/lib/openc3/interfaces/simulated_target_interface.rb +3 -8
  120. data/lib/openc3/interfaces/stream_interface.rb +3 -8
  121. data/lib/openc3/interfaces/tcpip_client_interface.rb +3 -8
  122. data/lib/openc3/interfaces/tcpip_server_interface.rb +3 -8
  123. data/lib/openc3/interfaces/udp_interface.rb +3 -8
  124. data/lib/openc3/interfaces.rb +3 -8
  125. data/lib/openc3/io/buffered_file.rb +4 -9
  126. data/lib/openc3/io/io_multiplexer.rb +4 -9
  127. data/lib/openc3/io/json_api.rb +3 -8
  128. data/lib/openc3/io/json_api_object.rb +4 -9
  129. data/lib/openc3/io/json_drb.rb +3 -8
  130. data/lib/openc3/io/json_drb_object.rb +4 -9
  131. data/lib/openc3/io/json_drb_rack.rb +4 -9
  132. data/lib/openc3/io/json_rpc.rb +3 -8
  133. data/lib/openc3/io/posix_serial_driver.rb +3 -8
  134. data/lib/openc3/io/serial_driver.rb +3 -8
  135. data/lib/openc3/io/stderr.rb +4 -9
  136. data/lib/openc3/io/stdout.rb +4 -9
  137. data/lib/openc3/io/udp_sockets.rb +3 -8
  138. data/lib/openc3/io/win32_serial_driver.rb +4 -9
  139. data/lib/openc3/logs/buffered_packet_log_reader.rb +3 -8
  140. data/lib/openc3/logs/buffered_packet_log_writer.rb +3 -8
  141. data/lib/openc3/logs/log_writer.rb +3 -8
  142. data/lib/openc3/logs/packet_log_constants.rb +3 -8
  143. data/lib/openc3/logs/packet_log_reader.rb +3 -8
  144. data/lib/openc3/logs/packet_log_writer.rb +3 -8
  145. data/lib/openc3/logs/stream_log.rb +3 -8
  146. data/lib/openc3/logs/stream_log_pair.rb +3 -8
  147. data/lib/openc3/logs/text_log_writer.rb +3 -8
  148. data/lib/openc3/logs.rb +3 -8
  149. data/lib/openc3/microservices/cleanup_microservice.rb +4 -14
  150. data/lib/openc3/microservices/decom_microservice.rb +3 -8
  151. data/lib/openc3/microservices/interface_decom_common.rb +3 -8
  152. data/lib/openc3/microservices/interface_microservice.rb +5 -9
  153. data/lib/openc3/microservices/log_microservice.rb +3 -8
  154. data/lib/openc3/microservices/microservice.rb +24 -12
  155. data/lib/openc3/microservices/multi_microservice.rb +2 -7
  156. data/lib/openc3/microservices/periodic_microservice.rb +3 -8
  157. data/lib/openc3/microservices/plugin_microservice.rb +3 -8
  158. data/lib/openc3/microservices/queue_microservice.rb +3 -8
  159. data/lib/openc3/microservices/router_microservice.rb +3 -8
  160. data/lib/openc3/microservices/scope_cleanup_microservice.rb +3 -8
  161. data/lib/openc3/microservices/text_log_microservice.rb +3 -8
  162. data/lib/openc3/migrations/20251213120000_reinstall_plugins.rb +45 -0
  163. data/lib/openc3/migrations/20260204000000_remove_decom_reducer.rb +60 -0
  164. data/lib/openc3/models/activity_model.rb +4 -8
  165. data/lib/openc3/models/auth_model.rb +57 -38
  166. data/lib/openc3/models/cvt_model.rb +203 -62
  167. data/lib/openc3/models/environment_model.rb +4 -9
  168. data/lib/openc3/models/gem_model.rb +3 -8
  169. data/lib/openc3/models/info_model.rb +4 -9
  170. data/lib/openc3/models/interface_model.rb +6 -10
  171. data/lib/openc3/models/interface_status_model.rb +4 -9
  172. data/lib/openc3/models/metadata_model.rb +3 -8
  173. data/lib/openc3/models/metric_model.rb +3 -8
  174. data/lib/openc3/models/microservice_model.rb +24 -10
  175. data/lib/openc3/models/microservice_status_model.rb +3 -8
  176. data/lib/openc3/models/migration_model.rb +3 -8
  177. data/lib/openc3/models/model.rb +3 -8
  178. data/lib/openc3/models/news_model.rb +3 -8
  179. data/lib/openc3/models/note_model.rb +3 -8
  180. data/lib/openc3/models/offline_access_model.rb +3 -8
  181. data/lib/openc3/models/ping_model.rb +4 -9
  182. data/lib/openc3/models/plugin_model.rb +14 -9
  183. data/lib/openc3/models/plugin_store_model.rb +21 -17
  184. data/lib/openc3/models/process_status_model.rb +4 -9
  185. data/lib/openc3/models/python_package_model.rb +3 -8
  186. data/lib/openc3/models/queue_model.rb +3 -8
  187. data/lib/openc3/models/reaction_model.rb +9 -10
  188. data/lib/openc3/models/router_model.rb +4 -9
  189. data/lib/openc3/models/router_status_model.rb +4 -9
  190. data/lib/openc3/models/scope_model.rb +4 -9
  191. data/lib/openc3/models/script_engine_model.rb +3 -8
  192. data/lib/openc3/models/script_status_model.rb +3 -8
  193. data/lib/openc3/models/secret_model.rb +3 -8
  194. data/lib/openc3/models/setting_model.rb +3 -8
  195. data/lib/openc3/models/sorted_model.rb +3 -8
  196. data/lib/openc3/models/stash_model.rb +3 -8
  197. data/lib/openc3/models/target_model.rb +99 -229
  198. data/lib/openc3/models/timeline_model.rb +3 -8
  199. data/lib/openc3/models/tool_config_model.rb +3 -8
  200. data/lib/openc3/models/tool_model.rb +10 -10
  201. data/lib/openc3/models/trigger_group_model.rb +3 -8
  202. data/lib/openc3/models/trigger_model.rb +3 -8
  203. data/lib/openc3/models/widget_model.rb +3 -8
  204. data/lib/openc3/operators/microservice_operator.rb +7 -8
  205. data/lib/openc3/operators/operator.rb +3 -8
  206. data/lib/openc3/packets/command_validator.rb +3 -8
  207. data/lib/openc3/packets/commands.rb +32 -14
  208. data/lib/openc3/packets/json_packet.rb +7 -19
  209. data/lib/openc3/packets/limits.rb +3 -8
  210. data/lib/openc3/packets/limits_response.rb +3 -8
  211. data/lib/openc3/packets/packet.rb +38 -32
  212. data/lib/openc3/packets/packet_config.rb +23 -13
  213. data/lib/openc3/packets/packet_item.rb +3 -8
  214. data/lib/openc3/packets/packet_item_limits.rb +3 -8
  215. data/lib/openc3/packets/parsers/format_string_parser.rb +3 -8
  216. data/lib/openc3/packets/parsers/limits_parser.rb +3 -8
  217. data/lib/openc3/packets/parsers/limits_response_parser.rb +3 -8
  218. data/lib/openc3/packets/parsers/packet_item_parser.rb +7 -8
  219. data/lib/openc3/packets/parsers/packet_parser.rb +3 -8
  220. data/lib/openc3/packets/parsers/processor_parser.rb +3 -8
  221. data/lib/openc3/packets/parsers/state_parser.rb +3 -8
  222. data/lib/openc3/packets/parsers/xtce_converter.rb +12 -9
  223. data/lib/openc3/packets/parsers/xtce_parser.rb +3 -8
  224. data/lib/openc3/packets/structure.rb +14 -11
  225. data/lib/openc3/packets/structure_item.rb +4 -9
  226. data/lib/openc3/packets/telemetry.rb +7 -11
  227. data/lib/openc3/processors/processor.rb +5 -10
  228. data/lib/openc3/processors/statistics_processor.rb +4 -9
  229. data/lib/openc3/processors/watermark_processor.rb +4 -9
  230. data/lib/openc3/processors.rb +4 -9
  231. data/lib/openc3/script/api_shared.rb +8 -37
  232. data/lib/openc3/script/autonomic.rb +3 -8
  233. data/lib/openc3/script/calendar.rb +3 -8
  234. data/lib/openc3/script/commands.rb +3 -8
  235. data/lib/openc3/script/critical_cmd.rb +3 -8
  236. data/lib/openc3/script/exceptions.rb +4 -9
  237. data/lib/openc3/script/extract.rb +3 -8
  238. data/lib/openc3/script/limits.rb +3 -8
  239. data/lib/openc3/script/metadata.rb +3 -8
  240. data/lib/openc3/script/packages.rb +3 -8
  241. data/lib/openc3/script/plugins.rb +3 -8
  242. data/lib/openc3/script/queue.rb +3 -8
  243. data/lib/openc3/script/screen.rb +7 -8
  244. data/lib/openc3/script/script.rb +3 -8
  245. data/lib/openc3/script/script_runner.rb +3 -8
  246. data/lib/openc3/script/storage.rb +6 -10
  247. data/lib/openc3/script/suite.rb +3 -8
  248. data/lib/openc3/script/suite_results.rb +3 -8
  249. data/lib/openc3/script/suite_runner.rb +3 -8
  250. data/lib/openc3/script/tables.rb +3 -8
  251. data/lib/openc3/script/telemetry.rb +3 -8
  252. data/lib/openc3/script/web_socket_api.rb +8 -13
  253. data/lib/openc3/script.rb +4 -9
  254. data/lib/openc3/script_engines/script_engine.rb +3 -8
  255. data/lib/openc3/streams/mqtt_stream.rb +3 -8
  256. data/lib/openc3/streams/serial_stream.rb +3 -8
  257. data/lib/openc3/streams/stream.rb +3 -8
  258. data/lib/openc3/streams/tcpip_client_stream.rb +3 -8
  259. data/lib/openc3/streams/tcpip_socket_stream.rb +3 -8
  260. data/lib/openc3/streams/web_socket_client_stream.rb +3 -8
  261. data/lib/openc3/system/system.rb +3 -8
  262. data/lib/openc3/system/target.rb +3 -8
  263. data/lib/openc3/system.rb +3 -8
  264. data/lib/openc3/tools/cmd_tlm_server/api.rb +4 -9
  265. data/lib/openc3/tools/cmd_tlm_server/interface_thread.rb +3 -8
  266. data/lib/openc3/tools/table_manager/table.rb +3 -8
  267. data/lib/openc3/tools/table_manager/table_config.rb +3 -8
  268. data/lib/openc3/tools/table_manager/table_item.rb +4 -9
  269. data/lib/openc3/tools/table_manager/table_item_parser.rb +3 -8
  270. data/lib/openc3/tools/table_manager/table_manager_core.rb +3 -8
  271. data/lib/openc3/tools/table_manager/table_parser.rb +3 -8
  272. data/lib/openc3/tools/test_runner/test.rb +4 -9
  273. data/lib/openc3/top_level.rb +3 -8
  274. data/lib/openc3/topics/autonomic_topic.rb +4 -9
  275. data/lib/openc3/topics/calendar_topic.rb +4 -9
  276. data/lib/openc3/topics/command_decom_topic.rb +14 -17
  277. data/lib/openc3/topics/command_topic.rb +14 -10
  278. data/lib/openc3/topics/config_topic.rb +3 -8
  279. data/lib/openc3/topics/decom_interface_topic.rb +3 -8
  280. data/lib/openc3/topics/interface_topic.rb +3 -8
  281. data/lib/openc3/topics/limits_event_topic.rb +3 -8
  282. data/lib/openc3/topics/notebook_topic.rb +32 -0
  283. data/lib/openc3/topics/queue_topic.rb +3 -8
  284. data/lib/openc3/topics/router_topic.rb +3 -8
  285. data/lib/openc3/topics/system_events_topic.rb +3 -8
  286. data/lib/openc3/topics/telemetry_decom_topic.rb +12 -12
  287. data/lib/openc3/topics/telemetry_topic.rb +3 -8
  288. data/lib/openc3/topics/timeline_topic.rb +4 -9
  289. data/lib/openc3/topics/topic.rb +3 -8
  290. data/lib/openc3/utilities/authentication.rb +29 -10
  291. data/lib/openc3/utilities/authorization.rb +4 -9
  292. data/lib/openc3/utilities/aws_bucket.rb +126 -16
  293. data/lib/openc3/utilities/bucket.rb +9 -9
  294. data/lib/openc3/utilities/bucket_file_cache.rb +3 -13
  295. data/lib/openc3/utilities/bucket_require.rb +3 -8
  296. data/lib/openc3/utilities/bucket_utilities.rb +3 -10
  297. data/lib/openc3/utilities/cli_generator.rb +11 -16
  298. data/lib/openc3/utilities/cmd_log.rb +3 -8
  299. data/lib/openc3/utilities/crc.rb +3 -8
  300. data/lib/openc3/utilities/csv.rb +4 -9
  301. data/lib/openc3/utilities/local_bucket.rb +5 -10
  302. data/lib/openc3/utilities/local_mode.rb +14 -18
  303. data/lib/openc3/utilities/logger.rb +3 -8
  304. data/lib/openc3/utilities/message_log.rb +3 -8
  305. data/lib/openc3/utilities/metric.rb +3 -8
  306. data/lib/openc3/utilities/migration.rb +3 -8
  307. data/lib/openc3/utilities/open_telemetry.rb +3 -8
  308. data/lib/openc3/utilities/process_manager.rb +3 -8
  309. data/lib/openc3/utilities/python_proxy.rb +3 -8
  310. data/lib/openc3/utilities/quaternion.rb +3 -8
  311. data/lib/openc3/utilities/questdb_client.rb +210 -0
  312. data/lib/openc3/utilities/redis_secrets.rb +3 -8
  313. data/lib/openc3/utilities/ruby_lex_utils.rb +3 -8
  314. data/lib/openc3/utilities/running_script.rb +13 -11
  315. data/lib/openc3/utilities/s3_autoload.rb +9 -2
  316. data/lib/openc3/utilities/secrets.rb +8 -9
  317. data/lib/openc3/utilities/simulated_target.rb +4 -9
  318. data/lib/openc3/utilities/sleeper.rb +3 -8
  319. data/lib/openc3/utilities/store.rb +4 -9
  320. data/lib/openc3/utilities/store_autoload.rb +7 -14
  321. data/lib/openc3/utilities/store_queued.rb +6 -9
  322. data/lib/openc3/utilities/target_file.rb +3 -8
  323. data/lib/openc3/utilities/thread_manager.rb +3 -8
  324. data/lib/openc3/utilities/throttle.rb +3 -8
  325. data/lib/openc3/utilities/zip.rb +4 -9
  326. data/lib/openc3/utilities.rb +4 -9
  327. data/lib/openc3/version.rb +8 -8
  328. data/lib/openc3/win32/excel.rb +4 -9
  329. data/lib/openc3/win32/win32.rb +4 -9
  330. data/lib/openc3/win32/win32_main.rb +3 -8
  331. data/lib/openc3.rb +3 -12
  332. data/tasks/gemfile_stats.rake +4 -9
  333. data/tasks/spec.rake +4 -9
  334. data/templates/plugin/README.md +2 -2
  335. data/templates/plugin/plugin.gemspec +1 -1
  336. data/templates/tool_angular/package.json +1 -1
  337. data/templates/tool_vue/package.json +3 -3
  338. data/templates/tool_vue/vite.config.js +2 -1
  339. data/templates/widget/package.json +3 -3
  340. data/templates/widget/vite.config.js +1 -1
  341. metadata +49 -26
  342. data/LICENSE.txt +0 -729
  343. data/bin/rubysloc +0 -142
  344. data/ext/openc3/ext/reducer_microservice/extconf.rb +0 -13
  345. data/ext/openc3/ext/reducer_microservice/reducer_microservice.c +0 -165
  346. data/lib/openc3/microservices/reducer_microservice.rb +0 -640
  347. data/lib/openc3/models/reducer_model.rb +0 -72
  348. data/lib/openc3/topics/telemetry_reduced_topics.rb +0 -80
  349. /data/templates/plugin/{LICENSE.txt → LICENSE.md} +0 -0
  350. /data/templates/widget/{LICENSE.txt → LICENSE.md} +0 -0
@@ -3,18 +3,13 @@
3
3
  # Copyright 2022 Ball Aerospace & Technologies Corp.
4
4
  # All Rights Reserved.
5
5
  #
6
- # This program is free software; you can modify and/or redistribute it
7
- # under the terms of the GNU Affero General Public License
8
- # as published by the Free Software Foundation; version 3 with
9
- # attribution addendums as found in the LICENSE.txt
10
- #
11
6
  # This program is distributed in the hope that it will be useful,
12
7
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- # GNU Affero General Public License for more details.
8
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
+ # See LICENSE.md for more details.
15
10
 
16
11
  # Modified by OpenC3, Inc.
17
- # All changes Copyright 2025, OpenC3, Inc.
12
+ # All changes Copyright 2026, OpenC3, Inc.
18
13
  # All Rights Reserved
19
14
  #
20
15
  # This file may also be used under the terms of a commercial license
@@ -169,7 +164,8 @@ module OpenC3
169
164
  microservice_name = "#{@scope}__#{type}__#{@name}"
170
165
  if config_params[0] and File.extname(config_params[0]) == '.py'
171
166
  work_dir.sub!('openc3/lib', 'openc3/python')
172
- @cmd = ["python", "#{type.downcase}_microservice.py", microservice_name]
167
+ # Use venv Python to ensure editable packages are found
168
+ @cmd = [ENV['OPENC3_PYTHON_BIN'] || '/openc3/python/.venv/bin/python', "#{type.downcase}_microservice.py", microservice_name]
173
169
  else
174
170
  # If there are no config_params we assume ruby
175
171
  @cmd = ["ruby", "#{type.downcase}_microservice.rb", microservice_name]
@@ -346,7 +342,7 @@ module OpenC3
346
342
  when 'DONT_LOG'
347
343
  Logger.warn "DONT_LOG is deprecated and does nothing."
348
344
 
349
- when 'LOG_STREAM', 'LOG_RAW'
345
+ when 'LOG_STREAM'
350
346
  parser.verify_num_parameters(0, nil, "#{keyword} <Log Stream Class File (optional)> <Log Stream Parameters (optional)>")
351
347
  @log_stream = parameters.dup # Even if it is empty we copy it to set it as not nil
352
348
 
@@ -3,21 +3,16 @@
3
3
  # Copyright 2022 Ball Aerospace & Technologies Corp.
4
4
  # All Rights Reserved.
5
5
  #
6
- # This program is free software; you can modify and/or redistribute it
7
- # under the terms of the GNU Affero General Public License
8
- # as published by the Free Software Foundation; version 3 with
9
- # attribution addendums as found in the LICENSE.txt
10
- #
11
6
  # This program is distributed in the hope that it will be useful,
12
7
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- # GNU Affero General Public License for more details.
8
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
+ # See LICENSE.md for more details.
15
10
 
16
11
  # Modified by OpenC3, Inc.
17
- # All changes Copyright 2022, OpenC3, Inc.
12
+ # All changes Copyright 2026, OpenC3, Inc.
18
13
  # All Rights Reserved
19
14
  #
20
- # This file may also be used under the terms of a commercial license
15
+ # This file may also be used under the terms of a commercial license
21
16
  # if purchased from OpenC3, Inc.
22
17
 
23
18
  require 'openc3/models/model'
@@ -3,18 +3,13 @@
3
3
  # Copyright 2022 Ball Aerospace & Technologies Corp.
4
4
  # All Rights Reserved.
5
5
  #
6
- # This program is free software; you can modify and/or redistribute it
7
- # under the terms of the GNU Affero General Public License
8
- # as published by the Free Software Foundation; version 3 with
9
- # attribution addendums as found in the LICENSE.txt
10
- #
11
6
  # This program is distributed in the hope that it will be useful,
12
7
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- # GNU Affero General Public License for more details.
8
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
+ # See LICENSE.md for more details.
15
10
 
16
11
  # Modified by OpenC3, Inc.
17
- # All changes Copyright 2022, OpenC3, Inc.
12
+ # All changes Copyright 2026, OpenC3, Inc.
18
13
  # All Rights Reserved
19
14
  #
20
15
  # This file may also be used under the terms of a commercial license
@@ -3,18 +3,13 @@
3
3
  # Copyright 2022 Ball Aerospace & Technologies Corp.
4
4
  # All Rights Reserved.
5
5
  #
6
- # This program is free software; you can modify and/or redistribute it
7
- # under the terms of the GNU Affero General Public License
8
- # as published by the Free Software Foundation; version 3 with
9
- # attribution addendums as found in the LICENSE.txt
10
- #
11
6
  # This program is distributed in the hope that it will be useful,
12
7
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- # GNU Affero General Public License for more details.
8
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
+ # See LICENSE.md for more details.
15
10
 
16
11
  # Modified by OpenC3, Inc.
17
- # All changes Copyright 2022, OpenC3, Inc.
12
+ # All changes Copyright 2026, OpenC3, Inc.
18
13
  # All Rights Reserved
19
14
  #
20
15
  # This file may also be used under the terms of a commercial license
@@ -3,18 +3,13 @@
3
3
  # Copyright 2022 Ball Aerospace & Technologies Corp.
4
4
  # All Rights Reserved.
5
5
  #
6
- # This program is free software; you can modify and/or redistribute it
7
- # under the terms of the GNU Affero General Public License
8
- # as published by the Free Software Foundation; version 3 with
9
- # attribution addendums as found in the LICENSE.txt
10
- #
11
6
  # This program is distributed in the hope that it will be useful,
12
7
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- # GNU Affero General Public License for more details.
8
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
+ # See LICENSE.md for more details.
15
10
 
16
11
  # Modified by OpenC3, Inc.
17
- # All changes Copyright 2022, OpenC3, Inc.
12
+ # All changes Copyright 2026, OpenC3, Inc.
18
13
  # All Rights Reserved
19
14
  #
20
15
  # This file may also be used under the terms of a commercial license
@@ -23,6 +18,7 @@
23
18
  require 'openc3/top_level'
24
19
  require 'openc3/models/model'
25
20
  require 'openc3/models/metric_model'
21
+ require 'openc3/topics/config_topic'
26
22
  require 'openc3/utilities/bucket'
27
23
 
28
24
  module OpenC3
@@ -202,6 +198,19 @@ module OpenC3
202
198
  when 'CMD'
203
199
  parser.verify_num_parameters(1, nil, "#{keyword} <Args>")
204
200
  @cmd = parameters.dup
201
+ # Automatically use UV venv Python for user microservices to ensure openc3 module is found
202
+ # Replace 'python', 'python3', or 'python3.X' with the correct Python binary
203
+ # Handles both split form: CMD python start.py -> ["python", "start.py"]
204
+ # and quoted single-string form: CMD "python start.py" -> ["python start.py"]
205
+ python_bin = ENV['OPENC3_PYTHON_BIN'] || '/openc3/python/.venv/bin/python'
206
+ # Handle split form: CMD python start.py => @cmd = ["python", "start.py"]
207
+ if @cmd[0] =~ /^python3?(\.\d+)*$/
208
+ @cmd[0] = python_bin
209
+ # Handle quoted single-string form: CMD "python start.py" => @cmd = ["python start.py"]
210
+ elsif @cmd[0] =~ /^python3?(\.\d+)*\s+/
211
+ _exe, rest = @cmd[0].split(/\s+/, 2)
212
+ @cmd = [python_bin, rest]
213
+ end
205
214
  when 'OPTION'
206
215
  parser.verify_num_parameters(2, nil, "#{keyword} <Option Name> <Option Values>")
207
216
  @options << parameters.dup
@@ -268,8 +277,13 @@ module OpenC3
268
277
 
269
278
  def undeploy
270
279
  prefix = "#{@scope}/microservices/#{@name}/"
271
- @bucket.list_objects(bucket: ENV['OPENC3_CONFIG_BUCKET'], prefix: prefix).each do |object|
272
- @bucket.delete_object(bucket: ENV['OPENC3_CONFIG_BUCKET'], key: object.key)
280
+ objects = @bucket.list_objects(bucket: ENV['OPENC3_CONFIG_BUCKET'], prefix: prefix)
281
+ keys = objects.map(&:key)
282
+ if keys.length > 0
283
+ # Batch delete in chunks of 1000 (S3 limit)
284
+ keys.each_slice(1000) do |key_batch|
285
+ @bucket.delete_objects(bucket: ENV['OPENC3_CONFIG_BUCKET'], keys: key_batch)
286
+ end
273
287
  end
274
288
  config = { kind: 'deleted', type: 'microservice', name: @name }
275
289
  config[:plugin] = @plugin if @plugin
@@ -3,18 +3,13 @@
3
3
  # Copyright 2022 Ball Aerospace & Technologies Corp.
4
4
  # All Rights Reserved.
5
5
  #
6
- # This program is free software; you can modify and/or redistribute it
7
- # under the terms of the GNU Affero General Public License
8
- # as published by the Free Software Foundation; version 3 with
9
- # attribution addendums as found in the LICENSE.txt
10
- #
11
6
  # This program is distributed in the hope that it will be useful,
12
7
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- # GNU Affero General Public License for more details.
8
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
+ # See LICENSE.md for more details.
15
10
 
16
11
  # Modified by OpenC3, Inc.
17
- # All changes Copyright 2022, OpenC3, Inc.
12
+ # All changes Copyright 2026, OpenC3, Inc.
18
13
  # All Rights Reserved
19
14
  #
20
15
  # This file may also be used under the terms of a commercial license
@@ -1,17 +1,12 @@
1
1
  # encoding: ascii-8bit
2
2
 
3
- # Copyright 2022 OpenC3, Inc.
3
+ # Copyright 2026 OpenC3, Inc.
4
4
  # All Rights Reserved.
5
5
  #
6
- # This program is free software; you can modify and/or redistribute it
7
- # under the terms of the GNU Affero General Public License
8
- # as published by the Free Software Foundation; version 3 with
9
- # attribution addendums as found in the LICENSE.txt
10
- #
11
6
  # This program is distributed in the hope that it will be useful,
12
7
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- # GNU Affero General Public License for more details.
8
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
+ # See LICENSE.md for more details.
15
10
 
16
11
  # This file may also be used under the terms of a commercial license
17
12
  # if purchased from OpenC3, Inc.
@@ -3,18 +3,13 @@
3
3
  # Copyright 2022 Ball Aerospace & Technologies Corp.
4
4
  # All Rights Reserved.
5
5
  #
6
- # This program is free software; you can modify and/or redistribute it
7
- # under the terms of the GNU Affero General Public License
8
- # as published by the Free Software Foundation; version 3 with
9
- # attribution addendums as found in the LICENSE.txt
10
- #
11
6
  # This program is distributed in the hope that it will be useful,
12
7
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- # GNU Affero General Public License for more details.
8
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
+ # See LICENSE.md for more details.
15
10
 
16
11
  # Modified by OpenC3, Inc.
17
- # All changes Copyright 2022, OpenC3, Inc.
12
+ # All changes Copyright 2026, OpenC3, Inc.
18
13
  # All Rights Reserved
19
14
  #
20
15
  # This file may also be used under the terms of a commercial license
@@ -1,17 +1,12 @@
1
1
  # encoding: ascii-8bit
2
2
 
3
- # Copyright 2025 OpenC3, Inc.
3
+ # Copyright 2026 OpenC3, Inc.
4
4
  # All Rights Reserved.
5
5
  #
6
- # This program is free software; you can modify and/or redistribute it
7
- # under the terms of the GNU Affero General Public License
8
- # as published by the Free Software Foundation; version 3 with
9
- # attribution addendums as found in the LICENSE.txt
10
- #
11
6
  # This program is distributed in the hope that it will be useful,
12
7
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- # GNU Affero General Public License for more details.
8
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
+ # See LICENSE.md for more details.
15
10
 
16
11
  # This file may also be used under the terms of a commercial license
17
12
  # if purchased from OpenC3, Inc.
@@ -3,18 +3,13 @@
3
3
  # Copyright 2022 Ball Aerospace & Technologies Corp.
4
4
  # All Rights Reserved.
5
5
  #
6
- # This program is free software; you can modify and/or redistribute it
7
- # under the terms of the GNU Affero General Public License
8
- # as published by the Free Software Foundation; version 3 with
9
- # attribution addendums as found in the LICENSE.txt
10
- #
11
6
  # This program is distributed in the hope that it will be useful,
12
7
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- # GNU Affero General Public License for more details.
8
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
+ # See LICENSE.md for more details.
15
10
 
16
11
  # Modified by OpenC3, Inc.
17
- # All changes Copyright 2022, OpenC3, Inc.
12
+ # All changes Copyright 2026, OpenC3, Inc.
18
13
  # All Rights Reserved
19
14
  #
20
15
  # This file may also be used under the terms of a commercial license
@@ -1,17 +1,12 @@
1
1
  # encoding: ascii-8bit
2
2
 
3
- # Copyright 2022 OpenC3, Inc.
3
+ # Copyright 2026 OpenC3, Inc.
4
4
  # All Rights Reserved.
5
5
  #
6
- # This program is free software; you can modify and/or redistribute it
7
- # under the terms of the GNU Affero General Public License
8
- # as published by the Free Software Foundation; version 3 with
9
- # attribution addendums as found in the LICENSE.txt
10
- #
11
6
  # This program is distributed in the hope that it will be useful,
12
7
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- # GNU Affero General Public License for more details.
8
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
+ # See LICENSE.md for more details.
15
10
 
16
11
  # This file may also be used under the terms of a commercial license
17
12
  # if purchased from OpenC3, Inc.
@@ -3,21 +3,16 @@
3
3
  # Copyright 2022 Ball Aerospace & Technologies Corp.
4
4
  # All Rights Reserved.
5
5
  #
6
- # This program is free software; you can modify and/or redistribute it
7
- # under the terms of the GNU Affero General Public License
8
- # as published by the Free Software Foundation; version 3 with
9
- # attribution addendums as found in the LICENSE.txt
10
- #
11
6
  # This program is distributed in the hope that it will be useful,
12
7
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- # GNU Affero General Public License for more details.
8
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
+ # See LICENSE.md for more details.
15
10
 
16
11
  # Modified by OpenC3, Inc.
17
- # All changes Copyright 2022, OpenC3, Inc.
12
+ # All changes Copyright 2026, OpenC3, Inc.
18
13
  # All Rights Reserved
19
14
  #
20
- # This file may also be used under the terms of a commercial license
15
+ # This file may also be used under the terms of a commercial license
21
16
  # if purchased from OpenC3, Inc.
22
17
 
23
18
  require 'openc3/utilities/store'
@@ -3,15 +3,10 @@
3
3
  # Copyright 2022 Ball Aerospace & Technologies Corp.
4
4
  # All Rights Reserved.
5
5
  #
6
- # This program is free software; you can modify and/or redistribute it
7
- # under the terms of the GNU Affero General Public License
8
- # as published by the Free Software Foundation; version 3 with
9
- # attribution addendums as found in the LICENSE.txt
10
- #
11
6
  # This program is distributed in the hope that it will be useful,
12
7
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- # GNU Affero General Public License for more details.
8
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
+ # See LICENSE.md for more details.
15
10
 
16
11
  # Modified by OpenC3, Inc.
17
12
  # All changes Copyright 2026, OpenC3, Inc.
@@ -56,6 +51,7 @@ module OpenC3
56
51
 
57
52
  attr_accessor :variables
58
53
  attr_accessor :plugin_txt_lines
54
+ attr_accessor :minimum_cosmos_version
59
55
  attr_accessor :needs_dependencies
60
56
  attr_accessor :store_id
61
57
  attr_accessor :title
@@ -102,6 +98,8 @@ module OpenC3
102
98
  # Extract gem and process plugin.txt to determine what VARIABLEs need to be filled in
103
99
  pkg = Gem::Package.new(gem_file_path)
104
100
 
101
+ minimum_cosmos_version = pkg.spec.metadata['openc3_cosmos_minimum_version']
102
+
105
103
  if existing_plugin_txt_lines and process_existing
106
104
  # This is only used in openc3cli load when everything is known
107
105
  plugin_txt_lines = existing_plugin_txt_lines
@@ -170,7 +168,7 @@ module OpenC3
170
168
  end
171
169
 
172
170
  store_id = Integer(store_id) if store_id
173
- model = PluginModel.new(name: gem_name, variables: variables, plugin_txt_lines: plugin_txt_lines, store_id: store_id, scope: scope)
171
+ model = PluginModel.new(name: gem_name, variables: variables, plugin_txt_lines: plugin_txt_lines, store_id: store_id, minimum_cosmos_version: minimum_cosmos_version, scope: scope)
174
172
  result = model.as_json()
175
173
  result['existing_plugin_txt_lines'] = existing_plugin_txt_lines if existing_plugin_txt_lines and not process_existing and existing_plugin_txt_lines != result['plugin_txt_lines']
176
174
  return result
@@ -194,9 +192,11 @@ module OpenC3
194
192
  tf = nil
195
193
 
196
194
  # Get the gem from local gem server if it hasn't been passed
197
- unless gem_file_path
195
+ if gem_file_path.nil?
198
196
  gem_name = plugin_hash['name'].split("__")[0]
199
197
  gem_file_path = OpenC3::GemModel.get(gem_name)
198
+ else
199
+ gem_name = File.basename(gem_file_path)
200
200
  end
201
201
 
202
202
  # Attempt to remove all older versions of this same plugin before install to prevent version conflicts
@@ -218,6 +218,8 @@ module OpenC3
218
218
  end
219
219
  end
220
220
 
221
+ plugin_model.minimum_cosmos_version = pkg.spec.metadata['openc3_cosmos_minimum_version']
222
+
221
223
  # Process app store metadata
222
224
  plugin_model.title = pkg.spec.metadata['openc3_store_title'] || pkg.spec.summary.strip
223
225
  plugin_model.description = pkg.spec.metadata['openc3_store_description'] || pkg.spec.description.strip
@@ -373,6 +375,7 @@ module OpenC3
373
375
  name:,
374
376
  variables: {},
375
377
  plugin_txt_lines: [],
378
+ minimum_cosmos_version: nil,
376
379
  needs_dependencies: false,
377
380
  store_id: nil,
378
381
  title: nil,
@@ -388,6 +391,7 @@ module OpenC3
388
391
  super("#{scope}__#{PRIMARY_KEY}", name: name, updated_at: updated_at, scope: scope)
389
392
  @variables = variables
390
393
  @plugin_txt_lines = plugin_txt_lines
394
+ @minimum_cosmos_version = minimum_cosmos_version
391
395
  @needs_dependencies = ConfigParser.handle_true_false(needs_dependencies)
392
396
  @store_id = store_id
393
397
  @title = title
@@ -414,6 +418,7 @@ module OpenC3
414
418
  'name' => @name,
415
419
  'variables' => @variables,
416
420
  'plugin_txt_lines' => @plugin_txt_lines,
421
+ 'minimum_cosmos_version' => @minimum_cosmos_version,
417
422
  'needs_dependencies' => @needs_dependencies,
418
423
  'store_id' => @store_id,
419
424
  'title' => @title,
@@ -1,17 +1,12 @@
1
1
  # encoding: ascii-8bit
2
2
 
3
- # Copyright 2025 OpenC3, Inc.
3
+ # Copyright 2026 OpenC3, Inc.
4
4
  # All Rights Reserved.
5
5
  #
6
- # This program is free software; you can modify and/or redistribute it
7
- # under the terms of the GNU Affero General Public License
8
- # as published by the Free Software Foundation; version 3 with
9
- # attribution addendums as found in the LICENSE.txt
10
- #
11
6
  # This program is distributed in the hope that it will be useful,
12
7
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- # GNU Affero General Public License for more details.
8
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
+ # See LICENSE.md for more details.
15
10
 
16
11
  # This file may also be used under the terms of a commercial license
17
12
  # if purchased from OpenC3, Inc.
@@ -22,6 +17,8 @@ require 'openc3/utilities/store'
22
17
  module OpenC3
23
18
  class PluginStoreModel < Model
24
19
  PRIMARY_KEY = 'openc3_plugin_store'
20
+ DEFAULT_STORE_URL = 'https://store.openc3.com'
21
+ JSON_ENDPOINT = '/api/v1.1/cosmos_plugins'
25
22
 
26
23
  def self.set(plugin_store_data)
27
24
  Store.set(PRIMARY_KEY, plugin_store_data)
@@ -32,12 +29,12 @@ module OpenC3
32
29
  end
33
30
 
34
31
  def self.plugin_store_error(message)
35
- Store.set(PRIMARY_KEY, [{
32
+ Store.set(PRIMARY_KEY, {
36
33
  date: Time.now.utc.iso8601,
37
34
  title: 'Plugin Store Error',
38
35
  body: message,
39
36
  error: true,
40
- }].to_json)
37
+ }.to_json)
41
38
  end
42
39
 
43
40
  def self.get_by_id(id)
@@ -46,13 +43,20 @@ module OpenC3
46
43
  end
47
44
 
48
45
  def self.update
49
- setting = SettingModel.get(name: 'store_url', scope: 'DEFAULT')
50
- store_url = setting['data'] if setting
51
- store_url = 'https://store.openc3.com' if store_url.nil? or store_url.strip.empty?
52
- conn = Faraday.new(
53
- url: store_url,
54
- )
55
- response = conn.get('/cosmos_plugins/json')
46
+ url_setting = SettingModel.get(name: 'store_url', scope: 'DEFAULT')
47
+ store_url = url_setting['data'] if url_setting
48
+ store_url = DEFAULT_STORE_URL if store_url.nil? or store_url.strip.empty?
49
+
50
+ api_key_setting = SettingModel.get(name: 'store_api_key', scope: 'DEFAULT')
51
+ api_key = api_key_setting['data'] if api_key_setting
52
+
53
+ conn = Faraday.new(url: store_url) do |faraday|
54
+ if api_key && !api_key.strip.empty?
55
+ faraday.headers['Authorization'] = "Bearer #{api_key}"
56
+ end
57
+ end
58
+
59
+ response = conn.get(JSON_ENDPOINT)
56
60
  if response.success?
57
61
  self.set(response.body)
58
62
  else
@@ -3,21 +3,16 @@
3
3
  # Copyright 2022 Ball Aerospace & Technologies Corp.
4
4
  # All Rights Reserved.
5
5
  #
6
- # This program is free software; you can modify and/or redistribute it
7
- # under the terms of the GNU Affero General Public License
8
- # as published by the Free Software Foundation; version 3 with
9
- # attribution addendums as found in the LICENSE.txt
10
- #
11
6
  # This program is distributed in the hope that it will be useful,
12
7
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- # GNU Affero General Public License for more details.
8
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
+ # See LICENSE.md for more details.
15
10
 
16
11
  # Modified by OpenC3, Inc.
17
- # All changes Copyright 2022, OpenC3, Inc.
12
+ # All changes Copyright 2026, OpenC3, Inc.
18
13
  # All Rights Reserved
19
14
  #
20
- # This file may also be used under the terms of a commercial license
15
+ # This file may also be used under the terms of a commercial license
21
16
  # if purchased from OpenC3, Inc.
22
17
 
23
18
  require 'openc3/models/model'
@@ -1,17 +1,12 @@
1
1
  # encoding: ascii-8bit
2
2
 
3
- # Copyright 2023 OpenC3, Inc.
3
+ # Copyright 2026 OpenC3, Inc.
4
4
  # All Rights Reserved.
5
5
  #
6
- # This program is free software; you can modify and/or redistribute it
7
- # under the terms of the GNU Affero General Public License
8
- # as published by the Free Software Foundation; version 3 with
9
- # attribution addendums as found in the LICENSE.txt
10
- #
11
6
  # This program is distributed in the hope that it will be useful,
12
7
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- # GNU Affero General Public License for more details.
8
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
+ # See LICENSE.md for more details.
15
10
  #
16
11
  # This file may also be used under the terms of a commercial license
17
12
  # if purchased from OpenC3, Inc.
@@ -1,17 +1,12 @@
1
1
  # encoding: ascii-8bit
2
2
 
3
- # Copyright 2025 OpenC3, Inc.
3
+ # Copyright 2026 OpenC3, Inc.
4
4
  # All Rights Reserved.
5
5
  #
6
- # This program is free software; you can modify and/or redistribute it
7
- # under the terms of the GNU Affero General Public License
8
- # as published by the Free Software Foundation; version 3 with
9
- # attribution addendums as found in the LICENSE.txt
10
- #
11
6
  # This program is distributed in the hope that it will be useful,
12
7
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- # GNU Affero General Public License for more details.
8
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
+ # See LICENSE.md for more details.
15
10
 
16
11
  # This file may also be used under the terms of a commercial license
17
12
  # if purchased from OpenC3, Inc.
@@ -3,18 +3,13 @@
3
3
  # Copyright 2022 Ball Aerospace & Technologies Corp.
4
4
  # All Rights Reserved.
5
5
  #
6
- # This program is free software; you can modify and/or redistribute it
7
- # under the terms of the GNU Affero General Public License
8
- # as published by the Free Software Foundation; version 3 with
9
- # attribution addendums as found in the LICENSE.txt
10
- #
11
6
  # This program is distributed in the hope that it will be useful,
12
7
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- # GNU Affero General Public License for more details.
8
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
+ # See LICENSE.md for more details.
15
10
 
16
11
  # Modified by OpenC3, Inc.
17
- # All changes Copyright 2024, OpenC3, Inc.
12
+ # All changes Copyright 2026, OpenC3, Inc.
18
13
  # All Rights Reserved
19
14
  #
20
15
  # This file may also be used under the terms of a commercial license
@@ -235,16 +230,20 @@ module OpenC3
235
230
 
236
231
  def notify_enable
237
232
  @enabled = true
233
+ @updated_at = Time.now.to_nsec_from_epoch
234
+ Store.hset(@primary_key, @name, JSON.generate(as_json, allow_nan: true))
238
235
  notify(kind: 'enabled')
239
- # update() will be called by the reaction_microservice
236
+ # update() will also be called by the reaction_microservice
240
237
  end
241
238
 
242
239
  def notify_disable
243
240
  @enabled = false
244
241
  # disabling clears the snooze so when it's enabled it can immediately run
245
242
  @snoozed_until = nil
243
+ @updated_at = Time.now.to_nsec_from_epoch
244
+ Store.hset(@primary_key, @name, JSON.generate(as_json, allow_nan: true))
246
245
  notify(kind: 'disabled')
247
- # update() will be called by the reaction_microservice
246
+ # update() will also be called by the reaction_microservice
248
247
  end
249
248
 
250
249
  def notify_execute
@@ -3,21 +3,16 @@
3
3
  # Copyright 2022 Ball Aerospace & Technologies Corp.
4
4
  # All Rights Reserved.
5
5
  #
6
- # This program is free software; you can modify and/or redistribute it
7
- # under the terms of the GNU Affero General Public License
8
- # as published by the Free Software Foundation; version 3 with
9
- # attribution addendums as found in the LICENSE.txt
10
- #
11
6
  # This program is distributed in the hope that it will be useful,
12
7
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- # GNU Affero General Public License for more details.
8
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
+ # See LICENSE.md for more details.
15
10
 
16
11
  # Modified by OpenC3, Inc.
17
- # All changes Copyright 2022, OpenC3, Inc.
12
+ # All changes Copyright 2026, OpenC3, Inc.
18
13
  # All Rights Reserved
19
14
  #
20
- # This file may also be used under the terms of a commercial license
15
+ # This file may also be used under the terms of a commercial license
21
16
  # if purchased from OpenC3, Inc.
22
17
 
23
18
  require 'openc3/models/interface_model'