miravo 0.6.0 → 0.6.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 (187) hide show
  1. package/LICENSE +199 -0
  2. package/README.md +29 -59
  3. package/bin/miravo.js +84 -0
  4. package/package.json +21 -37
  5. package/console-dist/assets/activity-DsWeRq4h.js +0 -1
  6. package/console-dist/assets/api-4AqKvsm9.js +0 -1
  7. package/console-dist/assets/arrow-right-Ea_UhTNi.js +0 -1
  8. package/console-dist/assets/arrow-up-down-DFSjzzl2.js +0 -1
  9. package/console-dist/assets/blueprint-card-classes-DBFCDy0M.js +0 -1
  10. package/console-dist/assets/box-C1WaoOMF.js +0 -1
  11. package/console-dist/assets/card-BjeP32PN.js +0 -1
  12. package/console-dist/assets/catalog-BJzyzbLR.js +0 -1
  13. package/console-dist/assets/catalog-DKjEm-c4.js +0 -1
  14. package/console-dist/assets/catalog-template-icons-BrUeHaCY.js +0 -1
  15. package/console-dist/assets/checkbox-DZlJXTE4.js +0 -1
  16. package/console-dist/assets/chunk-OE4NN4TA-CEjpfhS6.js +0 -3
  17. package/console-dist/assets/combobox-BGnuCYxO.js +0 -1
  18. package/console-dist/assets/control-CPhvwx9o.js +0 -1
  19. package/console-dist/assets/control-Cg2up9NA.js +0 -1
  20. package/console-dist/assets/copy-button-WkbNkMcd.js +0 -1
  21. package/console-dist/assets/createLucideIcon-Bwxw859K.js +0 -1
  22. package/console-dist/assets/deploy-tab-JeWDwPoZ.js +0 -1
  23. package/console-dist/assets/dist-BhbDML0a.js +0 -1
  24. package/console-dist/assets/dist-Cy8XTNFT.js +0 -2
  25. package/console-dist/assets/download-DQ6NH16U.js +0 -1
  26. package/console-dist/assets/engine-store-CrLnz692.js +0 -1
  27. package/console-dist/assets/events-CXm29Ok4.js +0 -1
  28. package/console-dist/assets/events-D01IxhnP.js +0 -1
  29. package/console-dist/assets/fira-code-cyrillic-ext-wght-normal-DhYMMuQd.woff2 +0 -0
  30. package/console-dist/assets/fira-code-cyrillic-wght-normal-Y3u8pIsh.woff2 +0 -0
  31. package/console-dist/assets/fira-code-greek-ext-wght-normal-wWus70Ix.woff2 +0 -0
  32. package/console-dist/assets/fira-code-greek-wght-normal-B2SviObF.woff2 +0 -0
  33. package/console-dist/assets/fira-code-latin-ext-wght-normal-Dvfvaomy.woff2 +0 -0
  34. package/console-dist/assets/fira-code-latin-wght-normal-CHoedHDv.woff2 +0 -0
  35. package/console-dist/assets/fira-code-symbols2-wght-normal-CE6EOz_n.woff2 +0 -0
  36. package/console-dist/assets/fleet-CfxbKXt9.js +0 -1
  37. package/console-dist/assets/fleet-lotMGVqe.js +0 -1
  38. package/console-dist/assets/format-kXTonpDJ.js +0 -1
  39. package/console-dist/assets/gauge-Ci8zNZlk.js +0 -1
  40. package/console-dist/assets/get-error-message-3Q5Q-2G5.js +0 -1
  41. package/console-dist/assets/index-CVPKSDvJ.js +0 -12
  42. package/console-dist/assets/index-DJkgDeun.css +0 -2
  43. package/console-dist/assets/input-BWEQFptx.js +0 -1
  44. package/console-dist/assets/instance-detail-C5IVwuh3.js +0 -1
  45. package/console-dist/assets/karla-latin-ext-wght-normal-Dq0rrjgs.woff2 +0 -0
  46. package/console-dist/assets/karla-latin-wght-normal-C3-ma4ov.woff2 +0 -0
  47. package/console-dist/assets/label-uephX5ZG.js +0 -1
  48. package/console-dist/assets/layers-CUsLQ1fq.js +0 -1
  49. package/console-dist/assets/login-C3RJli0m.js +0 -126
  50. package/console-dist/assets/models-B_UioWQ5.js +0 -1
  51. package/console-dist/assets/models-_IPlPiZ7.js +0 -1
  52. package/console-dist/assets/not-found-B8gAm08S.js +0 -1
  53. package/console-dist/assets/platform-targets-R3T-4eJ7.js +0 -1
  54. package/console-dist/assets/platforms-BWh0BQ3Y.js +0 -1
  55. package/console-dist/assets/platforms-DStNbtVc.js +0 -1
  56. package/console-dist/assets/proxy-CsnYqnPp.js +0 -9
  57. package/console-dist/assets/query-keys-BvtE7BMs.js +0 -1
  58. package/console-dist/assets/radio-CoHegOv5.js +0 -1
  59. package/console-dist/assets/rolldown-runtime-COnpUsM8.js +0 -1
  60. package/console-dist/assets/schibsted-grotesk-latin-ext-wght-normal-hsMS0n0O.woff2 +0 -0
  61. package/console-dist/assets/schibsted-grotesk-latin-wght-normal-Bb8VGrTG.woff2 +0 -0
  62. package/console-dist/assets/select-CeO4vP0G.js +0 -1
  63. package/console-dist/assets/select-display-items-CIzY8953.js +0 -1
  64. package/console-dist/assets/server-D9Kfn8fQ.js +0 -1
  65. package/console-dist/assets/shallow-6lGjQhtJ.js +0 -1
  66. package/console-dist/assets/tags-CiXOIHtY.js +0 -4
  67. package/console-dist/assets/tags-FQCXIxrP.js +0 -1
  68. package/console-dist/assets/tooltip-HGLF366Q.js +0 -1
  69. package/console-dist/assets/transition-nav-link-Df4Rk6vV.js +0 -1
  70. package/console-dist/assets/transition-types-CPlGtM8w.js +0 -1
  71. package/console-dist/assets/triangle-alert-adNk_sea.js +0 -1
  72. package/console-dist/assets/use-platform-stream-DGbK1k2L.js +0 -2
  73. package/console-dist/assets/use-transition-navigate-CCpcWXB0.js +0 -2
  74. package/console-dist/assets/validation-Blvud9_O.js +0 -1
  75. package/console-dist/assets/vendor-charts-CAZdaPlq.js +0 -60
  76. package/console-dist/assets/vendor-table-wd8JuMmT.js +0 -4
  77. package/console-dist/assets/vendor-ui-ByahnaY0.js +0 -1
  78. package/console-dist/favicon.svg +0 -37
  79. package/console-dist/index.html +0 -82
  80. package/console-dist/miravo-logo.png +0 -0
  81. package/src/__tests__/integration/executable-methods-runner.ts +0 -262
  82. package/src/__tests__/integration/executable-methods.integration.ts +0 -2348
  83. package/src/__tests__/integration/opcua-concurrent-clients.integration.ts +0 -314
  84. package/src/commands/adapter.ts +0 -249
  85. package/src/commands/apply.test.ts +0 -62
  86. package/src/commands/apply.ts +0 -216
  87. package/src/commands/cleanup.test.ts +0 -34
  88. package/src/commands/cleanup.ts +0 -201
  89. package/src/commands/cli-test-setup.ts +0 -91
  90. package/src/commands/export.test.ts +0 -51
  91. package/src/commands/export.ts +0 -404
  92. package/src/commands/fork.ts +0 -219
  93. package/src/commands/inject.test.ts +0 -57
  94. package/src/commands/inject.ts +0 -212
  95. package/src/commands/load.ts +0 -167
  96. package/src/commands/logs.ts +0 -173
  97. package/src/commands/models.test.ts +0 -162
  98. package/src/commands/models.ts +0 -338
  99. package/src/commands/pause.ts +0 -67
  100. package/src/commands/platforms.test.ts +0 -186
  101. package/src/commands/platforms.ts +0 -371
  102. package/src/commands/ps.ts +0 -116
  103. package/src/commands/remove.ts +0 -38
  104. package/src/commands/reset.ts +0 -44
  105. package/src/commands/rm.ts +0 -97
  106. package/src/commands/spawn.ts +0 -45
  107. package/src/commands/speed.ts +0 -40
  108. package/src/commands/start/adapter-config.ts +0 -157
  109. package/src/commands/start/catalog-le-dt.test.ts +0 -50
  110. package/src/commands/start/catalog-le-dt.ts +0 -187
  111. package/src/commands/start/catalog-model-schema.ts +0 -89
  112. package/src/commands/start/catalog-template-detail.ts +0 -54
  113. package/src/commands/start/daemon.ts +0 -255
  114. package/src/commands/start/display.ts +0 -150
  115. package/src/commands/start/engine-setup.ts +0 -247
  116. package/src/commands/start/events.ts +0 -126
  117. package/src/commands/start/index.ts +0 -897
  118. package/src/commands/start/protocol-plans.ts +0 -239
  119. package/src/commands/start/template-loader.ts +0 -197
  120. package/src/commands/start/template-resolver.ts +0 -185
  121. package/src/commands/start/types.ts +0 -73
  122. package/src/commands/start.test.ts +0 -480
  123. package/src/commands/status.test.ts +0 -20
  124. package/src/commands/status.ts +0 -470
  125. package/src/commands/stop.test.ts +0 -84
  126. package/src/commands/stop.ts +0 -169
  127. package/src/commands/templates.test.ts +0 -58
  128. package/src/commands/templates.ts +0 -277
  129. package/src/index.ts +0 -166
  130. package/src/lib/admin-auth.ts +0 -157
  131. package/src/lib/admin-client.test.ts +0 -51
  132. package/src/lib/admin-client.ts +0 -326
  133. package/src/lib/admin-platform-routes.ts +0 -1017
  134. package/src/lib/admin-platform-stream.test.ts +0 -434
  135. package/src/lib/admin-platform-stream.ts +0 -788
  136. package/src/lib/admin-responses.ts +0 -211
  137. package/src/lib/admin-server.test.ts +0 -781
  138. package/src/lib/admin-server.ts +0 -797
  139. package/src/lib/auth-store.ts +0 -87
  140. package/src/lib/daemon-registry.test.ts +0 -429
  141. package/src/lib/daemon-registry.ts +0 -343
  142. package/src/lib/le/le-apply.test.ts +0 -591
  143. package/src/lib/le/le-apply.ts +0 -832
  144. package/src/lib/le/le-auth.ts +0 -89
  145. package/src/lib/le/le-cleanup.test.ts +0 -168
  146. package/src/lib/le/le-cleanup.ts +0 -399
  147. package/src/lib/le/le-cli-helpers.ts +0 -77
  148. package/src/lib/le/le-client.ts +0 -184
  149. package/src/lib/le/le-concurrency.test.ts +0 -157
  150. package/src/lib/le/le-concurrency.ts +0 -78
  151. package/src/lib/le/le-connection-test.ts +0 -42
  152. package/src/lib/le/le-devicehub-properties.test.ts +0 -53
  153. package/src/lib/le/le-devicehub-properties.ts +0 -33
  154. package/src/lib/le/le-devicehub.ts +0 -213
  155. package/src/lib/le/le-digital-twins.ts +0 -285
  156. package/src/lib/le/le-drivers.ts +0 -23
  157. package/src/lib/le/le-endpoint.ts +0 -40
  158. package/src/lib/le/le-environments.test.ts +0 -73
  159. package/src/lib/le/le-environments.ts +0 -156
  160. package/src/lib/le/le-markers.ts +0 -87
  161. package/src/lib/le/le-plan.test.ts +0 -26
  162. package/src/lib/le/le-plan.ts +0 -109
  163. package/src/lib/le/le-platform-operations.test.ts +0 -198
  164. package/src/lib/le/le-platform-operations.ts +0 -340
  165. package/src/lib/le/le-static-model-schema.ts +0 -78
  166. package/src/lib/le/le-static-planner.test.ts +0 -255
  167. package/src/lib/le/le-static-planner.ts +0 -442
  168. package/src/lib/le/le-template-exporter.test.ts +0 -527
  169. package/src/lib/le/le-template-exporter.ts +0 -459
  170. package/src/lib/le/le-value-types.ts +0 -23
  171. package/src/lib/mqtt-client.ts +0 -115
  172. package/src/lib/parse.test.ts +0 -123
  173. package/src/lib/parse.ts +0 -87
  174. package/src/lib/resolve-simulation.test.ts +0 -118
  175. package/src/lib/resolve-simulation.ts +0 -181
  176. package/src/lib/session-store.ts +0 -110
  177. package/src/lib/shutdown.test.ts +0 -562
  178. package/src/lib/shutdown.ts +0 -621
  179. package/src/lib/template-category.test.ts +0 -71
  180. package/src/lib/template-category.ts +0 -72
  181. package/src/lib/template-locator.ts +0 -55
  182. package/src/lib/template-utils.ts +0 -45
  183. package/src/lib/ws-hub.ts +0 -281
  184. package/src/logger.test.ts +0 -172
  185. package/src/logger.ts +0 -402
  186. package/src/output.test.ts +0 -64
  187. package/src/output.ts +0 -160
