syntaxmatrix 3.0.0__tar.gz → 3.0.1__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 (104) hide show
  1. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/PKG-INFO +1 -1
  2. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/SyntaxMatrix.egg-info/PKG-INFO +1 -1
  3. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/setup.py +1 -1
  4. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/agentic/agents.py +11 -11
  5. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/page_builder_generation.py +2 -13
  6. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/routes.py +75 -10
  7. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/settings/prompts.py +13 -296
  8. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/MANIFEST.in +0 -0
  9. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/README.md +0 -0
  10. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/SyntaxMatrix.egg-info/SOURCES.txt +0 -0
  11. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/SyntaxMatrix.egg-info/dependency_links.txt +0 -0
  12. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/SyntaxMatrix.egg-info/requires.txt +0 -0
  13. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/SyntaxMatrix.egg-info/top_level.txt +0 -0
  14. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/pyproject.toml +0 -0
  15. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/setup.cfg +0 -0
  16. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/__init__.py +0 -0
  17. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/agentic/__init__.py +0 -0
  18. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/agentic/agent_tools.py +0 -0
  19. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/agentic/agents_orchestrer.py +0 -0
  20. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/agentic/code_tools_registry.py +0 -0
  21. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/agentic/model_templates.py +0 -0
  22. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/auth.py +0 -0
  23. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/bootstrap.py +0 -0
  24. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/client_docs.py +0 -0
  25. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/commentary.py +0 -0
  26. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/core.py +0 -0
  27. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/dataset_preprocessing.py +0 -0
  28. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/db.py +0 -0
  29. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/db_backends/__init__.py +0 -0
  30. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/db_backends/postgres_backend.py +0 -0
  31. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/db_backends/sqlite_backend.py +0 -0
  32. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/db_contract.py +0 -0
  33. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/display_html.py +0 -0
  34. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/emailer.py +0 -0
  35. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/file_processor.py +0 -0
  36. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/gpt_models_latest.py +0 -0
  37. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/history_store.py +0 -0
  38. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/kernel_manager.py +0 -0
  39. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/llm_store.py +0 -0
  40. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/media/__init__.py +0 -0
  41. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/media/media_pixabay.py +0 -0
  42. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/models.py +0 -0
  43. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/page_builder_defaults.py +0 -0
  44. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/page_layout_contract.py +0 -0
  45. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/page_patch_publish.py +0 -0
  46. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/plottings.py +0 -0
  47. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/plugins/__init__.py +0 -0
  48. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/plugins/plugin_manager.py +0 -0
  49. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/preface.py +0 -0
  50. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/premium/__init__.py +0 -0
  51. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/premium/catalogue/__init__.py +0 -0
  52. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/premium/gate.py +0 -0
  53. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/premium/state.py +0 -0
  54. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/premium/verify.py +0 -0
  55. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/profiles.py +0 -0
  56. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/project_root.py +0 -0
  57. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/selftest_page_templates.py +0 -0
  58. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/session.py +0 -0
  59. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/settings/__init__.py +0 -0
  60. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/settings/client_items.py +0 -0
  61. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/settings/logging.py +0 -0
  62. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/settings/model_map.py +0 -0
  63. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/settings/string_navbar.py +0 -0
  64. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/smiv.py +0 -0
  65. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/smpv.py +0 -0
  66. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/static/assets/hero-default.svg +0 -0
  67. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/static/css/style.css +0 -0
  68. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/static/docs.md +0 -0
  69. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/static/icons/bot_icon.png +0 -0
  70. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/static/icons/bot_icon2.png +0 -0
  71. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/static/icons/favicon.png +0 -0
  72. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/static/icons/logo.png +0 -0
  73. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/static/icons/logo2.png +0 -0
  74. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/static/icons/svg_497526.svg +0 -0
  75. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/static/icons/svg_497528.svg +0 -0
  76. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/static/js/chat.js +0 -0
  77. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/static/js/sidebar.js +0 -0
  78. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/static/js/widgets.js +0 -0
  79. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/templates/admin_billing.html +0 -0
  80. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/templates/admin_branding.html +0 -0
  81. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/templates/admin_features.html +0 -0
  82. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/templates/admin_secretes.html +0 -0
  83. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/templates/change_password.html +0 -0
  84. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/templates/code_cell.html +0 -0
  85. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/templates/dashboard.html +0 -0
  86. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/templates/dataset_resize.html +0 -0
  87. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/templates/docs.html +0 -0
  88. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/templates/edit_page.html +0 -0
  89. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/templates/error.html +0 -0
  90. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/templates/login.html +0 -0
  91. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/templates/register.html +0 -0
  92. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/themes.py +0 -0
  93. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/ui_modes.py +0 -0
  94. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/utils.py +0 -0
  95. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/vector_db.py +0 -0
  96. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/vectordb/__init__.py +0 -0
  97. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/vectordb/adapters/__init__.py +0 -0
  98. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/vectordb/adapters/milvus_adapter.py +0 -0
  99. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/vectordb/adapters/pgvector_adapter.py +0 -0
  100. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/vectordb/adapters/sqlite_adapter.py +0 -0
  101. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/vectordb/base.py +0 -0
  102. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/vectordb/registry.py +0 -0
  103. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/vectorizer.py +0 -0
  104. {syntaxmatrix-3.0.0 → syntaxmatrix-3.0.1}/syntaxmatrix/workspace_db.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: syntaxmatrix
