artheia 0.1.0__tar.gz

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 (140) hide show
  1. artheia-0.1.0/LICENSE +202 -0
  2. artheia-0.1.0/PKG-INFO +150 -0
  3. artheia-0.1.0/README.md +120 -0
  4. artheia-0.1.0/artheia/__init__.py +1 -0
  5. artheia-0.1.0/artheia/adapters/__init__.py +0 -0
  6. artheia-0.1.0/artheia/adapters/mcp_server.py +292 -0
  7. artheia-0.1.0/artheia/cli.py +2411 -0
  8. artheia-0.1.0/artheia/gen_server/__init__.py +1 -0
  9. artheia-0.1.0/artheia/gen_server/probe/__init__.py +21 -0
  10. artheia-0.1.0/artheia/gen_server/probe/codec.py +177 -0
  11. artheia-0.1.0/artheia/gen_server/probe/context.py +320 -0
  12. artheia-0.1.0/artheia/gen_server/probe/node.py +336 -0
  13. artheia-0.1.0/artheia/gen_server/probe/transport.py +190 -0
  14. artheia-0.1.0/artheia/gen_server/probe/wire.py +86 -0
  15. artheia-0.1.0/artheia/generators/__init__.py +9 -0
  16. artheia-0.1.0/artheia/generators/app_dispatch.py +509 -0
  17. artheia-0.1.0/artheia/generators/autosar_system.py +196 -0
  18. artheia-0.1.0/artheia/generators/can_to_nanopb.py +262 -0
  19. artheia-0.1.0/artheia/generators/codec_dispatch.py +306 -0
  20. artheia-0.1.0/artheia/generators/config_defaults.py +75 -0
  21. artheia-0.1.0/artheia/generators/config_schema.py +154 -0
  22. artheia-0.1.0/artheia/generators/dist_manifest.py +321 -0
  23. artheia-0.1.0/artheia/generators/etcd_schema.py +71 -0
  24. artheia-0.1.0/artheia/generators/fc_app.py +972 -0
  25. artheia-0.1.0/artheia/generators/fibex_to_nanopb.py +433 -0
  26. artheia-0.1.0/artheia/generators/gw_types.py +134 -0
  27. artheia-0.1.0/artheia/generators/lib_app.py +492 -0
  28. artheia-0.1.0/artheia/generators/manifest_proto.py +588 -0
  29. artheia-0.1.0/artheia/generators/migration_diff.py +209 -0
  30. artheia-0.1.0/artheia/generators/netgraph.py +540 -0
  31. artheia-0.1.0/artheia/generators/params_config.py +84 -0
  32. artheia-0.1.0/artheia/generators/platform_protos.py +1107 -0
  33. artheia-0.1.0/artheia/generators/proto.py +254 -0
  34. artheia-0.1.0/artheia/generators/proto_package.py +344 -0
  35. artheia-0.1.0/artheia/generators/psp_netgraph.py +119 -0
  36. artheia-0.1.0/artheia/generators/psp_registry.py +46 -0
  37. artheia-0.1.0/artheia/generators/rig.py +441 -0
  38. artheia-0.1.0/artheia/generators/rig_combine.py +187 -0
  39. artheia-0.1.0/artheia/generators/routing.py +182 -0
  40. artheia-0.1.0/artheia/generators/signal_filter.py +476 -0
  41. artheia-0.1.0/artheia/generators/signal_filter_csv.py +118 -0
  42. artheia-0.1.0/artheia/generators/templates/CMakeLists.j2 +53 -0
  43. artheia-0.1.0/artheia/generators/templates/can_CMakeLists.j2 +26 -0
  44. artheia-0.1.0/artheia/generators/templates/can_decode.c.j2 +51 -0
  45. artheia-0.1.0/artheia/generators/templates/can_dispatch_table.c.j2 +22 -0
  46. artheia-0.1.0/artheia/generators/templates/can_dispatch_table.h.j2 +25 -0
  47. artheia-0.1.0/artheia/generators/templates/can_encode.c.j2 +45 -0
  48. artheia-0.1.0/artheia/generators/templates/can_ns_wrapper.h.j2 +12 -0
  49. artheia-0.1.0/artheia/generators/templates/can_proto.j2 +12 -0
  50. artheia-0.1.0/artheia/generators/templates/dispatch_table.c.j2 +21 -0
  51. artheia-0.1.0/artheia/generators/templates/dispatch_table.h.j2 +19 -0
  52. artheia-0.1.0/artheia/generators/templates/enum.proto.j2 +11 -0
  53. artheia-0.1.0/artheia/generators/templates/fc_app/BUILD.impl.bazel.j2 +45 -0
  54. artheia-0.1.0/artheia/generators/templates/fc_app/BUILD.lib.bazel.j2 +39 -0
  55. artheia-0.1.0/artheia/generators/templates/fc_app/BUILD.main.bazel.j2 +29 -0
  56. artheia-0.1.0/artheia/generators/templates/fc_app/Codecs.hh.j2 +58 -0
  57. artheia-0.1.0/artheia/generators/templates/fc_app/Daemon.hh.j2 +248 -0
  58. artheia-0.1.0/artheia/generators/templates/fc_app/Daemon.runnable.hh.j2 +48 -0
  59. artheia-0.1.0/artheia/generators/templates/fc_app/Daemon.statem.hh.j2 +341 -0
  60. artheia-0.1.0/artheia/generators/templates/fc_app/Log.hh.j2 +56 -0
  61. artheia-0.1.0/artheia/generators/templates/fc_app/Netgraph.hh.j2 +71 -0
  62. artheia-0.1.0/artheia/generators/templates/fc_app/handlers.cc.j2 +58 -0
  63. artheia-0.1.0/artheia/generators/templates/fc_app/handlers.runnable.cc.j2 +55 -0
  64. artheia-0.1.0/artheia/generators/templates/fc_app/handlers.statem.cc.j2 +63 -0
  65. artheia-0.1.0/artheia/generators/templates/fc_app/main.cc.j2 +212 -0
  66. artheia-0.1.0/artheia/generators/templates/fc_app/main.statem.cc.j2 +175 -0
  67. artheia-0.1.0/artheia/generators/templates/fc_app/state.hh.j2 +22 -0
  68. artheia-0.1.0/artheia/generators/templates/fr_decode.c.j2 +51 -0
  69. artheia-0.1.0/artheia/generators/templates/hercules_filter.h.j2 +17 -0
  70. artheia-0.1.0/artheia/generators/templates/hercules_filter_json.j2 +11 -0
  71. artheia-0.1.0/artheia/generators/templates/message.proto.j2 +17 -0
  72. artheia-0.1.0/artheia/generators/templates/ns_wrapper.h.j2 +12 -0
  73. artheia-0.1.0/artheia/generators/templates/pdu_encode.c.j2 +46 -0
  74. artheia-0.1.0/artheia/generators/templates/proto.j2 +12 -0
  75. artheia-0.1.0/artheia/generators/templates/psp_can_registry.c.j2 +33 -0
  76. artheia-0.1.0/artheia/generators/templates/psp_can_registry.h.j2 +24 -0
  77. artheia-0.1.0/artheia/generators/templates/statem_base.hh.j2 +95 -0
  78. artheia-0.1.0/artheia/generators/templates/stub.cpp.h.j2 +83 -0
  79. artheia-0.1.0/artheia/generators/transform_codegen.py +303 -0
  80. artheia-0.1.0/artheia/grammar/__init__.py +3 -0
  81. artheia-0.1.0/artheia/grammar/artheia.tx +560 -0
  82. artheia-0.1.0/artheia/importers/__init__.py +10 -0
  83. artheia-0.1.0/artheia/importers/_asam_cmp_parser.py +591 -0
  84. artheia-0.1.0/artheia/importers/autosar.py +406 -0
  85. artheia-0.1.0/artheia/importers/fusee.py +1222 -0
  86. artheia-0.1.0/artheia/lsp/__init__.py +10 -0
  87. artheia-0.1.0/artheia/lsp/server.py +599 -0
  88. artheia-0.1.0/artheia/manifest/__init__.py +118 -0
  89. artheia-0.1.0/artheia/manifest/application.py +254 -0
  90. artheia-0.1.0/artheia/manifest/cluster.py +179 -0
  91. artheia-0.1.0/artheia/manifest/clusters.py +48 -0
  92. artheia-0.1.0/artheia/manifest/execution.py +397 -0
  93. artheia-0.1.0/artheia/manifest/layer.py +233 -0
  94. artheia-0.1.0/artheia/manifest/loader.py +208 -0
  95. artheia-0.1.0/artheia/manifest/machine.py +400 -0
  96. artheia-0.1.0/artheia/manifest/platform.py +98 -0
  97. artheia-0.1.0/artheia/manifest/rig.py +252 -0
  98. artheia-0.1.0/artheia/manifest/service.py +230 -0
  99. artheia-0.1.0/artheia/manifest/statem.py +269 -0
  100. artheia-0.1.0/artheia/manifest/supervisor.py +834 -0
  101. artheia-0.1.0/artheia/manifest/transform.py +748 -0
  102. artheia-0.1.0/artheia/manifest/utils.py +251 -0
  103. artheia-0.1.0/artheia/model/__init__.py +18 -0
  104. artheia-0.1.0/artheia/model/bus_catalog.py +99 -0
  105. artheia-0.1.0/artheia/model/flatten.py +76 -0
  106. artheia-0.1.0/artheia/model/inherit.py +188 -0
  107. artheia-0.1.0/artheia/model/loader.py +277 -0
  108. artheia-0.1.0/artheia/model/scope.py +476 -0
  109. artheia-0.1.0/artheia/model/validators.py +435 -0
  110. artheia-0.1.0/artheia/observer/__init__.py +9 -0
  111. artheia-0.1.0/artheia/observer/observer.py +271 -0
  112. artheia-0.1.0/artheia.egg-info/PKG-INFO +150 -0
  113. artheia-0.1.0/artheia.egg-info/SOURCES.txt +138 -0
  114. artheia-0.1.0/artheia.egg-info/dependency_links.txt +1 -0
  115. artheia-0.1.0/artheia.egg-info/entry_points.txt +4 -0
  116. artheia-0.1.0/artheia.egg-info/requires.txt +12 -0
  117. artheia-0.1.0/artheia.egg-info/top_level.txt +1 -0
  118. artheia-0.1.0/pyproject.toml +56 -0
  119. artheia-0.1.0/setup.cfg +4 -0
  120. artheia-0.1.0/tests/test_audit_manifest.py +82 -0
  121. artheia-0.1.0/tests/test_autosar.py +215 -0
  122. artheia-0.1.0/tests/test_bus_catalog.py +72 -0
  123. artheia-0.1.0/tests/test_config_defaults.py +88 -0
  124. artheia-0.1.0/tests/test_dist_manifest.py +130 -0
  125. artheia-0.1.0/tests/test_fusee.py +82 -0
  126. artheia-0.1.0/tests/test_gen_rig.py +151 -0
  127. artheia-0.1.0/tests/test_generators.py +434 -0
  128. artheia-0.1.0/tests/test_grammar.py +521 -0
  129. artheia-0.1.0/tests/test_lsp.py +101 -0
  130. artheia-0.1.0/tests/test_lsp_protocol.py +330 -0
  131. artheia-0.1.0/tests/test_migration_diff.py +147 -0
  132. artheia-0.1.0/tests/test_netgraph_recursive.py +270 -0
  133. artheia-0.1.0/tests/test_node_inherit.py +182 -0
  134. artheia-0.1.0/tests/test_node_reporting.py +122 -0
  135. artheia-0.1.0/tests/test_node_trace_ctl.py +146 -0
  136. artheia-0.1.0/tests/test_probe_transport.py +123 -0
  137. artheia-0.1.0/tests/test_statem.py +329 -0
  138. artheia-0.1.0/tests/test_supervisor_nodes_metadata.py +184 -0
  139. artheia-0.1.0/tests/test_supervisor_slice.py +237 -0
  140. artheia-0.1.0/tests/test_transform.py +508 -0
