mxrb 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.de-DE.md +108 -0
  4. data/README.md +172 -0
  5. data/README.pt-BR.md +109 -0
  6. data/bin/mxrb +1613 -0
  7. data/docs/README.md +10 -0
  8. data/docs/de-DE/README.md +24 -0
  9. data/docs/de-DE/architectural-patterns.md +26 -0
  10. data/docs/de-DE/architectural-standard.md +48 -0
  11. data/docs/de-DE/architecture.md +76 -0
  12. data/docs/de-DE/compiler.md +162 -0
  13. data/docs/de-DE/conventions.md +19 -0
  14. data/docs/de-DE/design-system.md +52 -0
  15. data/docs/de-DE/entity-dsl.md +53 -0
  16. data/docs/de-DE/native-runtime-quality-report.md +74 -0
  17. data/docs/de-DE/oql-sql.md +211 -0
  18. data/docs/de-DE/platform-api-integration.md +36 -0
  19. data/docs/de-DE/platform-operations.md +243 -0
  20. data/docs/de-DE/project-structure.md +32 -0
  21. data/docs/de-DE/ruby-first-roadmap.md +116 -0
  22. data/docs/de-DE/scaffolds.md +59 -0
  23. data/docs/de-DE/semantic-refactoring.md +56 -0
  24. data/docs/de-DE/team-server.md +33 -0
  25. data/docs/de-DE/validation-matrix.md +64 -0
  26. data/docs/de-DE/vetclinic-acceptance.md +24 -0
  27. data/docs/de-DE/writing.md +138 -0
  28. data/docs/en-US/README.md +24 -0
  29. data/docs/en-US/architectural-patterns.md +151 -0
  30. data/docs/en-US/architectural-standard.md +89 -0
  31. data/docs/en-US/architecture.md +170 -0
  32. data/docs/en-US/compiler.md +157 -0
  33. data/docs/en-US/conventions.md +82 -0
  34. data/docs/en-US/design-system.md +163 -0
  35. data/docs/en-US/entity-dsl.md +53 -0
  36. data/docs/en-US/native-runtime-quality-report.md +73 -0
  37. data/docs/en-US/oql-sql.md +201 -0
  38. data/docs/en-US/platform-api-integration.md +36 -0
  39. data/docs/en-US/platform-operations.md +244 -0
  40. data/docs/en-US/project-structure.md +49 -0
  41. data/docs/en-US/ruby-first-roadmap.md +186 -0
  42. data/docs/en-US/scaffolds.md +57 -0
  43. data/docs/en-US/semantic-refactoring.md +198 -0
  44. data/docs/en-US/team-server.md +32 -0
  45. data/docs/en-US/validation-matrix.md +257 -0
  46. data/docs/en-US/vetclinic-acceptance.md +23 -0
  47. data/docs/en-US/writing.md +655 -0
  48. data/docs/pt-BR/README.md +24 -0
  49. data/docs/pt-BR/architectural-patterns.md +25 -0
  50. data/docs/pt-BR/architectural-standard.md +533 -0
  51. data/docs/pt-BR/architecture.md +300 -0
  52. data/docs/pt-BR/compiler.md +162 -0
  53. data/docs/pt-BR/conventions.md +19 -0
  54. data/docs/pt-BR/design-system.md +65 -0
  55. data/docs/pt-BR/entity-dsl.md +116 -0
  56. data/docs/pt-BR/native-runtime-quality-report.md +73 -0
  57. data/docs/pt-BR/oql-sql.md +208 -0
  58. data/docs/pt-BR/platform-api-integration.md +36 -0
  59. data/docs/pt-BR/platform-operations.md +260 -0
  60. data/docs/pt-BR/project-structure.md +32 -0
  61. data/docs/pt-BR/ruby-first-roadmap.md +239 -0
  62. data/docs/pt-BR/scaffolds.md +104 -0
  63. data/docs/pt-BR/semantic-refactoring.md +55 -0
  64. data/docs/pt-BR/team-server.md +59 -0
  65. data/docs/pt-BR/validation-matrix.md +86 -0
  66. data/docs/pt-BR/vetclinic-acceptance.md +50 -0
  67. data/docs/pt-BR/writing.md +177 -0
  68. data/examples/sudoku_evaluation.rb +14 -0
  69. data/examples/sudoku_functional_test.rb +28 -0
  70. data/lib/mxrb/architecture/graph.rb +124 -0
  71. data/lib/mxrb/architecture/validator.rb +98 -0
  72. data/lib/mxrb/benchmark.rb +33 -0
  73. data/lib/mxrb/compare.rb +390 -0
  74. data/lib/mxrb/compiler/adapter.rb +96 -0
  75. data/lib/mxrb/compiler/artifact_document_compiler.rb +102 -0
  76. data/lib/mxrb/compiler/artifact_materializer.rb +53 -0
  77. data/lib/mxrb/compiler/client_model_materializer.rb +42 -0
  78. data/lib/mxrb/compiler/code_action_document_compiler.rb +64 -0
  79. data/lib/mxrb/compiler/code_action_materializer.rb +35 -0
  80. data/lib/mxrb/compiler/code_action_type_compiler.rb +32 -0
  81. data/lib/mxrb/compiler/combo_box_bundle_compiler.rb +314 -0
  82. data/lib/mxrb/compiler/compatibility_analyzer.rb +169 -0
  83. data/lib/mxrb/compiler/constants_materializer.rb +111 -0
  84. data/lib/mxrb/compiler/data_grid_bundle_compiler.rb +290 -0
  85. data/lib/mxrb/compiler/database_connector_action_compiler.rb +280 -0
  86. data/lib/mxrb/compiler/deployment_asset_copier.rb +60 -0
  87. data/lib/mxrb/compiler/deployment_bootstrapper.rb +208 -0
  88. data/lib/mxrb/compiler/deployment_materializer.rb +43 -0
  89. data/lib/mxrb/compiler/deployment_metadata.rb +64 -0
  90. data/lib/mxrb/compiler/domain_document_compiler.rb +153 -0
  91. data/lib/mxrb/compiler/domain_model_materializer.rb +35 -0
  92. data/lib/mxrb/compiler/domain_security_compiler.rb +82 -0
  93. data/lib/mxrb/compiler/gallery_bundle_compiler.rb +190 -0
  94. data/lib/mxrb/compiler/generic_widget_bundle_compiler.rb +281 -0
  95. data/lib/mxrb/compiler/image_bundle_compiler.rb +216 -0
  96. data/lib/mxrb/compiler/java_proxy_generator.rb +509 -0
  97. data/lib/mxrb/compiler/legacy_data_grid_compiler.rb +267 -0
  98. data/lib/mxrb/compiler/legacy_page_builder.rb +287 -0
  99. data/lib/mxrb/compiler/mda.rb +99 -0
  100. data/lib/mxrb/compiler/microflow_document_compiler.rb +85 -0
  101. data/lib/mxrb/compiler/microflow_materializer.rb +48 -0
  102. data/lib/mxrb/compiler/microflow_node_compiler.rb +250 -0
  103. data/lib/mxrb/compiler/model_package.rb +116 -0
  104. data/lib/mxrb/compiler/model_values.rb +67 -0
  105. data/lib/mxrb/compiler/nanoflow_program_compiler.rb +483 -0
  106. data/lib/mxrb/compiler/navigation_document_compiler.rb +93 -0
  107. data/lib/mxrb/compiler/packager.rb +100 -0
  108. data/lib/mxrb/compiler/page_bundle_builder.rb +56 -0
  109. data/lib/mxrb/compiler/page_bundle_compiler.rb +2004 -0
  110. data/lib/mxrb/compiler/page_document_compiler.rb +77 -0
  111. data/lib/mxrb/compiler/portable_packager.rb +356 -0
  112. data/lib/mxrb/compiler/project_jar_archive.rb +84 -0
  113. data/lib/mxrb/compiler/project_jar_builder.rb +121 -0
  114. data/lib/mxrb/compiler/project_materializer.rb +139 -0
  115. data/lib/mxrb/compiler/project_model_orderer.rb +52 -0
  116. data/lib/mxrb/compiler/runtime_data_types.rb +31 -0
  117. data/lib/mxrb/compiler/runtime_model_schema.rb +90 -0
  118. data/lib/mxrb/compiler/schemas/runtime-10.24.0.73019.json +1052 -0
  119. data/lib/mxrb/compiler/schemas/runtime-11.json +1215 -0
  120. data/lib/mxrb/compiler/schemas/runtime-6.10.8.json +1148 -0
  121. data/lib/mxrb/compiler/schemas/runtime-7.17.0.json +1144 -0
  122. data/lib/mxrb/compiler/schemas/runtime-7.5.0.json +1215 -0
  123. data/lib/mxrb/compiler/schemas/runtime-9.6.1.29396.json +868 -0
  124. data/lib/mxrb/compiler/schemas/system-model-10.24.0.73019.b64 +1135 -0
  125. data/lib/mxrb/compiler/schemas/system-model-11.12.1.b64 +815 -0
  126. data/lib/mxrb/compiler/schemas/system-model-6.10.8.b64 +497 -0
  127. data/lib/mxrb/compiler/schemas/system-model-7.17.0.b64 +519 -0
  128. data/lib/mxrb/compiler/schemas/system-model-7.5.0.b64 +504 -0
  129. data/lib/mxrb/compiler/schemas/system-model-9.6.1.29396.b64 +816 -0
  130. data/lib/mxrb/compiler/security_materializer.rb +104 -0
  131. data/lib/mxrb/compiler/settings_document_compiler.rb +45 -0
  132. data/lib/mxrb/compiler/settings_materializer.rb +25 -0
  133. data/lib/mxrb/compiler/source_model.rb +128 -0
  134. data/lib/mxrb/compiler/system_model_seed.rb +88 -0
  135. data/lib/mxrb/compiler/system_queue_materializer.rb +54 -0
  136. data/lib/mxrb/compiler/system_text_materializer.rb +49 -0
  137. data/lib/mxrb/compiler/translation_materializer.rb +95 -0
  138. data/lib/mxrb/compiler/web_bundle_builder.rb +155 -0
  139. data/lib/mxrb/compiler/web_list_data_source.rb +139 -0
  140. data/lib/mxrb/compiler/web_operation_compiler.rb +614 -0
  141. data/lib/mxrb/compiler/web_shell_materializer.rb +194 -0
  142. data/lib/mxrb/compiler/widget_package_extractor.rb +63 -0
  143. data/lib/mxrb/doctor.rb +116 -0
  144. data/lib/mxrb/dsl/builder.rb +1636 -0
  145. data/lib/mxrb/errors.rb +18 -0
  146. data/lib/mxrb/evaluation.rb +131 -0
  147. data/lib/mxrb/exporter.rb +1716 -0
  148. data/lib/mxrb/frontend/migrator.rb +775 -0
  149. data/lib/mxrb/functional.rb +307 -0
  150. data/lib/mxrb/github/annotator.rb +161 -0
  151. data/lib/mxrb/initializer.rb +257 -0
  152. data/lib/mxrb/integrity/validator.rb +136 -0
  153. data/lib/mxrb/io/bson_codec.rb +145 -0
  154. data/lib/mxrb/io/mpr_file.rb +558 -0
  155. data/lib/mxrb/io/mxunit_codec.rb +42 -0
  156. data/lib/mxrb/marketplace.rb +380 -0
  157. data/lib/mxrb/model/association.rb +98 -0
  158. data/lib/mxrb/model/attribute.rb +100 -0
  159. data/lib/mxrb/model/connector.rb +17 -0
  160. data/lib/mxrb/model/design_materializer.rb +133 -0
  161. data/lib/mxrb/model/design_migration.rb +126 -0
  162. data/lib/mxrb/model/design_system.rb +111 -0
  163. data/lib/mxrb/model/domain_model.rb +51 -0
  164. data/lib/mxrb/model/entity.rb +180 -0
  165. data/lib/mxrb/model/menu.rb +38 -0
  166. data/lib/mxrb/model/microflow.rb +100 -0
  167. data/lib/mxrb/model/module.rb +142 -0
  168. data/lib/mxrb/model/navigation.rb +127 -0
  169. data/lib/mxrb/model/page.rb +410 -0
  170. data/lib/mxrb/model/project.rb +187 -0
  171. data/lib/mxrb/model/unit.rb +48 -0
  172. data/lib/mxrb/module_initializer.rb +75 -0
  173. data/lib/mxrb/official_marketplace/content_api.rb +292 -0
  174. data/lib/mxrb/official_marketplace/dependency_resolver.rb +329 -0
  175. data/lib/mxrb/official_marketplace/lifecycle.rb +367 -0
  176. data/lib/mxrb/official_marketplace/module_package_importer.rb +318 -0
  177. data/lib/mxrb/official_marketplace/widget_package_installer.rb +414 -0
  178. data/lib/mxrb/official_marketplace.rb +720 -0
  179. data/lib/mxrb/oql/analyzer.rb +155 -0
  180. data/lib/mxrb/oql/index_advisor.rb +85 -0
  181. data/lib/mxrb/oql/plan_analyzer.rb +185 -0
  182. data/lib/mxrb/oql/server.rb +132 -0
  183. data/lib/mxrb/oql/sql_server_plan_analyzer.rb +190 -0
  184. data/lib/mxrb/oql/sql_server_workload_analyzer.rb +80 -0
  185. data/lib/mxrb/oql/workload_analyzer.rb +175 -0
  186. data/lib/mxrb/oql/workload_baseline.rb +60 -0
  187. data/lib/mxrb/oql.rb +424 -0
  188. data/lib/mxrb/project_lifecycle.rb +76 -0
  189. data/lib/mxrb/protocols/plan.rb +86 -0
  190. data/lib/mxrb/protocols.rb +123 -0
  191. data/lib/mxrb/runtime/database_workspace.rb +677 -0
  192. data/lib/mxrb/runtime/docker_executor.rb +41 -0
  193. data/lib/mxrb/runtime/docker_workspace.rb +29 -0
  194. data/lib/mxrb/runtime/executor.rb +169 -0
  195. data/lib/mxrb/runtime/java_locator.rb +26 -0
  196. data/lib/mxrb/runtime/native.rb +474 -0
  197. data/lib/mxrb/runtime/sql_server_database.rb +146 -0
  198. data/lib/mxrb/runtime/toolchain.rb +82 -0
  199. data/lib/mxrb/scaffold/cli.rb +113 -0
  200. data/lib/mxrb/scaffold/generator.rb +246 -0
  201. data/lib/mxrb/scaffold/help.rb +80 -0
  202. data/lib/mxrb/scaffold/page_templates.rb +54 -0
  203. data/lib/mxrb/scaffold/recipes.rb +198 -0
  204. data/lib/mxrb/scaffold/registry.rb +82 -0
  205. data/lib/mxrb/scaffold/templates.rb +723 -0
  206. data/lib/mxrb/scaffold/transaction.rb +84 -0
  207. data/lib/mxrb/schema/tables.rb +55 -0
  208. data/lib/mxrb/semantic/analyzer.rb +473 -0
  209. data/lib/mxrb/semantic/batch_plan.rb +68 -0
  210. data/lib/mxrb/semantic/domain_mutator.rb +419 -0
  211. data/lib/mxrb/semantic/embedder.rb +51 -0
  212. data/lib/mxrb/semantic/extractor.rb +290 -0
  213. data/lib/mxrb/semantic/index.rb +623 -0
  214. data/lib/mxrb/semantic/inliner.rb +216 -0
  215. data/lib/mxrb/semantic/mover.rb +153 -0
  216. data/lib/mxrb/semantic/onnx_embedder.rb +34 -0
  217. data/lib/mxrb/semantic/remover.rb +70 -0
  218. data/lib/mxrb/semantic/renamer.rb +211 -0
  219. data/lib/mxrb/semantic/tfidf_embedder.rb +46 -0
  220. data/lib/mxrb/semantic/vec_store.rb +75 -0
  221. data/lib/mxrb/team_server.rb +390 -0
  222. data/lib/mxrb/templates/project/10.24.0.73019.json +32 -0
  223. data/lib/mxrb/templates/project/11.12.1.json +32 -0
  224. data/lib/mxrb/templates/project/6.10.8.json +50 -0
  225. data/lib/mxrb/templates/project/7.17.0.json +50 -0
  226. data/lib/mxrb/templates/project/7.5.0.json +50 -0
  227. data/lib/mxrb/templates/project/9.6.1.29396.json +50 -0
  228. data/lib/mxrb/version.rb +5 -0
  229. data/lib/mxrb/widget_package.rb +338 -0
  230. data/lib/mxrb/widget_synchronizer.rb +31 -0
  231. data/lib/mxrb/writer.rb +3775 -0
  232. data/lib/mxrb.rb +188 -0
  233. data/marketplace/catalog.json +10 -0
  234. data/marketplace/modules/shared-kernel/domain/README.md +4 -0
  235. data/marketplace/modules/shared-kernel/module.rb +5 -0
  236. data/marketplace/modules/shared-kernel/mxrb-module.json +9 -0
  237. metadata +447 -0
