myra-linux 0.1.0__py3-none-any.whl

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 (80) hide show
  1. Aria_office_manage.py +1985 -0
  2. Main_normal.py +261 -0
  3. aria.py +2872 -0
  4. aria_modules/__init__.py +1 -0
  5. aria_modules/aria_activation.py +335 -0
  6. aria_modules/aria_advanced_features.py +1269 -0
  7. aria_modules/aria_advanced_tools.py +1099 -0
  8. aria_modules/assets/about/cofounder.png +0 -0
  9. aria_modules/assets/about/developer.png +0 -0
  10. aria_modules/assets/fonts/OFL-Poppins.txt +93 -0
  11. aria_modules/assets/fonts/Poppins-Bold.ttf +0 -0
  12. aria_modules/assets/fonts/Poppins-ExtraBold.ttf +0 -0
  13. aria_modules/assets/fonts/Poppins-Medium.ttf +0 -0
  14. aria_modules/assets/fonts/Poppins-Regular.ttf +0 -0
  15. aria_modules/assets/fonts/Poppins-SemiBold.ttf +0 -0
  16. aria_modules/assets/myra_girl.png +0 -0
  17. aria_modules/assets/myra_logo.png +0 -0
  18. aria_modules/assets/splash_bg.jpg +0 -0
  19. aria_modules/assets/ui_reference.png +0 -0
  20. aria_modules/cloud_database.py +10 -0
  21. aria_modules/game_install.py +1056 -0
  22. aria_modules/gemini_rest.py +102 -0
  23. aria_modules/haarcascade_frontalface_default.xml +33314 -0
  24. aria_modules/license_client.py +250 -0
  25. aria_modules/minibar_aria.py +355 -0
  26. aria_modules/tools.py +2295 -0
  27. aria_ui.py +818 -0
  28. camera_vision_module.py +1040 -0
  29. linux_extra.py +240 -0
  30. myra/__init__.py +10 -0
  31. myra/__main__.py +3 -0
  32. myra/cli.py +141 -0
  33. myra/config.py +22 -0
  34. myra_actions.py +327 -0
  35. myra_apps.py +846 -0
  36. myra_autostart.py +170 -0
  37. myra_coder_integration.py +641 -0
  38. myra_edge_glow.py +274 -0
  39. myra_float_orb.py +471 -0
  40. myra_guardian.py +181 -0
  41. myra_lang.py +133 -0
  42. myra_linux-0.1.0.dist-info/METADATA +99 -0
  43. myra_linux-0.1.0.dist-info/RECORD +80 -0
  44. myra_linux-0.1.0.dist-info/WHEEL +5 -0
  45. myra_linux-0.1.0.dist-info/entry_points.txt +3 -0
  46. myra_linux-0.1.0.dist-info/licenses/LICENSE +36 -0
  47. myra_linux-0.1.0.dist-info/top_level.txt +31 -0
  48. myra_linux_boot.py +207 -0
  49. myra_linux_tools.py +314 -0
  50. myra_pages.py +1246 -0
  51. myra_prefs.py +71 -0
  52. myra_quick_features.py +748 -0
  53. myra_slot.py +39 -0
  54. myra_splash.py +301 -0
  55. myra_spotify.py +316 -0
  56. myra_studio.py +916 -0
  57. myra_ui.py +1057 -0
  58. normal_prompt.py +41 -0
  59. prompt.py +252 -0
  60. screen_share_module.py +447 -0
  61. website_builder/__init__.py +5 -0
  62. website_builder/agents/__init__.py +1 -0
  63. website_builder/agents/content_agent.py +99 -0
  64. website_builder/agents/generator_agent.py +249 -0
  65. website_builder/agents/planner_agent.py +175 -0
  66. website_builder/config.py +48 -0
  67. website_builder/database/__init__.py +1 -0
  68. website_builder/database/projects_db.py +47 -0
  69. website_builder/deploy/__init__.py +1 -0
  70. website_builder/deploy/github_service.py +67 -0
  71. website_builder/deploy/qr_display.py +130 -0
  72. website_builder/deploy/vercel_service.py +71 -0
  73. website_builder/main.py +25 -0
  74. website_builder/preview/__init__.py +1 -0
  75. website_builder/preview/preview_server.py +47 -0
  76. website_builder/project/__init__.py +1 -0
  77. website_builder/project/project_manager.py +32 -0
  78. website_builder/webforge_integration.py +220 -0
  79. website_builder/webforge_manager.py +209 -0
  80. whatsapp_file_sender.py +661 -0