artheia-0.1.0/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
artheia-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,150 @@
1
+ Metadata-Version: 2.4
2
+ Name: artheia
3
+ Version: 0.1.0
4
+ Summary: Host-side DSL for Adaptive-AUTOSAR-style nodes that talk to Classical AUTOSAR via the Theia CAN/FR gateway. Inspired by ARText.
5
+ Author: Theia
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/perotheia/artheia
8
+ Project-URL: Repository, https://github.com/perotheia/artheia
9
+ Keywords: autosar,dsl,code-generation,textx,lsp,tipc
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Software Development :: Code Generators
15
+ Classifier: Topic :: System :: Distributed Computing
16
+ Requires-Python: >=3.10
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: textX>=4.0
20
+ Requires-Dist: Jinja2>=3.1
21
+ Requires-Dist: click>=8.1
22
+ Requires-Dist: PyYAML>=6.0
23
+ Requires-Dist: fastmcp>=2.0
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest>=7; extra == "dev"
26
+ Requires-Dist: pytest-snapshot>=0.9; extra == "dev"
27
+ Provides-Extra: lsp
28
+ Requires-Dist: pygls>=1.3; extra == "lsp"
29
+ Dynamic: license-file
30
+
31
+ # artheia
32
+
33
+ A host-side DSL for modeling **Adaptive-AUTOSAR-style** components — atomic
34
+ nodes with explicit TIPC addresses and typed ports, wired into compositions and
35
+ clusters — plus the code generators that turn an `.art` model into C++
36
+ scaffolds, `.proto` wire types, deploy manifests, and netgraphs for the
37
+ **Theia** runtime.
38
+
39
+ Inspired by ARText (the syntax aesthetic + the structural concepts: atomic
40
+ components, ports, prototypes, compositions, connectors), but its own thing —
41
+ not AUTOSAR-tool-compatible.
42
+
43
+ ## Install
44
+
45
+ ```sh
46
+ pip install -e . # or: pip install --find-links /opt/theia/wheels artheia
47
+ ```
48
+
49
+ Gives you the `artheia` CLI, the `artheia-lsp` language server (for the editor
50
+ integrations), and `artheia-mcp` (the generator surface as an MCP server).
51
+
52
+ ## The grammar in one breath
53
+
54
+ Three primitives, bottom to top:
55
+
56
+ | Primitive | Is a | Owns |
57
+ | --- | --- | --- |
58
+ | **node** | thread | one TIPC `type/instance`, typed ports, a behavior class |
59
+ | **composition** | process (one executable) | node *prototypes* + in-process wiring (`connect`) |
60
+ | **cluster** | distribution bundle | compositions + inter-process wiring; the deploy unit |
61
+
62
+ Around them: `message`/`enum` (proto3-equivalent data), `interface`
63
+ (`senderReceiver` for streams, `clientServer` for request/reply), and `import`
64
+ across packages.
65
+
66
+ ## Example
67
+
68
+ ```art
69
+ package system.demo
70
+
71
+ // --- data ----------------------------------------------------------------
72
+ enum Mode { IDLE = 0 RUN = 1 }
73
+
74
+ message Tick { uint32 seq }
75
+ message SetMode { Mode mode }
76
+
77
+ // --- contracts -----------------------------------------------------------
78
+ interface senderReceiver TickStream { } // a stream of Tick
79
+ interface clientServer ModeCtl {
80
+ operation Set(in r:SetMode) returns Tick
81
+ }
82
+
83
+ // --- a node: one thread, one TIPC endpoint -------------------------------
84
+ node atomic Counter {
85
+ tipc type=0x80020001 instance=0
86
+ ports {
87
+ receiver ticks_in requires TickStream // inbound stream
88
+ server ctl provides ModeCtl // request/reply surface
89
+ }
90
+ }
91
+
92
+ node atomic Driver {
93
+ tipc type=0x80020002 instance=0
94
+ ports {
95
+ sender ticks_out provides TickStream
96
+ client mode_call requires ModeCtl
97
+ }
98
+ }
99
+
100
+ // --- a composition: the process, wiring prototypes together --------------
101
+ composition DemoProc {
102
+ prototype Counter counter
103
+ prototype Driver driver
104
+
105
+ connect driver.ticks_out to counter.ticks_in
106
+ connect driver.mode_call to counter.ctl
107
+ }
108
+
109
+ // --- a cluster: the deploy/package unit ----------------------------------
110
+ cluster Demo {
111
+ composition DemoProc proc
112
+ }
113
+ ```
114
+
115
+ ## What you do with a model
116
+
117
+ ```sh
118
+ artheia parse system/system.art # resolve + validate the tree
119
+ artheia check-addresses system/system.art # assert TIPC addresses unique
120
+ artheia gen-app --kind fc <component>.art --out apps # C++ scaffold (lib/main/impl)
121
+ artheia gen-proto <component>.art --out platform/proto
122
+ artheia gen-netgraph <component>.art --out netgraph.json
123
+ artheia gen-manifest <component>.art manifest/app.py # deploy manifest module
124
+ ```
125
+
126
+ Run `artheia --help` for the full command set (~30 generators incl. DBC/FIBEX
127
+ import, config-schema migration, and the rig/manifest pipeline). The `gen_server`
128
+ shape follows OTP — `handle_call` / `handle_cast` / `handle_info` per node.
129
+
130
+ ## Editor support
131
+
132
+ `.art` files get highlighting + LSP (diagnostics, goto-definition, completion)
133
+ in VS Code and Emacs via the `artheia-lsp` server — see the umbrella repo's
134
+ `contrib/editors/`.
135
+
136
+ ## Layout
137
+
138
+ ```
139
+ artheia/
140
+ grammar/*.tx textX grammar
141
+ model/ name resolution + validators
142
+ generators/ the gen-* code generators + Jinja2 templates
143
+ lsp/ the artheia-lsp language server (pygls)
144
+ adapters/ the artheia-mcp server (FastMCP)
145
+ cli.py the `artheia` CLI (Click)
146
+ ```
147
+
148
+ ## License
149
+
150
+ Apache-2.0 — see [LICENSE](LICENSE).
@@ -0,0 +1,120 @@
1
+ # artheia
2
+
3
+ A host-side DSL for modeling **Adaptive-AUTOSAR-style** components — atomic
4
+ nodes with explicit TIPC addresses and typed ports, wired into compositions and
5
+ clusters — plus the code generators that turn an `.art` model into C++
6
+ scaffolds, `.proto` wire types, deploy manifests, and netgraphs for the
7
+ **Theia** runtime.
8
+
9
+ Inspired by ARText (the syntax aesthetic + the structural concepts: atomic
10
+ components, ports, prototypes, compositions, connectors), but its own thing —
11
+ not AUTOSAR-tool-compatible.
12
+
13
+ ## Install
14
+
15
+ ```sh
16
+ pip install -e . # or: pip install --find-links /opt/theia/wheels artheia
17
+ ```
18
+
19
+ Gives you the `artheia` CLI, the `artheia-lsp` language server (for the editor
20
+ integrations), and `artheia-mcp` (the generator surface as an MCP server).
21
+
22
+ ## The grammar in one breath
23
+
24
+ Three primitives, bottom to top:
25
+
26
+ | Primitive | Is a | Owns |
27
+ | --- | --- | --- |
28
+ | **node** | thread | one TIPC `type/instance`, typed ports, a behavior class |
29
+ | **composition** | process (one executable) | node *prototypes* + in-process wiring (`connect`) |
30
+ | **cluster** | distribution bundle | compositions + inter-process wiring; the deploy unit |
31
+
32
+ Around them: `message`/`enum` (proto3-equivalent data), `interface`
33
+ (`senderReceiver` for streams, `clientServer` for request/reply), and `import`
34
+ across packages.
35
+
36
+ ## Example
37
+
38
+ ```art
39
+ package system.demo
40
+
41
+ // --- data ----------------------------------------------------------------
42
+ enum Mode { IDLE = 0 RUN = 1 }
43
+
44
+ message Tick { uint32 seq }
45
+ message SetMode { Mode mode }
46
+
47
+ // --- contracts -----------------------------------------------------------
48
+ interface senderReceiver TickStream { } // a stream of Tick
49
+ interface clientServer ModeCtl {
50
+ operation Set(in r:SetMode) returns Tick
51
+ }
52
+
53
+ // --- a node: one thread, one TIPC endpoint -------------------------------
54
+ node atomic Counter {
55
+ tipc type=0x80020001 instance=0
56
+ ports {
57
+ receiver ticks_in requires TickStream // inbound stream
58
+ server ctl provides ModeCtl // request/reply surface
59
+ }
60
+ }
61
+
62
+ node atomic Driver {
63
+ tipc type=0x80020002 instance=0
64
+ ports {
65
+ sender ticks_out provides TickStream
66
+ client mode_call requires ModeCtl
67
+ }
68
+ }
69
+
70
+ // --- a composition: the process, wiring prototypes together --------------
71
+ composition DemoProc {
72
+ prototype Counter counter
73
+ prototype Driver driver
74
+
75
+ connect driver.ticks_out to counter.ticks_in
76
+ connect driver.mode_call to counter.ctl
77
+ }
78
+
79
+ // --- a cluster: the deploy/package unit ----------------------------------
80
+ cluster Demo {
81
+ composition DemoProc proc
82
+ }
83
+ ```
84
+
85
+ ## What you do with a model
86
+
87
+ ```sh
88
+ artheia parse system/system.art # resolve + validate the tree
89
+ artheia check-addresses system/system.art # assert TIPC addresses unique
90
+ artheia gen-app --kind fc <component>.art --out apps # C++ scaffold (lib/main/impl)
91
+ artheia gen-proto <component>.art --out platform/proto
92
+ artheia gen-netgraph <component>.art --out netgraph.json
93
+ artheia gen-manifest <component>.art manifest/app.py # deploy manifest module
94
+ ```
95
+
96
+ Run `artheia --help` for the full command set (~30 generators incl. DBC/FIBEX
97
+ import, config-schema migration, and the rig/manifest pipeline). The `gen_server`
98
+ shape follows OTP — `handle_call` / `handle_cast` / `handle_info` per node.
99
+
100
+ ## Editor support
101
+
102
+ `.art` files get highlighting + LSP (diagnostics, goto-definition, completion)
103
+ in VS Code and Emacs via the `artheia-lsp` server — see the umbrella repo's
104
+ `contrib/editors/`.
105
+
106
+ ## Layout
107
+
108
+ ```
109
+ artheia/
110
+ grammar/*.tx textX grammar
111
+ model/ name resolution + validators
112
+ generators/ the gen-* code generators + Jinja2 templates
113
+ lsp/ the artheia-lsp language server (pygls)
114
+ adapters/ the artheia-mcp server (FastMCP)
115
+ cli.py the `artheia` CLI (Click)
116
+ ```
117
+
118
+ ## License
119
+
120
+ Apache-2.0 — see [LICENSE](LICENSE).
@@ -0,0 +1 @@
1
+ __version__ = "0.0.1"
File without changes