@@ -0,0 +1,186 @@
1
+ # MXRB: Ruby above all
2
+
3
+ [Português](../pt-BR/ruby-first-roadmap.md) · **English** · [Deutsch](../de-DE/ruby-first-roadmap.md)
4
+
5
+ ## Architectural principle
6
+
7
+ Ruby is MXRB's only public language.
8
+
9
+ - Mendix models are read, created, changed and analyzed through Ruby APIs and DSLs.
10
+ - The CLI is a thin layer over those APIs.
11
+ - MXRB will not introduce MDL or a competing parser/language.
12
+ - Structures without a concise high-level API remain losslessly preserved and
13
+ editable through generated `native_unit` Ruby hashes.
14
+ - Studio Pro and MxBuild are important external validators, not dependencies of
15
+ the Ruby core.
16
+
17
+ ## Available capabilities
18
+
19
+ - Deep MPR v1/v2 reading and writing.
20
+ - Export to editable Ruby projects.
21
+ - Generation, integrity validation and structural comparison.
22
+ - Semantic indexing of modules, entities, members and documents.
23
+ - References, callers, callees and transitive impact queries.
24
+ - Safe model-wide rename with preview.
25
+ - Static analysis of cycles, missing targets and module coupling.
26
+ - Typed semantic diff.
27
+ - Search, description and structural tree navigation.
28
+ - Executable Ruby model evaluations with severity and scores.
29
+ - Functional microflow tests without JUnit.
30
+ - Local or Docker execution of `mx check`, portable MxBuild and Runtime.
31
+ - A native coverage gate: 100% lines and 100% branches in CI, with a
32
+ stricter 100/100 local default when thresholds are omitted.
33
+
34
+ ## Semantic API
35
+
36
+ ```ruby
37
+ Mxrb.open("app.mpr") do |project|
38
+ order = project.find_artifact("Sales.Order")
39
+ refs = project.references_to(order)
40
+ callers = project.callers_of("Sales.Recalculate")
41
+ callees = project.callees_of("Sales.Checkout")
42
+ impact = project.impact_of("Sales.Order")
43
+ end
44
+ ```
45
+
46
+ Results are immutable Ruby objects: `Mxrb::Semantic::Artifact`,
47
+ `Mxrb::Semantic::Reference` and `Mxrb::Semantic::Impact`.
48
+
49
+ Writable projects persist a fingerprinted semantic-index cache in the MPR.
50
+ Read-only opens may reuse that cache but never modify the project.
51
+ Use `mxrb cache status`, `warm` and `clear` for metrics and maintenance; writes
52
+ use an upsert before stale-entry cleanup so readers never observe an empty
53
+ replacement window.
54
+
55
+ Exact native Mendix 5 validation remains dependent on Windows/Studio Pro. It
56
+ is documented as a remote legacy limitation and is not a current delivery
57
+ gate.
58
+
59
+ Navigation profiles now read and write native Mendix navigation documents,
60
+ including role homes and recursive menus. Theme and source assets round-trip
61
+ through a checksum manifest; design-system tokens support inventory, lint,
62
+ contrast metrics and preview-first literal migration.
63
+
64
+ ## Safe rename
65
+
66
+ ```ruby
67
+ Mxrb.open("app.mpr", readonly: false) do |project|
68
+ plan = project.plan_rename("Sales.Order", to: "Invoice")
69
+ plan.changes.each { puts _1.inspect }
70
+ plan.apply!
71
+ end
72
+ ```
73
+
74
+ The CLI previews by default; `--apply` is required to write.
75
+
76
+ ## Safe removal
77
+
78
+ Standalone units such as microflows and pages can be inspected before removal:
79
+
80
+ ```ruby
81
+ Mxrb.open("app.mpr", readonly: false) do |project|
82
+ plan = project.plan_remove("Sales.UnusedFlow")
83
+ plan.apply! if plan.safe?
84
+ end
85
+ ```
86
+
87
+ The plan is blocked while incoming references or child units exist. Embedded
88
+ domain-model elements require their typed domain-model mutation instead. The
89
+ CLI follows the same rule: `mxrb remove app.mpr Sales.UnusedFlow` previews and
90
+ `--apply` writes only a safe plan.
91
+
92
+ ## Safe same-module move
93
+
94
+ Standalone units can move to a module or folder without changing their
95
+ qualified name or references:
96
+
97
+ ```ruby
98
+ Mxrb.open("app.mpr", readonly: false) do |project|
99
+ plan = project.plan_move("Sales.Process", to: "Sales.Automation")
100
+ plan.apply!
101
+ end
102
+ ```
103
+
104
+ The plan preserves the native containment type and blocks embedded
105
+ domain-model elements, non-container targets, folder cycles and cross-module
106
+ moves. `mxrb move app.mpr Sales.Process Sales.Automation` previews the exact
107
+ container IDs; `--apply` performs the transaction.
108
+
109
+ ## Static analysis
110
+
111
+ ```ruby
112
+ report = Mxrb.open("app.mpr", &:analyze)
113
+ report.errors.each { warn _1.message }
114
+ report.call_cycles.each { puts _1.artifacts.map(&:qualified_name) }
115
+ ```
116
+
117
+ Absent targets in an existing module are errors. External contracts are
118
+ warnings, and `System.*` references are recognized as platform references.
119
+
120
+ ## Typed diff and navigation
121
+
122
+ ```ruby
123
+ result = Mxrb.diff("before.mpr", "after.mpr")
124
+ result.added.each { puts _1.path }
125
+ project.search_artifacts("checkout", kind: :microflow)
126
+ project.describe_artifact("Sales.Checkout")
127
+ ```
128
+
129
+ CLI equivalents include `diff`, `find`, `describe` and `tree`.
130
+
131
+ ## Model evaluations
132
+
133
+ ```ruby
134
+ result = Mxrb.open("app.mpr") do |project|
135
+ project.evaluate do
136
+ artifact "Sales.Order", kind: :entity
137
+ no_call_cycles
138
+ no_missing_internal_references
139
+ maximum_unreferenced 20, severity: :warning
140
+ end
141
+ end
142
+ ```
143
+
144
+ Evaluation files are ordinary Ruby and run with
145
+ `mxrb evaluate app.mpr evaluation.rb`.
146
+
147
+ ## Official Mendix Marketplace
148
+
149
+ This command family remains separate from `mxrb module`. It integrates the
150
+ documented Marketplace Content API for authenticated search, metadata,
151
+ compatible versions, direct download, private company content, and security
152
+ auditing. GitHub releases and local MPK import remain fallback routes.
153
+
154
+ Local MPKs are imported directly into the target MPR through Ruby/SQLite/BSON,
155
+ including the complete unit tree and declared assets, without Mendix tools.
156
+ The PAT requires `mx:marketplace-content:read`. Official downloads are selected
157
+ against the target MPR version, vulnerable releases are denied by default, and
158
+ Content/Version IDs plus security metadata are written to the lockfile.
159
+ Authenticated Kafka acceptance and transactional lifecycle are now delivered.
160
+ `marketplace update` and `marketplace remove` preview by default, preserve
161
+ externally referenced IDs, reject changed assets, and snapshot MPR,
162
+ `mprcontents`, cache, lock, and assets before explicit `--apply`. Remaining
163
+ authenticated work is also delivered: `marketplace dependencies` recursively
164
+ resolves official packages from references in the embedded MPR, verifies each
165
+ downloaded MPK's actual module identity, recognizes host-owned modules, applies
166
+ leaf-first, and rolls back atomically. Kafka package graphs passed authenticated
167
+ 10.24 and 11.12 acceptance, and imported modules now export to Ruby and rebuild
168
+ with asset checksums and source/rebuild diagnostics preserved.
169
+
170
+ The authenticated matrix now includes DataWidgets 3.11.3 (Content ID 116540,
171
+ Version ID `e7b6d703-8e47-42f4-bb92-934e3601e71b`) and the independent official
172
+ Combo box Widget/clientModule component 219304, version 2.9.0, Version ID
173
+ `dce845f4-d051-4161-847c-016c01703caa`. Combo installation backs up and
174
+ replaces the 2.6.x asset previously owned by Atlas Core (Content ID 117187).
175
+ Ruby round trips preserve Marketplace lock/cache/original provenance, and
176
+ `script/frontend_acceptance` fails on model, asset, checksum, or provenance
177
+ drift. Native renderer coverage for the accepted 10.24 and 11.12 fixtures has
178
+ zero source and rebuilt preflight findings.
179
+
180
+ The migration interface is delivered as `mxrb frontend migrate FILE.mpr`: it
181
+ previews by default and writes a safe transactional plan only with `--apply`.
182
+ That migration track is complete across the supported frontend matrix. The
183
+ optional external MxBuild oracle returns zero errors for source and rebuild on
184
+ 10.24 and 11.12; `mx check` also preserves byte-identical observable package
185
+ diagnostics across each round trip. MXRB remains independent: `mx` and MxBuild
186
+ are validation oracles only, never generators, mutators, or runtime dependencies.
@@ -0,0 +1,57 @@
1
+ # Project scaffolds
2
+
3
+ [Português](../pt-BR/scaffolds.md) · **English** · [Deutsch](../de-DE/scaffolds.md)
4
+
5
+ Every command accepts `--target DIR`, refuses to overwrite files, and wires
6
+ `evaluate`/`evaluate_dir` aggregators automatically. Run
7
+ `mxrb <command> --help` for usage, destination, and options.
8
+
9
+ The available families are project/module (`init`, `module new`), domain
10
+ (`entity`, `enumeration`, `constant`), application (`use-case`, `validation`,
11
+ `query`, `repository`, `scheduled-event`), presentation (`presentation init`,
12
+ `page`, `nanoflow`), security, infrastructure (`integration`, `published-rest`,
13
+ `consumed-rest`, `java-action`), verification (`functional-test`, `evaluation`),
14
+ design, and GitHub CI. `mxrb page new Module.Page` keeps creating a minimal
15
+ page. Adding `--chain` creates an executable vertical slice with a sample
16
+ entity, data-source microflow, editable page, actions, and a Responsive
17
+ navigation item. Three real Mendix action chains are available:
18
+
19
+ ```sh
20
+ mxrb page new App.Order --chain page:microflow
21
+ mxrb page generate App.Order --chain page:nanoflow
22
+ mxrb page g App.Order --chain page:nanoflow:microflow
23
+ ```
24
+
25
+ `page:microflow` calls the Runtime directly; `page:nanoflow` keeps the action
26
+ client-side; and `page:nanoflow:microflow` uses the client flow to orchestrate a
27
+ Runtime call. All modes create `ACT_LoadOrder` for the data source. Chains that
28
+ end in a microflow also create `ACT_RefreshOrder`. `page generate` and `page g`
29
+ are aliases of `page new`. Every generated chain is materialized as a valid MPR
30
+ and checked by compiler preflight.
31
+
32
+ ## Page templates
33
+
34
+ In Mendix, page templates are starting points whose structure becomes a normal,
35
+ editable page. MXRB lists only patterns audited by its compiler and Runtime:
36
+
37
+ ```sh
38
+ mxrb page templates
39
+ mxrb page templates --json
40
+ mxrb page new App.Landing --template starter
41
+ mxrb page new App.Empty --template blank
42
+ mxrb page new App.Operations --template dashboard
43
+ mxrb page new App.Order_NewEdit --template form-vertical
44
+ ```
45
+
46
+ `form-vertical` also creates a sample entity and `ACT_Load...` DataView source.
47
+ Every template can be combined with `--chain`; for example,
48
+ `--template dashboard --chain page:nanoflow` adds a client action to the
49
+ dashboard. These names are stable MXRB contracts inspired by Mendix patterns,
50
+ not a claim that every installed Atlas or Marketplace template is silently
51
+ imported. See the [official pages documentation](https://docs.mendix.com/refguide/pages/).
52
+
53
+ Artifact commands use `new Module.Name`; project commands use `design init` and
54
+ `ci init github`. See the [entity DSL](entity-dsl.md) for all supported entity
55
+ types and associations. Published REST and Java Action create editable Ruby
56
+ adapters; their native document/action must still come from an exported
57
+ baseline or Studio Pro.
@@ -0,0 +1,198 @@
1
+ # Semantic refactoring
2
+
3
+ [Português](../pt-BR/semantic-refactoring.md) · **English** · [Deutsch](../de-DE/semantic-refactoring.md)
4
+
5
+ MXRB renames, removes, moves, extracts and inlines artifacts directly in
6
+ Ruby — no Studio Pro, no MDL. Every operation follows the same
7
+ plan / preview / `apply!` pattern described in
8
+ [architectural patterns](architectural-patterns.md): build a plan, inspect
9
+ its changes, then write inside a transaction.
10
+
11
+ All examples assume a writable project:
12
+
13
+ ```ruby
14
+ Mxrb.open("app.mpr", readonly: false) do |project|
15
+ # plans below
16
+ end
17
+ ```
18
+
19
+ The CLI equivalents preview by default and require `--apply` to write.
20
+
21
+ ## Finding artifacts and references first
22
+
23
+ Refactoring decisions start from the semantic index:
24
+
25
+ ```ruby
26
+ project.find_artifact("Sales.Order", kind: :entity)
27
+ project.search_artifacts("order", kind: :microflow)
28
+ project.semantic_search_artifacts("create a customer order", limit: 5)
29
+ project.references_to("Sales.Order")
30
+ project.references_from("Sales.Order_Overview")
31
+ project.callers_of("Sales.Recalculate")
32
+ project.callees_of("Sales.Checkout")
33
+ project.impact_of("Sales.Order").artifacts
34
+ ```
35
+
36
+ `impact_of` is transitive by default; pass `transitive: false` for direct
37
+ dependents only. CLI: `mxrb find`, `mxrb refs`, `mxrb callers`,
38
+ `mxrb callees`, `mxrb impact`.
39
+
40
+ Semantic search always has a deterministic Ruby backend. Installing the
41
+ optional `sqlite-vec` gem enables a fingerprinted KNN cache inside writable
42
+ MPRs; read-only projects and platforms without the native extension keep the
43
+ same API and rank in memory. The first accelerated call populates the vector
44
+ table before recording its backend, dimension and model fingerprint, so an
45
+ empty or stale index is never treated as ready.
46
+ Use `mxrb find app.mpr "customer order" --semantic` for the legacy adapter.
47
+ The dedicated command also exposes the backend, result limit, and cosine
48
+ distance:
49
+
50
+ ```sh
51
+ bundle exec mxrb search "payment" App.mpr
52
+ bundle exec mxrb search "create order" App.mpr --backend onnx --limit 5
53
+ ```
54
+
55
+ Tabular output contains rank, distance, qualified name, and kind; `--json`
56
+ provides the same fields for automation.
57
+
58
+ For local ONNX development, enable the optional dependency group with
59
+ `BUNDLE_WITH=onnx bundle install`. `backend: :onnx` and the automatic backend
60
+ then use Informers' documented `embedding` pipeline with
61
+ `sentence-transformers/all-MiniLM-L6-v2`. CI sets `MXRB_ONNX=1` in its
62
+ dedicated job and runs a real 384-dimensional model smoke test; ordinary test
63
+ and gem installations do not download the model.
64
+
65
+ The native sqlite-vec smoke test uses its own supported-platform dependency
66
+ file: `BUNDLE_GEMFILE=Gemfile.sqlite-vec bundle install`, followed by
67
+ `MXRB_SQLITE_VEC=1 BUNDLE_GEMFILE=Gemfile.sqlite-vec bundle exec rspec
68
+ spec/semantic_search_spec.rb`. This keeps unsupported architectures out of the
69
+ main lockfile while CI still exercises the actual extension.
70
+
71
+ ## Rename
72
+
73
+ ```ruby
74
+ plan = project.plan_rename("Sales.Order", to: "Invoice")
75
+ plan.changes.each { puts "#{_1.path.join(".")}: #{_1.before} -> #{_1.after}" }
76
+ plan.apply!
77
+ # or in one step: project.rename!("Sales.Order", to: "Invoice")
78
+ ```
79
+
80
+ The plan rewrites the declaration and deep references across the model,
81
+ including Mendix member paths such as `Sales.Order/Number`. It validates name
82
+ rules, qualification depth, collisions and container legality before writing.
83
+
84
+ ```sh
85
+ bundle exec mxrb rename app.mpr Sales.Order Invoice --apply
86
+ ```
87
+
88
+ ## Remove
89
+
90
+ ```ruby
91
+ plan = project.plan_remove("Sales.UnusedFlow")
92
+ plan.apply! if plan.safe?
93
+ ```
94
+
95
+ Removal is blocked while incoming references or child units exist, and a plan
96
+ cannot be applied twice. Embedded domain-model elements (entity, attribute,
97
+ association) are not standalone units — use the typed domain mutations below
98
+ instead.
99
+
100
+ ```sh
101
+ bundle exec mxrb remove app.mpr Sales.UnusedFlow --apply
102
+ ```
103
+
104
+ ## Move
105
+
106
+ ```ruby
107
+ plan = project.plan_move("Sales.Process", to: "Sales.Automation")
108
+ plan.apply!
109
+ ```
110
+
111
+ A same-module move changes the unit's container (module folder) while
112
+ preserving its qualified name, so references stay intact. Folder cycles,
113
+ embedded elements and non-container targets are rejected. Cross-module moves
114
+ compose the move with a rename so calls, security, pages and contracts are
115
+ updated atomically; both directions are validated on MPR v1 and v2.
116
+
117
+ ```sh
118
+ bundle exec mxrb move app.mpr Sales.Process Sales.Automation --apply
119
+ ```
120
+
121
+ ## Extract a submicroflow
122
+
123
+ `plan_extract` lifts a subgraph of activities into a new submicroflow and
124
+ patches the source with a call to it:
125
+
126
+ ```ruby
127
+ plan = project.plan_extract("Sales.CreateOrder",
128
+ as: "Sales.Validate",
129
+ object_ids: [first_activity_id, second_activity_id])
130
+ plan.apply!
131
+ ```
132
+
133
+ Extraction requires the source to be a microflow in the same module, a free
134
+ target name, existing activity IDs that are not start/end events, and exactly
135
+ one entry point and one exit point in the selected subgraph.
136
+
137
+ ## Inline a called microflow
138
+
139
+ `plan_inline` is the inverse: it replaces a `call_microflow` activity with
140
+ the callee's own activities, remapping object UUIDs so nothing collides with
141
+ the caller:
142
+
143
+ ```ruby
144
+ plan = project.plan_inline("Sales.CreateOrder", calling: "Sales.Validate")
145
+ plan.apply!
146
+ ```
147
+
148
+ ## Domain-model mutation
149
+
150
+ Entities and attributes are embedded in the domain model, so they have typed
151
+ mutations of their own:
152
+
153
+ ```ruby
154
+ project.plan_add_entity("Sales", name: "Invoice").apply!
155
+ project.plan_add_attribute("Sales.Invoice", name: "Number", type: :string,
156
+ required: true).apply!
157
+ project.plan_change_attribute("Sales.Invoice.Number", length: 40).apply!
158
+ project.plan_remove_attribute("Sales.Invoice.Number").apply!
159
+ project.plan_remove_entity("Sales.Invoice").apply!
160
+ ```
161
+
162
+ Each has a bang convenience form (`add_entity!`, `add_attribute!`, ...).
163
+
164
+ ## Batch plans
165
+
166
+ Several plans can be previewed and applied as one unit:
167
+
168
+ ```ruby
169
+ batch = project.batch_plan([
170
+ project.plan_rename("Sales.Order", to: "Invoice"),
171
+ project.plan_move("Sales.Process", to: "Sales.Automation")
172
+ ])
173
+ batch.apply!
174
+ ```
175
+
176
+ ## Static analysis alongside refactoring
177
+
178
+ `project.analyze` (aliased as `lint`) reports missing internal references,
179
+ external contracts, call cycles, unreferenced artifacts and module coupling,
180
+ and accepts custom Ruby rules:
181
+
182
+ ```ruby
183
+ report = project.analyze(rules: [my_rule])
184
+ report.errors.each { warn _1.message }
185
+ ```
186
+
187
+ CLI: `mxrb lint app.mpr` and `mxrb report app.mpr`.
188
+
189
+ ## Structural version migration
190
+
191
+ For projects generated by MXRB (which store their architecture definition in
192
+ the MPR), `migrate_to!` re-runs the writer with a different Mendix version so
193
+ every version-specific BSON structure is regenerated correctly. It is
194
+ idempotent and also aliased as `upgrade_to!` / `downgrade_to!`:
195
+
196
+ ```ruby
197
+ project.migrate_to!("11.12.1")
198
+ ```
@@ -0,0 +1,32 @@
1
+ # Team Server
2
+
3
+ MXRB connects directly to official Team Server Git repositories and the App
4
+ Repository API without `mx`, Studio Pro, or the Model SDK:
5
+
6
+ ```sh
7
+ mxrb team-server login --pat-file /secure/team-server.env
8
+ mxrb team-server projects --pat-file /secure/team-server.env
9
+ mxrb team-server clone APP_ID ./app
10
+ mxrb team-server branches APP_ID
11
+ mxrb team-server pull ./app
12
+ ```
13
+
14
+ `projects` paginates the official Projects API and returns every company-owned
15
+ project. Credentials remain scoped to the same HTTPS host; the client upgrades
16
+ the service's advertised HTTP redirect only when it targets that same HSTS host.
17
+
18
+ The recommended mode stores only the absolute PAT file path. Plain text, JSON,
19
+ and `.env` files containing `MXRB_TEAM_SERVER_PAT` are supported. The PAT is
20
+ read only for requests and passed to Git through a temporary `GIT_ASKPASS`
21
+ helper; it is never embedded in URLs, arguments, or `.git/config`.
22
+
23
+ Read requires `mx:modelrepository:repo:read`; push also requires
24
+ `mx:modelrepository:repo:write`. Mendix documents that external clones do not
25
+ receive all Studio Pro post-processing and revision metadata. MXRB validates
26
+ root MPR files after clone and pull, but cannot manufacture Mendix Cloud
27
+ revision metadata.
28
+
29
+ The repository `a9e4af8a-2776-4b10-a471-8c42df8f5f43` was queried through the
30
+ App Repository API and cloned over HTTPS. MXRB validated `MyFirstModule.mpr`,
31
+ detected `main`, and confirmed that the remote URL contained no PAT. The
32
+ temporary acceptance credential file was destroyed afterwards.