syntaxmatrix-core 1.0.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 (99) hide show
  1. syntaxmatrix_core-1.0.0/MANIFEST.in +14 -0
  2. syntaxmatrix_core-1.0.0/PKG-INFO +218 -0
  3. syntaxmatrix_core-1.0.0/README.md +165 -0
  4. syntaxmatrix_core-1.0.0/pyproject.toml +4 -0
  5. syntaxmatrix_core-1.0.0/setup.cfg +4 -0
  6. syntaxmatrix_core-1.0.0/setup.py +71 -0
  7. syntaxmatrix_core-1.0.0/syntaxmatrix/__init__.py +66 -0
  8. syntaxmatrix_core-1.0.0/syntaxmatrix/agentic/__init__.py +0 -0
  9. syntaxmatrix_core-1.0.0/syntaxmatrix/agentic/agent_tools.py +24 -0
  10. syntaxmatrix_core-1.0.0/syntaxmatrix/agentic/agents.py +2484 -0
  11. syntaxmatrix_core-1.0.0/syntaxmatrix/agentic/agents_orchestrer.py +332 -0
  12. syntaxmatrix_core-1.0.0/syntaxmatrix/agentic/code_tools_registry.py +32 -0
  13. syntaxmatrix_core-1.0.0/syntaxmatrix/agentic/model_templates.py +1790 -0
  14. syntaxmatrix_core-1.0.0/syntaxmatrix/auth.py +568 -0
  15. syntaxmatrix_core-1.0.0/syntaxmatrix/bootstrap.py +27 -0
  16. syntaxmatrix_core-1.0.0/syntaxmatrix/client_docs.py +237 -0
  17. syntaxmatrix_core-1.0.0/syntaxmatrix/commentary.py +399 -0
  18. syntaxmatrix_core-1.0.0/syntaxmatrix/core.py +1620 -0
  19. syntaxmatrix_core-1.0.0/syntaxmatrix/dataset_preprocessing.py +218 -0
  20. syntaxmatrix_core-1.0.0/syntaxmatrix/db.py +686 -0
  21. syntaxmatrix_core-1.0.0/syntaxmatrix/db_backends/__init__.py +1 -0
  22. syntaxmatrix_core-1.0.0/syntaxmatrix/db_backends/postgres_backend.py +14 -0
  23. syntaxmatrix_core-1.0.0/syntaxmatrix/db_backends/sqlite_backend.py +258 -0
  24. syntaxmatrix_core-1.0.0/syntaxmatrix/db_contract.py +71 -0
  25. syntaxmatrix_core-1.0.0/syntaxmatrix/display_html.py +102 -0
  26. syntaxmatrix_core-1.0.0/syntaxmatrix/emailer.py +26 -0
  27. syntaxmatrix_core-1.0.0/syntaxmatrix/file_processor.py +92 -0
  28. syntaxmatrix_core-1.0.0/syntaxmatrix/gpt_models_latest.py +46 -0
  29. syntaxmatrix_core-1.0.0/syntaxmatrix/history_store.py +189 -0
  30. syntaxmatrix_core-1.0.0/syntaxmatrix/kernel_manager.py +307 -0
  31. syntaxmatrix_core-1.0.0/syntaxmatrix/llm_store.py +255 -0
  32. syntaxmatrix_core-1.0.0/syntaxmatrix/media/__init__.py +0 -0
  33. syntaxmatrix_core-1.0.0/syntaxmatrix/media/media_pixabay.py +277 -0
  34. syntaxmatrix_core-1.0.0/syntaxmatrix/models.py +14 -0
  35. syntaxmatrix_core-1.0.0/syntaxmatrix/page_builder_defaults.py +183 -0
  36. syntaxmatrix_core-1.0.0/syntaxmatrix/page_builder_generation.py +1788 -0
  37. syntaxmatrix_core-1.0.0/syntaxmatrix/page_layout_contract.py +666 -0
  38. syntaxmatrix_core-1.0.0/syntaxmatrix/page_patch_publish.py +1835 -0
  39. syntaxmatrix_core-1.0.0/syntaxmatrix/plottings.py +173 -0
  40. syntaxmatrix_core-1.0.0/syntaxmatrix/plugin_manager.py +114 -0
  41. syntaxmatrix_core-1.0.0/syntaxmatrix/preface.py +670 -0
  42. syntaxmatrix_core-1.0.0/syntaxmatrix/premium/__init__.py +10 -0
  43. syntaxmatrix_core-1.0.0/syntaxmatrix/premium/gate.py +107 -0
  44. syntaxmatrix_core-1.0.0/syntaxmatrix/profiles.py +92 -0
  45. syntaxmatrix_core-1.0.0/syntaxmatrix/project_root.py +73 -0
  46. syntaxmatrix_core-1.0.0/syntaxmatrix/routes.py +9267 -0
  47. syntaxmatrix_core-1.0.0/syntaxmatrix/selftest_page_templates.py +360 -0
  48. syntaxmatrix_core-1.0.0/syntaxmatrix/session.py +19 -0
  49. syntaxmatrix_core-1.0.0/syntaxmatrix/settings/__init__.py +0 -0
  50. syntaxmatrix_core-1.0.0/syntaxmatrix/settings/client_items.py +28 -0
  51. syntaxmatrix_core-1.0.0/syntaxmatrix/settings/logging.py +40 -0
  52. syntaxmatrix_core-1.0.0/syntaxmatrix/settings/model_map.py +1182 -0
  53. syntaxmatrix_core-1.0.0/syntaxmatrix/settings/prompts.py +1758 -0
  54. syntaxmatrix_core-1.0.0/syntaxmatrix/settings/string_navbar.py +5 -0
  55. syntaxmatrix_core-1.0.0/syntaxmatrix/smiv.py +45 -0
  56. syntaxmatrix_core-1.0.0/syntaxmatrix/smpv.py +121 -0
  57. syntaxmatrix_core-1.0.0/syntaxmatrix/static/assets/hero-default.svg +22 -0
  58. syntaxmatrix_core-1.0.0/syntaxmatrix/static/css/style.css +35 -0
  59. syntaxmatrix_core-1.0.0/syntaxmatrix/static/docs.md +272 -0
  60. syntaxmatrix_core-1.0.0/syntaxmatrix/static/icons/bot_icon.png +0 -0
  61. syntaxmatrix_core-1.0.0/syntaxmatrix/static/icons/favicon.png +0 -0
  62. syntaxmatrix_core-1.0.0/syntaxmatrix/static/icons/logo.png +0 -0
  63. syntaxmatrix_core-1.0.0/syntaxmatrix/static/icons/logo2.png +0 -0
  64. syntaxmatrix_core-1.0.0/syntaxmatrix/static/icons/svg_497526.svg +6 -0
  65. syntaxmatrix_core-1.0.0/syntaxmatrix/static/icons/svg_497528.svg +6 -0
  66. syntaxmatrix_core-1.0.0/syntaxmatrix/static/js/chat.js +0 -0
  67. syntaxmatrix_core-1.0.0/syntaxmatrix/static/js/sidebar.js +207 -0
  68. syntaxmatrix_core-1.0.0/syntaxmatrix/static/js/widgets.js +0 -0
  69. syntaxmatrix_core-1.0.0/syntaxmatrix/templates/admin_billing.html +408 -0
  70. syntaxmatrix_core-1.0.0/syntaxmatrix/templates/admin_branding.html +215 -0
  71. syntaxmatrix_core-1.0.0/syntaxmatrix/templates/admin_features.html +117 -0
  72. syntaxmatrix_core-1.0.0/syntaxmatrix/templates/admin_secretes.html +108 -0
  73. syntaxmatrix_core-1.0.0/syntaxmatrix/templates/change_password.html +124 -0
  74. syntaxmatrix_core-1.0.0/syntaxmatrix/templates/code_cell.html +9 -0
  75. syntaxmatrix_core-1.0.0/syntaxmatrix/templates/dashboard.html +1293 -0
  76. syntaxmatrix_core-1.0.0/syntaxmatrix/templates/dataset_resize.html +535 -0
  77. syntaxmatrix_core-1.0.0/syntaxmatrix/templates/docs.html +71 -0
  78. syntaxmatrix_core-1.0.0/syntaxmatrix/templates/edit_page.html +2716 -0
  79. syntaxmatrix_core-1.0.0/syntaxmatrix/templates/error.html +131 -0
  80. syntaxmatrix_core-1.0.0/syntaxmatrix/templates/login.html +101 -0
  81. syntaxmatrix_core-1.0.0/syntaxmatrix/templates/register.html +103 -0
  82. syntaxmatrix_core-1.0.0/syntaxmatrix/themes.py +112 -0
  83. syntaxmatrix_core-1.0.0/syntaxmatrix/ui_modes.py +14 -0
  84. syntaxmatrix_core-1.0.0/syntaxmatrix/utils.py +3056 -0
  85. syntaxmatrix_core-1.0.0/syntaxmatrix/vector_db.py +202 -0
  86. syntaxmatrix_core-1.0.0/syntaxmatrix/vectordb/__init__.py +16 -0
  87. syntaxmatrix_core-1.0.0/syntaxmatrix/vectordb/adapters/__init__.py +0 -0
  88. syntaxmatrix_core-1.0.0/syntaxmatrix/vectordb/adapters/milvus_adapter.py +0 -0
  89. syntaxmatrix_core-1.0.0/syntaxmatrix/vectordb/adapters/pgvector_adapter.py +0 -0
  90. syntaxmatrix_core-1.0.0/syntaxmatrix/vectordb/adapters/sqlite_adapter.py +170 -0
  91. syntaxmatrix_core-1.0.0/syntaxmatrix/vectordb/base.py +116 -0
  92. syntaxmatrix_core-1.0.0/syntaxmatrix/vectordb/registry.py +161 -0
  93. syntaxmatrix_core-1.0.0/syntaxmatrix/vectorizer.py +47 -0
  94. syntaxmatrix_core-1.0.0/syntaxmatrix/workspace_db.py +77 -0
  95. syntaxmatrix_core-1.0.0/syntaxmatrix_core.egg-info/PKG-INFO +218 -0
  96. syntaxmatrix_core-1.0.0/syntaxmatrix_core.egg-info/SOURCES.txt +97 -0
  97. syntaxmatrix_core-1.0.0/syntaxmatrix_core.egg-info/dependency_links.txt +1 -0
  98. syntaxmatrix_core-1.0.0/syntaxmatrix_core.egg-info/requires.txt +33 -0
  99. syntaxmatrix_core-1.0.0/syntaxmatrix_core.egg-info/top_level.txt +1 -0