package/LICENSE ADDED
@@ -0,0 +1,199 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to the Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by the Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding any notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. Please also get an
185
+ information on the current year at http://www.apache.org/licenses/
186
+
187
+ Copyright 2026 Amine Amaach
188
+
189
+ Licensed under the Apache License, Version 2.0 (the "License");
190
+ you may not use this file except in compliance with the License.
191
+ You may obtain a copy of the License at
192
+
193
+ http://www.apache.org/licenses/LICENSE-2.0
194
+
195
+ Unless required by applicable law or agreed to in writing, software
196
+ distributed under the License is distributed on an "AS IS" BASIS,
197
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
198
+ See the License for the specific language governing permissions and
199
+ limitations under the License.
package/README.md CHANGED
@@ -1,76 +1,46 @@
1
- # Miravo
1
+ <p align="center">
2
+ <img src="https://miravo.dev/miravo-logo.webp" alt="Miravo" width="120" />
3
+ </p>
2
4
 
3
- Industrial environment platform. Canonical asset models, multi-protocol output, structured plant topology.
5
+ <p align="center">Industrial environments as code.</p>
4
6
 
5
- Miravo simulates industrial assets with realistic physics -- correlated tags, lifecycle degradation, cascading faults -- and projects them over MQTT, OPC UA, Modbus TCP, and more from a single canonical asset model.
7
+ <p align="center"><strong>Miravo</strong> is an open-source industrial modeling and simulation platform. Describe the plant once. Miravo runs it with real topology, lifecycle wear, and cascading faults — and speaks MQTT, OPC UA, and Modbus TCP at the same time, the way a real plant does.</p>
6
8
 