Main_normal.py ADDED
@@ -0,0 +1,261 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ MYRA ULTRA v8.0 — AI Assistant with MYRA Coder
4
+ - Straight to TITAN Window (no login / activation gate)
5
+ """
6
+ import sys, os, ctypes
7
+ from pathlib import Path
8
+
9
+ # Windows console/terminal codepage is often NOT UTF-8 (e.g. cp1252) -
10
+ # without this, the emoji prints in aria.py/camera_vision_module.py/etc.
11
+ # raise UnicodeEncodeError and crash their import (surfaces as
12
+ # "[ERROR] Failed to import aria" further down).
13
+ for _stream in (sys.stdout, sys.stderr):
14
+ try:
15
+ _stream.reconfigure(encoding="utf-8", errors="replace")
16
+ except Exception:
17
+ pass
18
+
19
+ # Ensure the app root is on sys.path so local modules can be imported from the exe or source tree.
20
+ _APP_ROOT = Path(__file__).resolve().parent
21
+ if str(_APP_ROOT) not in sys.path:
22
+ sys.path.insert(0, str(_APP_ROOT))
23
+
24
+ def _preload():
25
+ """Bhaari imports — splash chalte waqt background thread mein (taaki splash ka bar animate hota rahe)."""
26
+ try:
27
+ import website_builder
28
+ import camera_vision_module
29
+ import screen_share_module
30
+ import myra_coder_integration
31
+ print("[MYRA ULTRA] All modules loaded OK")
32
+ except Exception as e:
33
+ print(f"[NEW MODULES] Load warning: {e}")
34
+ try:
35
+ import aria # noqa: F401 — sabse bhaari import; yahin garam ho jata hai
36
+ except Exception as e:
37
+ print(f"[MYRA] preload aria: {e}")
38
+
39
+ try:
40
+ from PyQt5 import QtWebEngineWidgets # noqa: F401 — QApplication se PEHLE import hona zaroori (Website Studio live preview)
41
+ except Exception:
42
+ pass
43
+ from PyQt5.QtWidgets import QApplication, QMessageBox, QDialog
44
+ from PyQt5.QtCore import Qt, QTimer, QEventLoop
45
+ from PyQt5.QtGui import QColor, QPalette
46
+
47
+ try:
48
+ import myra_autostart as _autostart
49
+ except Exception as _e:
50
+ _autostart = None
51
+ print(f"[MYRA] autostart module not available: {_e}")
52
+
53
+ BG = "#050810"
54
+ BG2 = "#080d18"
55
+ BG3 = "#0d1525"
56
+ ACCENT = "#e8406a"
57
+ TEXT = "#e8eaf6"
58
+
59
+ user32 = ctypes.windll.user32
60
+
61
+
62
+ class TITANAppNormal:
63
+ def __init__(self, app: QApplication):
64
+ self.app = app
65
+ self._TITAN_win = None
66
+ self._login_win = None
67
+ self._user = {}
68
+ self._LogS = None
69
+ self._single = None # SingleInstance (dobara chalane par purani window khule)
70
+ self.splash = None # MyraSplash (startup progress)
71
+
72
+ def _run_preload(self):
73
+ """Imports background thread mein; main thread splash animate karta hai."""
74
+ import threading, time
75
+ th = threading.Thread(target=_preload, daemon=True, name="myra-preload")
76
+ th.start()
77
+ t0 = time.monotonic()
78
+ while th.is_alive():
79
+ self.app.processEvents()
80
+ if self.splash:
81
+ self.splash.set_progress(min(66.0, 5.0 + (time.monotonic() - t0) * 12.0))
82
+ time.sleep(0.01)
83
+ if self.splash:
84
+ self.splash.set_progress(70)
85
+
86
+ def start(self):
87
+ # Login page and access-key activation removed - launch straight
88
+ # into TITAN. self._user / self._LogS stay empty defaults;
89
+ # _launch_TITAN() and _save_msg() already handle that case.
90
+ os.environ.setdefault("TITAN_USER_UID", "default_user")
91
+ self._launch_TITAN()
92
+
93
+ def _launch_TITAN(self):
94
+ # Ab normal window close = app quit
95
+ self.app.setQuitOnLastWindowClosed(True)
96
+
97
+ self._run_preload()
98
+ try:
99
+ from aria import TITANWindow, _load_api_key, _save_config, ApiKeySetupDialog
100
+ except Exception as e:
101
+ print(f"[ERROR] Failed to import aria: {e}")
102
+ QMessageBox.critical(None, "Import Error",
103
+ f"Failed to load TITAN window:\n{str(e)}\n\nPlease check if all files are included in the EXE.")
104
+ return
105
+
106
+ # Load API key or show setup dialog
107
+ api_key = _load_api_key()
108
+ if not api_key:
109
+ print("[TITAN] No API key found - showing setup dialog")
110
+ if self.splash: self.splash.hide() # dialog splash ke peeche na chhupe
111
+ dlg = ApiKeySetupDialog()
112
+ _ok = dlg.exec_() == QDialog.Accepted
113
+ if self.splash: self.splash.show()
114
+ if _ok:
115
+ api_key = dlg.get_api_key()
116
+ if api_key:
117
+ _save_config(api_key)
118
+ print("[TITAN] API key saved")
119
+ else:
120
+ QMessageBox.critical(None, "API Key Error",
121
+ "API key is required to use TITAN.")
122
+ return
123
+ else:
124
+ return # User cancelled
125
+
126
+ name = (self._user.get("displayName","").strip()
127
+ or self._user.get("email","").split("@")[0].strip())
128
+ if name: name = name[0].upper() + name[1:]
129
+
130
+ if self.splash:
131
+ self.splash.set_progress(70); self.app.processEvents()
132
+ try:
133
+ import aria as _aria_mod
134
+ if self.splash: # window banne ke har stage par splash progress (repaint ke saath)
135
+ _aria_mod._startup_hook = lambda p, sp=self.splash: sp.jump(p)
136
+ try:
137
+ self._TITAN_win = TITANWindow(api_key)
138
+ finally:
139
+ _aria_mod._startup_hook = None
140
+ self._TITAN_win.setWindowTitle(f"MYRA ULTRA v8.0 — {name}" if name else "MYRA ULTRA v8.0")
141
+
142
+ try:
143
+ w = self._TITAN_win._worker
144
+ w.sig_user_msg.connect(lambda t: self._save_msg("user", t))
145
+ w.sig_TITAN_msg.connect(lambda t: self._save_msg("model", t))
146
+ except Exception:
147
+ pass
148
+
149
+ if self._single is not None and hasattr(self._TITAN_win, "_show_main"):
150
+ self._single.sig_show.connect(self._TITAN_win._show_main)
151
+
152
+ # --background (Windows startup): window nahi, sirf mini orb + tray. API key na ho to normal setup dikhao.
153
+ background = bool(_autostart and _autostart.is_background_launch() and api_key
154
+ and hasattr(self._TITAN_win, "start_in_background"))
155
+ if background:
156
+ self._TITAN_win.start_in_background()
157
+ print(f"[TITAN] Background mode (orb) | User: {name}")
158
+ else:
159
+ win = self._TITAN_win
160
+
161
+ def _reveal(): # splash bar 100% hone ke BAAD hi main window dikhegi
162
+ win.show()
163
+ win.raise_()
164
+ win.activateWindow()
165
+ try:
166
+ hwnd = int(win.winId())
167
+ user32.ShowWindow(hwnd, 9)
168
+ user32.SetForegroundWindow(hwnd)
169
+ except Exception:
170
+ pass
171
+ if hasattr(win, "first_run_setup"):
172
+ QTimer.singleShot(3500, win.first_run_setup)
173
+ if hasattr(win, "ask_name_if_missing"):
174
+ QTimer.singleShot(4500, win.ask_name_if_missing)
175
+ print(f"[TITAN] Window launched | User: {name}")
176
+
177
+ if self.splash:
178
+ self.splash.finish(on_full=_reveal) # 100% -> window dikhao -> splash fade-out
179
+ self._splash_keep, self.splash = self.splash, None # fade-out tak reference zinda rahe
180
+ else:
181
+ _reveal()
182
+ except Exception as e:
183
+ print(f"[ERROR] Failed to create TITAN window: {e}")
184
+ if self.splash: self.splash.hide()
185
+ QMessageBox.critical(None, "Window Error",
186
+ f"Failed to create TITAN window:\n{str(e)}")
187
+
188
+ def _save_msg(self, role, text):
189
+ try:
190
+ if self._LogS: self._LogS.save_message(role, text)
191
+ except Exception as e:
192
+ print(f"[Firebase] {e}")
193
+
194
+
195
+ def main():
196
+ # FIX (UI zoom): AA_EnableHighDpiScaling + Windows 125/150% scaling => Qt 5.15 scale factor ko 2.0 round kar deta tha,
197
+ # screen 960x540 "dikhti" thi aur 1440x880 ki window 2880x1760 px ban kar screen se bahar phail jaati thi.
198
+ # Ab 1:1 pixels (jaisa `python aria.py` mein tha). Bahut bade 4K screen par zoom chahiye to: set MYRA_HIDPI=1
199
+ try:
200
+ if os.environ.get("MYRA_HIDPI") == "1":
201
+ try:
202
+ QApplication.setHighDpiScaleFactorRoundingPolicy(Qt.HighDpiScaleFactorRoundingPolicy.PassThrough) # exact 1.5, 2.0 nahi
203
+ except Exception:
204
+ pass
205
+ QApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True)
206
+ else:
207
+ QApplication.setAttribute(Qt.AA_DisableHighDpiScaling, True)
208
+ QApplication.setAttribute(Qt.AA_UseHighDpiPixmaps, True)
209
+ except Exception:
210
+ pass
211
+
212
+ app = QApplication(sys.argv)
213
+ app.setStyle("Fusion")
214
+ app.setApplicationName("MYRA ULTRA")
215
+ # False — face auth window ke waqt app quit na ho
216
+ app.setQuitOnLastWindowClosed(False)
217
+
218
+ pal = QPalette()
219
+ pal.setColor(QPalette.Window, QColor(BG))
220
+ pal.setColor(QPalette.WindowText, QColor(TEXT))
221
+ pal.setColor(QPalette.Base, QColor(BG2))
222
+ pal.setColor(QPalette.AlternateBase, QColor(BG3))
223
+ pal.setColor(QPalette.Text, QColor(TEXT))
224
+ pal.setColor(QPalette.Button, QColor(BG3))
225
+ pal.setColor(QPalette.ButtonText, QColor(TEXT))
226
+ pal.setColor(QPalette.Highlight, QColor(ACCENT))
227
+ pal.setColor(QPalette.HighlightedText, QColor("#ffffff"))
228
+ app.setPalette(pal)
229
+
230
+ ctrl = TITANAppNormal(app)
231
+ if _autostart is not None:
232
+ if _autostart.handle_cli_flags(): # --install-startup / --uninstall-startup
233
+ sys.exit(0)
234
+ ctrl._single = _autostart.make_single_instance()
235
+ if not ctrl._single.acquire(): # MYRA pehle se chal rahi hai — usi ko window kholne ko bol diya
236
+ print("[MYRA] Pehle se chal rahi hai.")
237
+ sys.exit(0)
238
+ # ── startup splash (background/autostart mein nahi; MYRA_NO_SPLASH=1 ya prefs splash=false se band) ──
239
+ background = bool(_autostart and _autostart.is_background_launch())
240
+ try:
241
+ import myra_prefs
242
+ want = bool(myra_prefs.get("splash", True)) and not os.environ.get("MYRA_NO_SPLASH")
243
+ except Exception:
244
+ want = not os.environ.get("MYRA_NO_SPLASH")
245
+ if want and not background:
246
+ try:
247
+ import myra_ui
248
+ myra_ui.load_fonts()
249
+ from myra_splash import MyraSplash
250
+ ctrl.splash = MyraSplash()
251
+ ctrl.splash.show()
252
+ app.processEvents()
253
+ except Exception as e:
254
+ print(f"[MYRA] splash: {e}")
255
+ ctrl.splash = None
256
+ ctrl.start()
257
+ sys.exit(app.exec_())
258
+
259
+
260
+ if __name__ == "__main__":
261
+ main()