@@ -0,0 +1,14 @@
1
+ prune admin_tools
2
+ prune tools
3
+ prune build
4
+ prune dist
5
+
6
+ global-exclude *.py[cod]
7
+ global-exclude __pycache__
8
+ global-exclude .DS_Store
9
+
10
+
11
+ prune admin_tools
12
+ prune tools
13
+ prune build
14
+ prune dist
@@ -0,0 +1,218 @@
1
+ Metadata-Version: 2.4
2
+ Name: syntaxmatrix-core
3
+ Version: 1.0.0
4
+ Summary: SyntaxMatrix: A Framework for building owned AI Platform.
5
+ Author: Bob Nti
6
+ Author-email: info@syntaxmatrix.net
7
+ License: MIT
8
+ Classifier: Operating System :: OS Independent
9
+ Requires-Python: >=3.9
10
+ Description-Content-Type: text/markdown
11
+ Requires-Dist: Flask>=3.0.3
12
+ Requires-Dist: requests>=2.32.3
13
+ Requires-Dist: pytz<2026,>=2025.2
14
+ Requires-Dist: Markdown>=3.7
15
+ Requires-Dist: pypdf>=5.4.0
16
+ Requires-Dist: PyPDF2==3.0.1
17
+ Requires-Dist: nest-asyncio>=1.6.0
18
+ Requires-Dist: python-dotenv>=1.1.0
19
+ Requires-Dist: openai>=1.84.0
20
+ Requires-Dist: google-genai>=1.19.0
21
+ Requires-Dist: anthropic>=0.67.0
22
+ Requires-Dist: reportlab>=4.4.3
23
+ Requires-Dist: lxml>=6.0.2
24
+ Requires-Dist: flask-login>=0.6.3
25
+ Requires-Dist: pandas>=2.2.3
26
+ Requires-Dist: numpy>=2.0.2
27
+ Requires-Dist: matplotlib>=3.9.4
28
+ Requires-Dist: plotly>=6.3.0
29
+ Requires-Dist: seaborn>=0.13.2
30
+ Requires-Dist: scikit-learn>=1.6.1
31
+ Requires-Dist: jupyter_client>=8.6.3
32
+ Requires-Dist: ipykernel>=6.29.5
33
+ Requires-Dist: ipython
34
+ Requires-Dist: statsmodels
35
+ Requires-Dist: sqlalchemy>=2.0.42
36
+ Requires-Dist: cryptography>=45.0.6
37
+ Requires-Dist: regex>=2025.11.3
38
+ Requires-Dist: tiktoken>=0.12.0
39
+ Requires-Dist: xgboost>=2.1.4
40
+ Requires-Dist: beautifulsoup4>=4.12.2
41
+ Requires-Dist: html5lib>=1.1
42
+ Requires-Dist: shap>=0.42.0
43
+ Requires-Dist: gunicorn==22.0.0
44
+ Dynamic: author
45
+ Dynamic: author-email
46
+ Dynamic: classifier
47
+ Dynamic: description
48
+ Dynamic: description-content-type
49
+ Dynamic: license
50
+ Dynamic: requires-dist
51
+ Dynamic: requires-python
52
+ Dynamic: summary
53
+
54
+ SyntaxMatrix Platform Provisioner (SPP)
55
+
56
+ SyntaxMatrix Platform Provisioner (SPP) is a self-hosted AI platform framework for building, deploying, and operating production-grade AI applications with licensing, governance, and modular extensibility built in.
57
+
58
+ SPP is designed for developers, educators, research teams, and enterprises who need full control over their AI systems while retaining a clear upgrade path to commercial capabilities.
59
+
60
+ What is SyntaxMatrix Platform Provisioner?
61
+
62
+ SPP is an open-core platform provisioner that enables organisations to:
63
+
64
+ Deploy AI-powered web applications
65
+
66
+ Provision AI assistants, ML tooling, and admin panels
67
+
68
+ Enforce feature access via licensing
69
+
70
+ Maintain full data ownership and self-hosting control
71
+
72
+ Each client runs their own independent instance.
73
+ SyntaxMatrix does not host or operate client environments.
74
+
75
+ Key Capabilities
76
+
77
+ Self-Hosted AI Platform
78
+ Deploy on your own infrastructure (cloud or on-prem).
79
+
80
+ Modular Architecture
81
+ Enable or disable platform capabilities via entitlements.
82
+
83
+ Licensing & Entitlements
84
+ Commercial features are controlled through a secure licence system.
85
+
86
+ Admin Panel & Governance
87
+ Manage users, content, data ingestion, and configuration.
88
+
89
+ AI & ML Tooling
90
+ Built-in support for AI assistants, retrieval, analytics, and experimentation.
91
+
92
+ Production-Ready
93
+ Designed for real deployments, not demos.
94
+
95
+ Open-Core Model
96
+
97
+ SyntaxMatrix Platform Provisioner follows an open-core approach:
98
+
99
+ Core framework → MIT Licence
100
+
101
+ Premium features → Commercial Licence
102
+
103
+ This allows you to:
104
+
105
+ Start freely
106
+
107
+ Self-host fully
108
+
109
+ Upgrade only when advanced capabilities are required
110
+
111
+ Licensing Overview
112
+ Open-Source Components (MIT)
113
+
114
+ The core platform is released under the MIT Licence, allowing:
115
+
116
+ Commercial use
117
+
118
+ Modification
119
+
120
+ Redistribution
121
+
122
+ Commercial Licence (Required for Premium Features)
123
+
124
+ Certain features require a paid subscription, including (but not limited to):
125
+
126
+ Advanced AI modules
127
+
128
+ Enterprise-grade limits
129
+
130
+ Premium admin capabilities
131
+
132
+ Commercial support tooling
133
+
134
+ Licence enforcement features
135
+
136
+ Commercial features are governed by the SyntaxMatrix Commercial Licence Agreement.
137
+
138
+ Using Premium Features without a valid licence is not permitted.
139
+
140
+ Subscription & Billing
141
+
142
+ Subscriptions are managed via Stripe
143
+
144
+ Licences are validated remotely
145
+
146
+ Paid plans take effect immediately
147
+
148
+ Cancellation applies at the end of the billing period
149
+
150
+ Grace periods may apply for payment issues
151
+
152
+ All enforcement is automated and transparent.
153
+
154
+ Self-Hosting Philosophy
155
+
156
+ SyntaxMatrix is built on a client-owned infrastructure model:
157
+
158
+ You deploy your own instance
159
+
160
+ You own your data
161
+
162
+ You control your environment
163
+
164
+ You choose when (and if) to upgrade
165
+
166
+ This architecture is intentional and central to the product’s design.
167
+
168
+ Typical Use Cases
169
+
170
+ AI education platforms
171
+
172
+ Internal enterprise AI tools
173
+
174
+ Research environments
175
+
176
+ AI-powered dashboards
177
+
178
+ Multi-tenant AI services
179
+
180
+ Regulated or privacy-sensitive deployments
181
+
182
+ Installation
183
+
184
+ SPP is distributed via PyPI.
185
+
186
+ Installation details are intentionally minimal here to avoid coupling the README to internal APIs.
187
+ Full setup instructions are provided in the official documentation.
188
+
189
+ Documentation
190
+
191
+ Comprehensive documentation covers:
192
+
193
+ Architecture & design
194
+
195
+ Licensing model
196
+
197
+ Deployment workflows
198
+
199
+ Client-side integration
200
+
201
+ Security considerations
202
+
203
+ Documentation is provided separately and kept version-aligned with releases.
204
+
205
+ Support & Contact
206
+
207
+ Website: https://syntaxmatrix.com
208
+
209
+ Licensing: licence@syntaxmatrix.com
210
+
211
+ Commercial enquiries: info@syntaxmatrix.com
212
+
213
+ Legal
214
+
215
+ © SyntaxMatrix Limited
216
+ All rights reserved.
217
+
218
+ Use of Premium Features requires a valid commercial subscription.
@@ -0,0 +1,165 @@
1
+ SyntaxMatrix Platform Provisioner (SPP)
2
+
3
+ SyntaxMatrix Platform Provisioner (SPP) is a self-hosted AI platform framework for building, deploying, and operating production-grade AI applications with licensing, governance, and modular extensibility built in.
4
+
5
+ SPP is designed for developers, educators, research teams, and enterprises who need full control over their AI systems while retaining a clear upgrade path to commercial capabilities.
6
+
7
+ What is SyntaxMatrix Platform Provisioner?
8
+
9
+ SPP is an open-core platform provisioner that enables organisations to:
10
+
11
+ Deploy AI-powered web applications
12
+
13
+ Provision AI assistants, ML tooling, and admin panels
14
+
15
+ Enforce feature access via licensing
16
+
17
+ Maintain full data ownership and self-hosting control
18
+
19
+ Each client runs their own independent instance.
20
+ SyntaxMatrix does not host or operate client environments.
21
+
22
+ Key Capabilities
23
+
24
+ Self-Hosted AI Platform
25
+ Deploy on your own infrastructure (cloud or on-prem).
26
+
27
+ Modular Architecture
28
+ Enable or disable platform capabilities via entitlements.
29
+
30
+ Licensing & Entitlements
31
+ Commercial features are controlled through a secure licence system.
32
+
33
+ Admin Panel & Governance
34
+ Manage users, content, data ingestion, and configuration.
35
+
36
+ AI & ML Tooling
37
+ Built-in support for AI assistants, retrieval, analytics, and experimentation.
38
+
39
+ Production-Ready
40
+ Designed for real deployments, not demos.
41
+
42
+ Open-Core Model
43
+
44
+ SyntaxMatrix Platform Provisioner follows an open-core approach:
45
+
46
+ Core framework → MIT Licence
47
+
48
+ Premium features → Commercial Licence
49
+
50
+ This allows you to:
51
+
52
+ Start freely
53
+
54
+ Self-host fully
55
+
56
+ Upgrade only when advanced capabilities are required
57
+
58
+ Licensing Overview
59
+ Open-Source Components (MIT)
60
+
61
+ The core platform is released under the MIT Licence, allowing:
62
+
63
+ Commercial use
64
+
65
+ Modification
66
+
67
+ Redistribution
68
+
69
+ Commercial Licence (Required for Premium Features)
70
+
71
+ Certain features require a paid subscription, including (but not limited to):
72
+
73
+ Advanced AI modules
74
+
75
+ Enterprise-grade limits
76
+
77
+ Premium admin capabilities
78
+
79
+ Commercial support tooling
80
+
81
+ Licence enforcement features
82
+
83
+ Commercial features are governed by the SyntaxMatrix Commercial Licence Agreement.
84
+
85
+ Using Premium Features without a valid licence is not permitted.
86
+
87
+ Subscription & Billing
88
+
89
+ Subscriptions are managed via Stripe
90
+
91
+ Licences are validated remotely
92
+
93
+ Paid plans take effect immediately
94
+
95
+ Cancellation applies at the end of the billing period
96
+
97
+ Grace periods may apply for payment issues
98
+
99
+ All enforcement is automated and transparent.
100
+
101
+ Self-Hosting Philosophy
102
+
103
+ SyntaxMatrix is built on a client-owned infrastructure model:
104
+
105
+ You deploy your own instance
106
+
107
+ You own your data
108
+
109
+ You control your environment
110
+
111
+ You choose when (and if) to upgrade
112
+
113
+ This architecture is intentional and central to the product’s design.
114
+
115
+ Typical Use Cases
116
+
117
+ AI education platforms
118
+
119
+ Internal enterprise AI tools
120
+
121
+ Research environments
122
+
123
+ AI-powered dashboards
124
+
125
+ Multi-tenant AI services
126
+
127
+ Regulated or privacy-sensitive deployments
128
+
129
+ Installation
130
+
131
+ SPP is distributed via PyPI.
132
+
133
+ Installation details are intentionally minimal here to avoid coupling the README to internal APIs.
134
+ Full setup instructions are provided in the official documentation.
135
+
136
+ Documentation
137
+
138
+ Comprehensive documentation covers:
139
+
140
+ Architecture & design
141
+
142
+ Licensing model
143
+
144
+ Deployment workflows
145
+
146
+ Client-side integration
147
+
148
+ Security considerations
149
+
150
+ Documentation is provided separately and kept version-aligned with releases.
151
+
152
+ Support & Contact
153
+
154
+ Website: https://syntaxmatrix.com
155
+
156
+ Licensing: licence@syntaxmatrix.com
157
+
158
+ Commercial enquiries: info@syntaxmatrix.com
159
+
160
+ Legal
161
+
162
+ © SyntaxMatrix Limited
163
+ All rights reserved.
164
+
165
+ Use of Premium Features requires a valid commercial subscription.
@@ -0,0 +1,4 @@
1
+ # pyproject.toml
2
+ [build-system]
3
+ requires = ["setuptools>=42", "wheel"]
4
+ build-backend = "setuptools.build_meta"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,71 @@
1
+ from setuptools import setup, find_packages
2
+ import os
3
+
4
+ # Read the README for a detailed project description
5
+ this_directory = os.path.abspath(os.path.dirname(__file__))
6
+ with open(os.path.join(this_directory, "README.md"), encoding="utf-8") as f:
7
+ long_description = f.read()
8
+
9
+ setup(
10
+ name="syntaxmatrix-core",
11
+ version="1.0.0",
12
+ license="MIT",
13
+ classifiers=[
14
+ "Operating System :: OS Independent",
15
+ ],
16
+ author="Bob Nti",
17
+ author_email="info@syntaxmatrix.net",
18
+ description="SyntaxMatrix: A Framework for building owned AI Platform.",
19
+ long_description=long_description,
20
+ long_description_content_type="text/markdown",
21
+ python_requires='>=3.9',
22
+ packages=find_packages(
23
+ exclude=[
24
+ "admin_tools", "admin_tools.*",
25
+ "tools", "tools.*",
26
+ ],
27
+ ),
28
+
29
+ include_package_data=True,
30
+ package_data={
31
+ "syntaxmatrix": [
32
+ "static/**/*",
33
+ "templates/*",
34
+ ]
35
+ },
36
+ install_requires=[
37
+ "Flask>=3.0.3",
38
+ "requests>=2.32.3",
39
+ "pytz>=2025.2,<2026",
40
+ "Markdown>=3.7",
41
+ "pypdf>=5.4.0",
42
+ "PyPDF2==3.0.1",
43
+ "nest-asyncio>=1.6.0",
44
+ "python-dotenv>=1.1.0",
45
+ "openai>=1.84.0",
46
+ "google-genai>=1.19.0",
47
+ "anthropic>=0.67.0",
48
+ "reportlab>=4.4.3",
49
+ "lxml>=6.0.2",
50
+ "flask-login>=0.6.3",
51
+ "pandas>=2.2.3",
52
+ "numpy>=2.0.2",
53
+ "matplotlib>=3.9.4",
54
+ "plotly>=6.3.0",
55
+ "seaborn>=0.13.2",
56
+ "scikit-learn>=1.6.1",
57
+ "jupyter_client>=8.6.3",
58
+ "ipykernel>=6.29.5",
59
+ "ipython",
60
+ "statsmodels",
61
+ "sqlalchemy>=2.0.42",
62
+ "cryptography>=45.0.6",
63
+ "regex>=2025.11.3",
64
+ "tiktoken>=0.12.0",
65
+ "xgboost>=2.1.4",
66
+ "beautifulsoup4>=4.12.2",
67
+ "html5lib>=1.1",
68
+ "shap>=0.42.0",
69
+ "gunicorn==22.0.0",
70
+ ],
71
+ )
@@ -0,0 +1,66 @@
1
+ from .core import SyntaxMUI
2
+
3
+ _app_instance = SyntaxMUI()
4
+
5
+ run = _app_instance.run
6
+ text_input = _app_instance.text_input
7
+ button = _app_instance.button
8
+ file_uploader = _app_instance.file_uploader
9
+ set_ui_mode = _app_instance.set_ui_mode
10
+ set_theme = _app_instance.set_theme
11
+ enable_theme_toggle = _app_instance.enable_theme_toggle
12
+ get_text_input_value = _app_instance.get_text_input_value
13
+ clear_text_input_value = _app_instance.clear_text_input_value
14
+ get_file_upload_value = _app_instance.get_file_upload_value
15
+ get_chat_history = _app_instance.get_chat_history
16
+ set_chat_history = _app_instance.set_chat_history
17
+ clear_chat_history = _app_instance.clear_chat_history
18
+ write = _app_instance.write
19
+ error = _app_instance.error
20
+ success = _app_instance.success
21
+ info = _app_instance.info
22
+ warning = _app_instance.warning
23
+ plt_plot = _app_instance.plt_plot
24
+ plotly_plot = _app_instance.plotly_plot
25
+
26
+ set_user_icon = _app_instance.set_user_icon
27
+ set_bot_icon = _app_instance.set_bot_icon
28
+ set_favicon = _app_instance.set_favicon
29
+ set_project_name = _app_instance.set_project_name
30
+ set_site_title = _app_instance.set_site_title
31
+ set_site_logo = _app_instance.set_site_logo
32
+ get_ui_modes = _app_instance.get_ui_modes
33
+ get_themes = _app_instance.get_themes
34
+ load_sys_chunks = _app_instance.load_sys_chunks
35
+
36
+ get_session_id = _app_instance.get_session_id
37
+ add_user_chunks = _app_instance.add_user_chunks
38
+ get_user_chunks = _app_instance.get_user_chunks
39
+ clear_user_chunks = _app_instance.clear_user_chunks
40
+ set_plottings = _app_instance.set_plottings
41
+ dropdown = _app_instance.dropdown
42
+ get_widget_value = _app_instance.get_widget_value
43
+
44
+ save_embed_model = _app_instance.save_embed_model
45
+ load_embed_model = _app_instance.load_embed_model
46
+ delete_embed_key = _app_instance.delete_embed_key
47
+ set_smxai_identity = _app_instance.set_smxai_identity
48
+ set_smxai_instructions = _app_instance.set_smxai_instructions
49
+ set_website_description = _app_instance.set_website_description
50
+ smiv_index = _app_instance.smiv_index
51
+ smpv_search = _app_instance.smpv_search
52
+ stream_process_query= _app_instance.stream_process_query
53
+ process_query_stream = _app_instance.process_query_stream
54
+ process_query = _app_instance.process_query
55
+ embed_query = _app_instance.embed_query
56
+ stream_write = _app_instance.stream_write
57
+ enable_stream = _app_instance.enable_stream
58
+ stream = _app_instance.stream
59
+ get_stream_args = _app_instance.get_stream_args
60
+ enable_user_files = _app_instance.enable_user_files
61
+ enable_registration = _app_instance.enable_registration
62
+ enable_site_documentation = _app_instance.enable_site_documentation
63
+ enable_ml_lab = _app_instance.enable_ml_lab
64
+
65
+
66
+ app = _app_instance.app
@@ -0,0 +1,24 @@
1
+ # syntaxmatrix/agent_tools.py
2
+ from dataclasses import dataclass
3
+ from typing import Callable, Optional, Dict, Any, List, Literal
4
+
5
+ Phase = Literal["sanitize_early", "domain_patches", "syntax_fixes", "final_repair"]
6
+
7
+ @dataclass
8
+ class CodeTool:
9
+ name: str
10
+ phase: Phase
11
+ fn: Callable[[str, Dict[str, Any]], str]
12
+ when: Optional[Callable[[str, Dict[str, Any]], bool]] = None
13
+ priority: int = 100 # lower runs earlier within the phase
14
+
15
+ class ToolRunner:
16
+ def __init__(self, tools: List[CodeTool]):
17
+ # stable order: phase → priority → name
18
+ self.tools = sorted(tools, key=lambda t: (t.phase, t.priority, t.name))
19
+
20
+ def run(self, code: str, ctx: Dict[str, Any]) -> str:
21
+ for t in self.tools:
22
+ if t.when is None or t.when(code, ctx):
23
+ code = t.fn(code, ctx)
24
+ return code