7
- ```
8
- MiravoWorks/smart-factory
9
- ├── production/line-1
10
- │ └── pump-001
11
- │ ├── discharge_pressure → 2.91
12
- │ ├── flow_rate → 43.7
13
- │ └── vibration_axial → 1.82
14
- └── utilities/compressed-air
15
- └── compressor-001
16
- └── header_pressure → 7.8
17
- ```
9
+ <p align="center">
10
+ <img src="https://miravo.dev/console-screenshot.png" alt="Miravo Console" width="80%" />
11
+ </p>
18
12
 
19
- ## Install
13
+ ---
20
14
 
21
- ```bash
22
- # bunx (requires Bun — https://bun.sh)
23
- bunx miravo start
15
+ ## Quickstart
24
16
 
25
- # Docker
26
- docker run --rm -p 1883:1883 -p 8080:8080 amineamaach/miravo:latest
17
+ Install Miravo on Linux/macOS.
27
18
 
28
- # Standalone binary (no runtime needed)
29
- # Download from https://github.com/amine-amaach/miravo/releases
30
- ./miravo start
19
+ ```shell
20
+ curl -fsSL https://miravo.dev/install | bash
31
21
  ```
32
22
 
33
- ## Quick Start
34
-
35
- ```bash
36
- # List available templates
37
- miravo templates list
38
-
39
- # Start a simulation (interactive template picker if TTY)
40
- miravo start
41
-
42
- # Start with a specific template
43
- miravo start --template smart-factory
44
-
45
- # Deterministic replay
46
- miravo start --seed 42
47
-
48
- # Faster simulated time
49
- miravo start --speed 10 --tick 500
23
+ ```shell
24
+ npm install -g miravo
50
25
  ```