3
- Version: 3.0.0
3
+ Version: 3.0.1
4
4
  Summary: SyntaxMatrix: A Framework for building owned AI Platform.
5
5
  Author: Bob Nti
6
6
  Author-email: bob.nti@syntaxmatrix.net
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: syntaxmatrix
3
- Version: 3.0.0
3
+ Version: 3.0.1
4
4
  Summary: SyntaxMatrix: A Framework for building owned AI Platform.
5
5
  Author: Bob Nti
6
6
  Author-email: bob.nti@syntaxmatrix.net
@@ -8,7 +8,7 @@ with open(os.path.join(this_directory, "README.md"), encoding="utf-8") as f:
8
8
 
9
9
  setup(
10
10
  name="syntaxmatrix",
11
- version="3.0.0",
11
+ version="3.0.1",
12
12
  license="MIT",
13
13
  classifiers=[
14
14
  "Programming Language :: Python :: 3.9",
@@ -1478,21 +1478,21 @@ def agentic_generate_page(*,
1478
1478
  css = f"""
1479
1479
  <style>
1480
1480
  #{page_id} {{
1481
- --r: 18px;
1482
- --bd: rgba(148,163,184,.25);
1483
- --fg: #0f172a;
1484
- --mut: #475569;
1485
- --card: rgba(255,255,255,.78);
1486
- --bg: #f8fafc;
1487
- font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
1488
- background: var(--bg);
1489
- color: var(--fg);
1490
- overflow-x: clip;
1481
+ --r: 18px;
1482
+ --bd: rgba(148,163,184,.25);
1483
+ --fg: #0f172a;
1484
+ --mut: #000000;
1485
+ --card: rgba(255,255,255,.78);
1486
+ --bg: #f8fafc;
1487
+ font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
1488
+ background: var(--bg);
1489
+ color: var(--fg);
1490
+ overflow-x: clip;
1491
1491
  }}
1492
1492
  @media (prefers-color-scheme: dark){{
1493
1493
  #{page_id} {{
1494
1494
  --fg: #e2e8f0;
1495
- --mut: #a7b3c6;
1495
+ --mut: #000000;
1496
1496
  --card: rgba(2,6,23,.45);
1497
1497
  --bg: radial-gradient(circle at 20% 10%, rgba(30,64,175,.25), rgba(2,6,23,.95) 55%);
1498
1498
  --bd: rgba(148,163,184,.18);
@@ -838,29 +838,18 @@ def compile_layout_to_html(layout: Dict[str, Any], *, page_slug: str) -> str:
838
838
 
839
839
  css = """
840
840
  <style>
841
- .smxp{--r:18px;--bd:rgba(148,163,184,.28);--mut:#94a3b8;--fg:#0f172a;--card:rgba(255,255,255,.72);
842
841
  .smxp{
843
842
  --r:18px;
844
843
  --bd: rgba(148,163,184,.25);
845
844
  --fg: #0f172a;
846
- --mut: #475569; /* <- darker, readable */
845
+ --mut:#000000; /* <- darker, readable */
847
846
  --card: rgba(255,255,255,.78);
848
847
  --bg: #f8fafc;
849
848
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
850
849
  background: var(--bg);
851
- color: var(--fg);
852
850
  overflow-x: clip;
853
851
  }
854
- @media (prefers-color-scheme: dark){
855
- .smxp{
856
- --fg:#e2e8f0;
857
- --mut:#a7b3c6;
858
- --card:rgba(2,6,23,.45);
859
- --bg: radial-gradient(circle at 20% 10%, rgba(30,64,175,.25), rgba(2,6,23,.95) 55%);
860
- --bd: rgba(148,163,184,.18);
861
- }
862
- }
863
-
852
+
864
853
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: var(--fg); }
865
854
  @media (prefers-color-scheme: dark){
866
855
  .smxp{--fg:#e2e8f0;--card:rgba(2,6,23,.45);--bd:rgba(148,163,184,.18);--mut:#a7b3c6;}
@@ -6,6 +6,7 @@ import json, pandas as pd
6
6
  import contextlib, werkzeug
7
7
  import io as _std_io
8
8
 
9
+ from flask import abort
9
10
  from io import BytesIO
10
11
  from scipy import io
11
12
  from flask import Blueprint, Response, request, send_file, session
@@ -380,6 +381,55 @@ def _render_reasoning_process_download(refined_question, thought_obj, tasks, TOK
380
381
 
381
382
 
382
383
  def setup_routes(smx):
384
+
385
+ def _safe_slug(s: str) -> str:
386
+ s = (s or "").strip()
387
+ if (not s) or ("/" in s) or ("\\" in s) or (".." in s):
388
+ return ""
389
+ return s
390
+
391
+ @smx.app.route("/client-pages/<slug>")
392
+ def client_pages(slug):
393
+ """
394
+ Serve CEO-managed raw HTML from:
395
+ syntaxmatrixdir/client_pages/<slug>/index(.html/.htm)
396
+ """
397
+ slug = _safe_slug(slug)
398
+ if not slug:
399
+ abort(404)
400
+
401
+ base_dir = smx._client_dir / "client_pages" / slug # ✅ correct for your framework
402
+
403
+ # Accept common Windows saved names too
404
+ for fname in ("index.html", "index.htm", "index"):
405
+ fpath = base_dir / fname
406
+ if fpath.is_file():
407
+ return send_from_directory(str(base_dir), fname)
408
+
409
+ abort(404)
410
+
411
+ @smx.app.route("/client-pages/<slug>/<path:asset_path>")
412
+ def client_pages_assets(slug, asset_path):
413
+ """
414
+ Serve assets from:
415
+ syntaxmatrixdir/client_pages/<slug>/<asset_path>
416
+ """
417
+ slug = _safe_slug(slug)
418
+ if not slug:
419
+ abort(404)
420
+
421
+ if ".." in asset_path or asset_path.startswith(("/", "\\")):
422
+ abort(404)
423
+
424
+ base_dir = smx._client_dir / "client_pages" / slug # ✅ correct for your framework
425
+ full_path = base_dir / asset_path
426
+
427
+ if not full_path.is_file():
428
+ abort(404)
429
+
430
+ return send_from_directory(str(base_dir), asset_path)
431
+
432
+
383
433
  # Prevent duplicate route registration.
384
434
  if "home" in smx.app.view_functions:
385
435
  return
@@ -1926,6 +1976,7 @@ def setup_routes(smx):
1926
1976
 
1927
1977
  # ────────────────────────────────────────────────────────────────────────────────────────
1928
1978
 
1979
+
1929
1980
  @smx.app.route("/toggle_theme", methods=["GET"])
1930
1981
  def toggle_theme():
1931
1982
  if not getattr(smx, "theme_toggle_enabled", False):
@@ -1957,6 +2008,7 @@ def setup_routes(smx):
1957
2008
  session.modified = True
1958
2009
  return redirect(request.referrer or url_for("home"))
1959
2010
 
2011
+
1960
2012
  # ────────────────────────────────────────────────────────────────────────────────────────
1961
2013
  # ── HOME VIEW DETAILS -----------------------------
1962
2014
  @smx.app.route("/", methods=["GET", "POST"])
@@ -1974,14 +2026,26 @@ def setup_routes(smx):
1974
2026
  page_name = (db.get_setting("landing.page_name", "") or "").strip()
1975
2027
  except Exception:
1976
2028
  page_name = ""
1977
-
2029
+
2030
+ # Support raw HTML landing targets: html:<slug>
2031
+ if page_name.startswith("html:"):
2032
+ slug = page_name.split(":", 1)[1].strip()
2033
+ if slug:
2034
+ return redirect(url_for("client_html_page", slug=slug))
2035
+
1978
2036
  if page_name:
1979
- # Safety: only redirect if the page exists
1980
2037
  try:
1981
2038
  page_html = db.get_page_html(page_name)
1982
2039
  except Exception:
1983
2040
  page_html = None
1984
2041
 
2042
+ if page_html is None:
2043
+ # view_page() falls back to smx.pages, so home() must too
2044
+ try:
2045
+ page_html = smx.pages.get(page_name)
2046
+ except Exception:
2047
+ page_html = None
2048
+
1985
2049
  if page_html:
1986
2050
  return redirect(url_for("view_page", page_name=page_name))
1987
2051
 
@@ -6140,14 +6204,7 @@ def setup_routes(smx):
6140
6204
  db.set_setting("branding.website_description", (request.form.get("website_description") or "").strip())
6141
6205
  changed_settings = True
6142
6206
 
6143
- if ok1 or ok2 or ok3 or changed_settings:
6144
- try:
6145
- smx._apply_branding_from_disk()
6146
- except Exception:
6147
- pass
6148
- flash("Branding updated ✓")
6149
-
6150
- # Landing page settings
6207
+ # Landing page settings (MUST be processed before the "changed_settings" decision)
6151
6208
  if "landing_mode" in request.form:
6152
6209
  landing_mode = (request.form.get("landing_mode") or "chat").strip().lower()
6153
6210
  if landing_mode not in ("chat", "page"):
@@ -6160,6 +6217,14 @@ def setup_routes(smx):
6160
6217
  db.set_setting("landing.page_name", landing_page_name)
6161
6218
  changed_settings = True
6162
6219
 
6220
+ # Apply + notify if anything changed (uploads OR settings, including landing settings)
6221
+ if ok1 or ok2 or ok3 or changed_settings:
6222
+ try:
6223
+ smx._apply_branding_from_disk()
6224
+ except Exception:
6225
+ pass
6226
+ flash("Branding updated ✓")
6227
+
6163
6228
  return redirect(url_for("admin_branding"))
6164
6229
 
6165
6230
  # GET: show current status
@@ -1,202 +1,13 @@
1
+ SMXAI_CHAT_IDENTITY = ""
1
2
 
2
- SMXAI_CHAT_IDENTITY = f"""
3
- Your name is 'smxAI'.
4
- You are the expert AI Engineer and Data Scientist at SyntaxMatrix Ltd.
5
- Your creator is SyntaxMatrix and you will represent them in any way, shape or form.
6
- Your Company is based in Ireland. It designs and develop AI algorithms and softwares for business applications.
7
- """
8
-
9
- SMXAI_CHAT_INSTRUCTIONS = """
10
- You respond to queries that are about your company only.
11
- If a query is not about your company, kindly bring the conversation to be about your company.
12
- Be professional at all times
13
-
14
- Content & Formatting Blueprint (Adhere Strictly):
15
- Structure your response using the following elements as appropriate for the topic. Prioritize clarity and information density. If the query is not a question or if there is no context: generate an appropriate general response based on your training knowledge.
16
- else if the query is a question:
17
- 1. Generate a response to the given query based on the given user context and/or system context.
18
- 2. Use the chat history to stay relevant.
19
- 3. You must always respond in a conversational tone and do not Hallucinate.
20
- 4. Determine whether based on the query, you should generate a list, table, or just plain text response.
21
- 5. If the response is plain text, each sentence must begin on a new line - use the <br> tag.
22
- 6. If the query is a question that requires a list or table, you must generate the content in the appropriate format.
23
- 7. Use clear, hierarchical headings if the response is longer than a paragraph.
24
- 8. Be direct and concise. Avoid unnecessary fluff or repetition.
25
- 9. Lead with your key conclusion or answer in the first sentence.
26
- 10. Support your answer with clear, factual points.
27
-
28
- ──────── FORMAT INSTRUCTIONS ───────────────
29
- 1. Decide which of the following layouts best fits the content:
30
- • Comparison across attributes or (Key:Value) pairs → HTML <table>.
31
- • When creating a table, adhere to the following styling instructions:
32
- a. Firstly, define any 3 colors and assign them to c1,c2,c3 (example: c1="#EDFBFF", c2="#CCCCCC", c3="#E3E3E3". c2 and c3 should be similar but slightly different shades.
33
-
34
- b. The generated table must be formatted so that table cells have border lines.
35
- c. The table head (<thead>) must always have a background color of c1.
36
- d. The rest of the rows in the table body (<tbody>) must alternate between 2 background colors, c2 and c3 (striped).
37
- • Use bullet points <ul> for simple lists of items, features → HTML.
38
- • Use ordered list <ol> for sequences or ranking or steps in a process → HTML
39
- 2. Keep cells/list items concise (one fact or metric each).
40
- 3. All markup must be raw HTML. Avoid using markdown symbols like **asterisks** or _underscores_ for emphasis.
41
- 4. Do not wrap the answer inside triple back-ticks.
42
- 6. If emphasis is needed, use clear language (e.g., "It is important to note that...").
43
- 7. Use horizontal lines (<hr>) sparingly to separate distinct sections.
44
- 8. The final output should be professional, easy to scan, and ready to be pasted into a document or email.
45
- """
46
-
47
- SMXAI_WEBSITE_DESCRIPTION = """
48
- SyntaxMatrix — Website Description
49
-
50
- SyntaxMatrix is an enterprise-first AI engineering company that builds governed, client-owned AI platforms for organisations that need control over their data, their deployment boundary, and their operational outcomes. The company’s flagship product, SyntaxMatrix Platform Provisioner (smxPP), is a full-stack Python platform provisioner designed to deliver complete AI-enabled applications into a client’s environment in a repeatable, auditable, and maintainable way.
51
-
52
- Most organisations do not struggle to “try AI”. They struggle to keep it working reliably after the initial proof-of-concept. The real challenge starts when prototypes become production workloads: knowledge sources grow, policies tighten, teams change, and the solution needs governance, monitoring, access control, and repeatability. SyntaxMatrix exists to solve that “Day 2” reality by providing a platform that can be deployed and operated as part of an organisation’s actual systems landscape, rather than as a fragile demo.
53
-
54
- smxPP is not a hosted wrapper around AI APIs. It is a provisioned platform: a deployable system that is installed into a client’s own instance, where the client retains sovereignty over their runtime, their documents, their users, and the security perimeter. The result is a governed AI platform that can be run in regulated environments, private networks, or controlled cloud deployments — with clear role separation, traceability, and a data pipeline that is designed for operational integrity.
55
-
56
- What smxPP provides
57
-
58
- smxPP provisions a complete platform surface, not a single feature. The platform is built around real enterprise needs: controlled user access, secure content ingestion, governed retrieval pipelines, internal documentation and pages, structured workflows, and optional machine learning tooling for teams that need it. The platform is engineered so organisations can standardise how they deploy and operate AI functionality across departments, business units, and client projects.
59
-
60
- 1) Role-aware access and controlled operations
61
-
62
- smxPP includes role-aware access control so that administration, staff actions, and end-user experiences remain separated and auditable. This matters in real deployments: a platform that can ingest and answer from internal knowledge must enforce who can upload, who can publish, who can configure, and who can export. smxPP is built so that organisations can run AI-enabled capabilities without turning governance into an afterthought.
63
-
64
- 2) Document ingestion, retrieval, and RAG that can be governed
65
-
66
- The platform supports document ingestion and retrieval workflows designed for enterprise usage: structured chunking, indexing, retrieval, and controlled answering. smxPP enables Retrieval-Augmented Generation (RAG) experiences where an assistant can answer questions grounded in organisational content, while still giving operators the tooling to manage sources, auditing, and quality. The emphasis is on reliability and clarity: content is ingested with intent, stored with traceability, and retrieved in a way that can be improved over time.
67
-
68
- 3) Page Studio for internal portals and knowledge-driven pages
69
-
70
- smxPP includes a page system that enables organisations to generate and manage internal or external pages from structured content, with an admin surface for editing, publishing, and maintaining these pages as part of a broader platform. This is critical when AI must integrate into real organisational communication: policies, procedures, services, knowledge bases, onboarding documentation, and operational content are not separate from AI — they are part of the same system.
71
-
72
- 4) Documentation and knowledge base experience inside the platform
73
-
74
- smxPP supports an integrated documentation viewing experience so product documentation and operational knowledge can live alongside the system itself. For enterprise teams, this reduces friction: the platform is not just a runtime, but also a controlled surface for guidance, onboarding, and internal enablement.
75
-
76
- 5) Optional ML Lab capabilities for structured analysis and export
77
-
78
- Where required, smxPP can provide a controlled ML workflow surface: dataset upload, exploration, modelling support, and export of results. This is not positioned as “auto-ML hype”, but as an operational capability that helps teams validate hypotheses, produce repeatable artefacts, and share outputs in a controlled way.
79
-
80
- 6) Premium features and entitlements that map to operational value
81
-
82
- smxPP supports premium and enterprise entitlements that correspond to real operational needs: increased usage caps, larger document volumes, scaled user access, expanded storage allowances, and enhanced governance features. The premium model is not a cosmetic upsell — it is tied to the parts of platform operation that genuinely cost time, compute, and support to deliver at enterprise quality.
83
-
84
- Deployment model: client-owned by design
85
-
86
- A core differentiator of smxPP is the client-owned instance model. SyntaxMatrix does not host customer instances as a default operating model. Instead, each organisation deploys smxPP into its own environment and controls its own data boundary. This matters for enterprises that cannot accept third-party hosting for compliance, security, or policy reasons. It also matters for organisations that want long-term autonomy: the platform is provisioned so clients can maintain it as part of their internal systems landscape, while still benefiting from a clear upgrade path and supported premium capabilities.
87
-
88
- smxPP can be deployed in multiple patterns depending on organisational constraints:
89
-
90
- private cloud deployment (controlled networking and identity)
91
-
92
- secure cloud environments with strict access controls
93
-
94
- controlled hosting scenarios where the client remains the operator
95
-
96
- environments where outbound access is limited and governance is strict
97
-
98
- This deployment stance is a practical trust signal: it aligns with how security and procurement teams assess operational risk. Instead of asking an organisation to trust a black-box hosted system, smxPP provides a platform they can inspect, configure, and run under their own governance policies.
99
-
100
- Licensing that supports enterprise trust
101
-
102
- To support premium entitlements while maintaining operational integrity, SyntaxMatrix provides a dedicated licensing service that integrates with subscription billing and licence enforcement. This licensing architecture is designed to protect both the customer and SyntaxMatrix:
103
-
104
- Customers get a clear, auditable entitlement model that maps to features and usage caps.
105
-
106
- SyntaxMatrix ensures subscription state and premium access remain consistent and fraud-resistant.
107
-
108
- The system can represent real billing conditions (active, past due, grace period, revoked) rather than pretending billing is always perfect.
109
-
110
- The licensing service integrates subscription management with a controlled entitlement workflow. Premium access is activated via signed licence payloads and is validated through the licensing flow to prevent tampering and unauthorised upgrades. For enterprise buyers, this is not about “locking people out”; it is about ensuring contractual terms and platform governance remain aligned with operational access, and that the platform behaves predictably when billing state changes.
111
-
112
- Self-serve billing management is supported via the customer portal provided by Stripe, enabling customers to:
113
-
114
- update payment method
115
-
116
- view invoices
117
-
118
- cancel subscription (at period end)
119
-
120
- manage billing details without support tickets
121
-
122
- Where payment events require operational nuance, the system supports a grace period model so organisations do not lose access instantly due to a transient billing failure. That is a practical enterprise requirement: it reduces disruption while still enforcing contract reality if issues are not resolved in time.
123
-
124
- What SyntaxMatrix delivers as a company
125
-
126
- SyntaxMatrix provides more than software. The company provides platform provisioning services and engineering support tailored to organisations that want durable AI systems rather than disposable demos. Typical engagements include:
127
-
128
- Platform provisioning and deployment planning
129
- Helping teams choose the right deployment approach, configure their instance correctly, and align platform operation with security and governance constraints.
130
-
131
- Knowledge architecture and RAG readiness
132
- Assisting organisations in structuring content for retrieval, defining ingestion practices, improving chunking strategies, and building a dependable knowledge pipeline.
133
-
134
- Governance-first configuration and access modelling
135
- Supporting role design, operational permissions, and audit-ready patterns for how the platform is managed internally.
136
-
137
- Premium enablement and operational scaling
138
- Enabling higher-volume usage, larger content stores, and scaling features that align with real enterprise requirements.
139
-
140
- Optional fine-tuning and privacy-aligned model strategy (where required)
141
- When organisations require tighter privacy controls or specialised performance, SyntaxMatrix can support model strategy work that aligns with deployment constraints and internal data governance policies.
3
+ SMXAI_CHAT_INSTRUCTIONS = ""
142
4
 
143
- Who smxPP is built for
5
+ SMXAI_WEBSITE_DESCRIPTION = ""
144
6
 
145
- smxPP is designed for organisations and teams that need clarity, governance, and operational reliability:
146
7
 
147
- CTOs and engineering leaders who want repeatable platform deployment across teams
148
-
149
- AI architects who need control of data flows, retrieval behaviour, and access boundaries
150
-
151
- Compliance-minded organisations that cannot accept casual handling of internal documents
152
-
153
- Enterprise teams that want self-hosting and BYOK operation rather than vendor lock-in
154
-
155
- Operators who need auditability, predictable behaviour, and controlled upgrades
156
-
157
- What makes smxPP different
158
-
159
- smxPP is differentiated by its stance and its engineering priorities:
160
-
161
- Client-owned instance model
162
- The platform is provisioned into a client environment, supporting data sovereignty and deployment control.
163
-
164
- Governance and operational structure baked in
165
- Role separation, administrative workflows, and controlled operations are first-class design concerns.
166
-
167
- A complete platform surface, not a single chatbot
168
- smxPP includes the tooling required to run AI as a real system: content ingestion, page management, documentation, analytics surfaces, and premium gating.
169
-
170
- Licensing tied to integrity and trust
171
- The licensing design is built to ensure subscription status, premium entitlements, and platform behaviour remain aligned and auditable.
172
-
173
- Designed to deploy and operate, not just to demo
174
- smxPP is built for “keep it running” realities: changes, growth, governance, and operational continuity.
175
-
176
- Technical deployment compatibility
177
-
178
- smxPP is designed to be deployable in modern cloud-native patterns. Many organisations run it using managed deployment environments such as Google Cloud Platform services including Google Cloud Run, while retaining full control of environment variables, secrets management, storage persistence, and network boundary configuration. The architecture supports practical operational patterns such as persistent storage backing, instance configuration at deploy time, and clear separation between platform runtime and customer-owned content.
179
-
180
- Where organisations use domains purchased through registrars such as Namecheap, smxPP’s deployment model supports domain mapping and DNS configuration as part of a repeatable, documented rollout process.
181
-
182
- Closing positioning
183
-
184
- SyntaxMatrix builds for organisations that are serious about AI as an operational capability — not as a marketing demo. smxPP is engineered to provision governed, client-owned AI platforms that integrate into real environments with access control, auditable configuration, and a licensing model that supports both enterprise trust and commercial sustainability.
185
-
186
- If an organisation wants AI capabilities that can be deployed securely, operated reliably, and scaled with confidence — while keeping ownership of data and deployment — SyntaxMatrix and smxPP provide the platform and the engineering discipline to make that practical.
187
- """
188
-
189
-
190
- SMXAI_HOME_PAGE_INSTRUCTIONS = f"""
8
+ SMXAI_LANDING_PAGE_INSTRUCTIONS = f"""
191
9
  > IMPORTANT CONTEXT FOR THE GENERATOR
192
10
 
193
- - SyntaxMatrix is the company.
194
- - SyntaxMatrix Platform Provisioner (smxPP) is the product.
195
- - This is an enterprise homepage: it must build trust, communicate substance, and explain operational reality.
196
- - This page must NOT read like a startup landing page or a hype brochure.
197
-
198
- ---
199
-
200
11
  ## PLAN GENERATION CONTRACT (MANDATORY)
201
12
 
202
13
  When generating the page plan JSON:
@@ -793,13 +604,8 @@ The page must read like a full company profile
793
604
 
794
605
 
795
606
  SMXAI_SERVICES_PAGE_INSTRUCTIONS = """
796
- ✅ SMXAI_SERVICES_PAGE_INSTRUCTIONS — FINAL (ENTERPRISE, IMAGE-SAFE
797
- IMPORTANT CONTEXT FOR THE GENERATOR
798
607
 
799
- SyntaxMatrix is the company.
800
- SyntaxMatrix Platform Provisioner (smxPP) is the product.
801
- This page describes what SyntaxMatrix delivers to organisations, not features in isolation.
802
- This is an enterprise services page, not a SaaS pricing teaser.
608
+ IMPORTANT CONTEXT FOR THE GENERATOR
803
609
 
804
610
  🔒 PLAN GENERATION CONTRACT (MANDATORY)
805
611
  When generating the page plan JSON:
@@ -1154,100 +960,6 @@ Page must read like a consulting-grade services document
1154
960
  """
1155
961
 
1156
962
 
1157
- SMXAI_SERVICES_PAGE_INSTRUCTIONS_2 = """
1158
- You are generating a SERVICES page for SyntaxMatrix.
1159
-
1160
- GOAL
1161
- Create a clear, professional services page that explains:
1162
- - what services SyntaxMatrix provides
1163
- - how those services are delivered
1164
- - who they are for
1165
- - how a client engages or starts a conversation
1166
-
1167
- This page must read like an enterprise AI engineering firm, not a marketing brochure.
1168
-
1169
- ABSOLUTE REQUIREMENTS
1170
- 1) The plan MUST include a hero section (type: "hero") with:
1171
- - a concise headline describing what SyntaxMatrix delivers (AI systems, RAG frameworks, agentic platforms, etc.)
1172
- - a short subheading (1–2 sentences) explaining the value proposition
1173
- - a primary CTA such as "Request a consultation" or "Talk to us"
1174
-
1175
- 2) The plan MUST include a core services section using type: "features".
1176
- This section must list 4–7 services.
1177
- Each service must be presented as a compact, scannable card with:
1178
- - clear service title
1179
- - short description (1–2 sentences max)
1180
- - what the client gets (outcome-focused, not buzzwords)
1181
-
1182
- 3) The plan MUST include a "How we work" section using type: "richtext" or "features".
1183
- It should explain the engagement model in 4–6 steps:
1184
- - discovery / requirements
1185
- - system design
1186
- - implementation
1187
- - evaluation & testing
1188
- - deployment
1189
- - support / iteration (if applicable)
1190
-
1191
- 4) The plan MUST include a "Who this is for" or "Use cases" section.
1192
- Use type: "features" or "richtext".
1193
- Examples:
1194
- - startups building AI products
1195
- - enterprises adopting internal AI tools
1196
- - educators / training providers
1197
- - research or applied AI teams
1198
-
1199
- 5) The plan MUST include a final CTA section (type: "cta") with:
1200
- - a clear invitation to engage
1201
- - what to provide when contacting (brief description, goals, constraints)
1202
- - a placeholder contact method (email / form)
1203
-
1204
- CONTENT CONSTRAINTS
1205
- - Do NOT claim one-size-fits-all solutions.
1206
- - Do NOT invent client names, testimonials, or certifications.
1207
- - Avoid exaggerated claims.
1208
- - Keep descriptions concrete and grounded in engineering reality.
1209
- - Avoid long paragraphs; use structured, skimmable copy.
1210
-
1211
- SERVICE CATEGORIES (use as guidance)
1212
- The services section may include items such as:
1213
- - AI system architecture & design
1214
- - Retrieval-Augmented Generation (RAG) systems
1215
- - Multi-agent workflows and orchestration
1216
- - Custom AI framework development (SyntaxMatrix-based)
1217
- - Evaluation, testing, and reliability tooling
1218
- - Deployment, MLOps, and infrastructure support
1219
- - Custom fine-tuning of open-source models (privacy-focused)
1220
-
1221
- SERVICE CARD TEMPLATE (features item)
1222
- Each service should follow this shape:
1223
- {
1224
- "id": "svc_1",
1225
- "type": "card",
1226
- "title": "RAG System Design & Implementation",
1227
- "text": "Design and build production-grade RAG pipelines with reliable retrieval, evaluation, and context control."
1228
- }
1229
-
1230
- STYLE
1231
- - Confident, technical, and professional.
1232
- - Emphasise SyntaxMatrix as an AI algorithm design and framework company.
1233
- - Assume a technically literate audience (CTOs, engineers, decision-makers).
1234
- - Avoid hype; focus on capability and process.
1235
-
1236
- RECOMMENDED PAGE STRUCTURE
1237
- 1) hero
1238
- 2) features: Core services
1239
- 3) richtext/features: How we work
1240
- 4) features/richtext: Who this is for / Use cases
1241
- 5) cta
1242
-
1243
- OUTPUT QUALITY CHECK
1244
- Before finalising, ensure:
1245
- - Services are clearly enumerated.
1246
- - Engagement process is explicit.
1247
- - CTA is actionable and clear.
1248
- """
1249
-
1250
-
1251
963
  SMXAI_GALLERY_PAGE_INSTRUCTIONS = """
1252
964
  You are generating a GALLERY page. This page must behave like a true photo/screenshot gallery.
1253
965
 
@@ -1295,7 +1007,7 @@ TONE
1295
1007
 
1296
1008
 
1297
1009
  SMXAI_CAREERS_PAGE_INSTRUCTIONS = """
1298
- You are generating a CAREERS page for SyntaxMatrix.
1010
+ You are generating a CAREERS page
1299
1011
 
1300
1012
  GOAL
1301
1013
  Create a careers landing page that:
@@ -1515,8 +1227,8 @@ def get_page_instructions(page_slug: str = "", page_title: str = "") -> str:
1515
1227
  key = f"{page_slug or ''} {page_title or ''}".strip().lower()
1516
1228
 
1517
1229
  # Home page
1518
- if any(w in key for w in ("home", "home-page", "homepage", "landing", "landing-page")):
1519
- return SMXAI_HOME_PAGE_INSTRUCTIONS
1230
+ if any(w in key for w in ("landing", "landing-page", "home", "home-page", "homepage")):
1231
+ return SMXAI_LANDING_PAGE_INSTRUCTIONS
1520
1232
 
1521
1233
  # About page
1522
1234
  if any(w in key for w in ("about", "about-us", "who-we-are", "company", "our-story", "team")):
@@ -1537,5 +1249,10 @@ def get_page_instructions(page_slug: str = "", page_title: str = "") -> str:
1537
1249
  if any(w in key for w in ("blog", "articles", "updates", "news", "release-notes")):
1538
1250
  return SMXAI_BLOG_PAGE_INSTRUCTIONS
1539
1251
 
1252
+ # Licence page
1253
+ if any(w in key for w in ("licence", "license", "licence-page", "licensing")):
1254
+ return SMXAI_LICENCE_PAGE_INSTRUCTIONS
1255
+
1256
+
1540
1257
  # Fallback
1541
1258
  return SMXAI_NEW_PAGE_INSTRUCTIONS_DEFAULT
File without changes
File without changes
File without changes