51
26
 
52
- Connect any MQTT client to `localhost:1883` and subscribe to `#` to see the data.
53
-
54
- ## 3-Command Demo
27
+ Use Node.js >= 18.
55
28
 
56
- ```bash
57
- miravo start -d --name my-sim # Start in daemon mode
58
- miravo inject pump-001 cavitation # Inject a fault at runtime
59
- miravo ps # List running simulations
60
- ```
29
+ [Full install options: Docker, Windows guidance, and standalone binaries.](https://miravo.dev/docs#1-install-miravo)
61
30
 
62
- ## Documentation
31
+ Get started with the [`Smart Factory`](https://miravo.dev/docs/environments/smart-factory) environment — the Console opens at `http://127.0.0.1:8080`.
63
32
 
64
- For the full command reference, all options, environment variables, and advanced usage, visit **[miravo.dev/docs/cli-reference](https://miravo.dev/docs/cli-reference/)**.
33
+ ```shell
34
+ miravo start
35
+ ```
65
36
 
66
- | Topic | Link |
67
- | --- | --- |
68
- | CLI Reference | [miravo.dev/docs/cli-reference](https://miravo.dev/docs/cli-reference/) |
69
- | Environment Variables | [miravo.dev/docs/environment-variables](https://miravo.dev/docs/environment-variables/) |
70
- | Docker | [miravo.dev/docs/docker](https://miravo.dev/docs/docker/) |
71
- | Twin Models | [miravo.dev/docs/twin-models](https://miravo.dev/docs/twin-models/) |
72
- | Built-in Content | [miravo.dev/docs/built-in-content](https://miravo.dev/docs/built-in-content/) |
37
+ ## Docs
73
38
 
74
- ## License
39
+ - [**Documentation**](https://miravo.dev/docs)
40
+ - [**Core concepts**](https://miravo.dev/docs/core/concepts)
41
+ - [**Twin models**](https://miravo.dev/docs/core/twin-models)
42
+ - [**CLI reference**](https://miravo.dev/docs/cli/reference)
43
+ - [**Protocols**](https://miravo.dev/docs/protocols) — MQTT, OPC UA, Modbus TCP
44
+ - [**Platforms**](https://miravo.dev/docs/platforms) — Litmus Edge today; Ignition, AWS IoT, Azure IoT in the works
75
45
 
76
- [Apache 2.0](https://github.com/amine-amaach/miravo/blob/main/LICENSE)
46
+ This repository is licensed under the [Apache-2.0 License](LICENSE).
package/bin/miravo.js ADDED
@@ -0,0 +1,84 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require("node:fs");
4
+ const path = require("node:path");
5
+ const { spawnSync } = require("node:child_process");
6
+
7
+ const PLATFORM_PACKAGES = new Map([
8
+ ["linux/x64", "@miravo/cli-linux-x64"],
9
+ ["linux/arm64", "@miravo/cli-linux-arm64"],
10
+ ["darwin/x64", "@miravo/cli-darwin-x64"],
11
+ ["darwin/arm64", "@miravo/cli-darwin-arm64"],
12
+ ["win32/x64", "@miravo/cli-windows-x64"],
13
+ ]);
14
+
15
+ function resolveBinaryName(platform) {
16
+ return platform === "win32" ? "miravo.exe" : "miravo";
17
+ }
18
+
19
+ function detectMuslLibc(options = {}) {
20
+ const fsModule = options.fsModule || fs;
21
+ const spawnSyncFn = options.spawnSyncFn || spawnSync;
22
+ try {
23
+ if (fsModule.existsSync("/etc/alpine-release")) return true;
24
+ } catch {}
25
+ try {
26
+ // Avoid /lib scanning: glibc hosts can also have musl loaders installed.
27
+ const result = spawnSyncFn("ldd", ["--version"], { encoding: "utf8" });
28
+ const combinedOutput = `${result?.stdout || ""}\n${result?.stderr || ""}`;
29
+ if (/\bmusl\b/i.test(combinedOutput)) return true;
30
+ } catch {}
31
+ return false;
32
+ }
33
+
34
+ function fail(message) {
35
+ process.stderr.write(`miravo: ${message}\n`);
36
+ process.exit(1);
37
+ }
38
+
39
+ function main() {
40
+ const platform = process.platform;
41
+ const arch = process.arch;
42
+ const packageName = PLATFORM_PACKAGES.get(`${platform}/${arch}`);
43
+
44
+ if (!packageName) {
45
+ fail(
46
+ `unsupported platform ${platform}/${arch}. Supported: linux/x64, linux/arm64, darwin/x64, darwin/arm64, win32/x64. Use the install script, Docker, or a standalone archive.`,
47
+ );
48
+ }
49
+
50
+ if (platform === "linux" && detectMuslLibc()) {
51
+ fail(
52
+ `Linux musl (for example Alpine) is unsupported for package-manager installs. Use https://miravo.dev/install, Docker, or a standalone archive.`,
53
+ );
54
+ }
55
+
56
+ let pkgJsonPath;
57
+ try {
58
+ pkgJsonPath = require.resolve(`${packageName}/package.json`, { paths: [__dirname] });
59
+ } catch {
60
+ fail(
61
+ `${packageName} is not installed. Reinstall with optional dependencies enabled (example: npm install miravo --include=optional). If you use a corporate proxy, allow @miravo/* packages.`,
62
+ );
63
+ }
64
+
65
+ const bin = path.join(path.dirname(pkgJsonPath), resolveBinaryName(platform));
66
+ if (!fs.existsSync(bin)) {
67
+ fail(`${packageName} is incomplete: missing binary at ${bin}. Reinstall miravo.`);
68
+ }
69
+
70
+ const result = spawnSync(bin, process.argv.slice(2), {
71
+ stdio: "inherit",
72
+ windowsHide: false,
73
+ });
74
+ if (result.error) {
75
+ fail(`failed to spawn ${bin}: ${result.error.message}`);
76
+ }
77
+ process.exit(typeof result.status === "number" ? result.status : 1);
78
+ }
79
+
80
+ if (require.main === module) {
81
+ main();
82
+ }
83
+
84
+ module.exports = { main, resolveBinaryName, detectMuslLibc };
package/package.json CHANGED
@@ -1,51 +1,35 @@
1
1
  {
2
2
  "name": "miravo",
3
- "version": "0.6.0",
4
- "type": "module",
5
- "description": "Industrial environment platform with canonical asset models and MQTT + OPC UA protocol adapters",
3
+ "version": "0.6.2",
4
+ "description": "Industrial environment platform — Node launcher that runs the platform-specific Miravo binary.",
6
5
  "license": "Apache-2.0",
7
6
  "repository": {
8
7
  "type": "git",
9
- "url": "https://github.com/amine-amaach/miravo.git",
10
- "directory": "packages/cli"
8
+ "url": "git+https://github.com/amine-amaach/miravo.git",
9
+ "directory": "packages/cli-launcher"
11
10
  },
12
- "publishConfig": {
13
- "access": "public"
11
+ "bin": {
12
+ "miravo": "bin/miravo.js"
14
13
  },
15
- "keywords": [
16
- "iiot",
17
- "digital-twin",
18
- "mqtt",
19
- "simulator",
20
- "uns",
21
- "industrial-iot"
14
+ "files": [
15
+ "bin/",
16
+ "README.md",
17
+ "LICENSE"
22
18
  ],
23
19
  "engines": {
24
- "bun": ">=1.0.0"
20
+ "node": ">=18"
25
21
  },
26
- "bin": {
27
- "miravo": "./src/index.ts"
22
+ "optionalDependencies": {
23
+ "@miravo/cli-linux-x64": "0.6.2",
24
+ "@miravo/cli-linux-arm64": "0.6.2",
25
+ "@miravo/cli-darwin-x64": "0.6.2",
26
+ "@miravo/cli-darwin-arm64": "0.6.2",
27
+ "@miravo/cli-windows-x64": "0.6.2"
28
28
  },
29
- "files": [
30
- "src/",
31
- "console-dist/"
32
- ],
33
- "dependencies": {
34
- "@clack/prompts": "^1.1.0",
35
- "@miravo/core": "0.6.0",
36
- "@miravo/modbus": "0.6.0",
37
- "@miravo/mqtt": "0.6.0",
38
- "@miravo/opcua": "0.6.0",
39
- "@miravo/shared": "0.6.0",
40
- "commander": "^13.0.0",
41
- "consola": "^3.4.0",
42
- "mqtt": "^5.15.0",
43
- "yaml": "^2.8.1",
44
- "zod": "^3.24.0"
29
+ "exports": {
30
+ "./package.json": "./package.json"
45
31
  },
46
- "devDependencies": {
47
- "@miravo/console": "0.0.0",
48
- "node-opcua-client": "^2.169.0",
49
- "node-opcua-variant": "^2.169.0"
32
+ "publishConfig": {
33
+ "access": "public"
50
34
  }
51
35
  }
@@ -1 +0,0 @@
1
- import{t as e}from"./createLucideIcon-Bwxw859K.js";var t=e(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]);export{t};