youclaw 4.7.0__py3-none-any.whl → 4.7.2__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.
youclaw/cli.py CHANGED
@@ -150,26 +150,11 @@ class YouClawCLI:
150
150
  # Check if process is actually running
151
151
  os.kill(pid, 0)
152
152
 
153
- # Get process info
154
- import psutil
155
- try:
156
- process = psutil.Process(pid)
157
- uptime_seconds = time.time() - process.create_time()
158
- hours = int(uptime_seconds // 3600)
159
- minutes = int((uptime_seconds % 3600) // 60)
160
-
161
- print(f"Status: ✅ Running")
162
- print(f"PID: {pid}")
163
- print(f"Uptime: {hours}h {minutes}m")
164
- print(f"Memory: {process.memory_info().rss / 1024 / 1024:.1f} MB")
165
- print(f"\n🔗 Dashboard: http://localhost:8080")
166
- return 0
167
- except ImportError:
168
- # psutil not available, basic info only
169
- print(f"Status: ✅ Running")
170
- print(f"PID: {pid}")
171
- print(f"\n🔗 Dashboard: http://localhost:8080")
172
- return 0
153
+ # Basic info only (simplified for reliability)
154
+ print(f"Status: ✅ Running")
155
+ print(f"PID: {pid}")
156
+ print(f"\\n🔗 Dashboard: http://localhost:8080")
157
+ return 0
173
158
 
174
159
  except (ProcessLookupError, ValueError):
175
160
  print("Status: ⚠️ Dead (PID file exists but process not found)")
@@ -203,46 +188,52 @@ class YouClawCLI:
203
188
 
204
189
  print("[!] Tip: Press ENTER to skip any step and configure later via Dashboard.\n")
205
190
 
191
+ # Helper to clean input (remove comments)
192
+ def clean_input(prompt, default=None):
193
+ val = input(prompt).strip()
194
+ if '#' in val: val = val.split('#')[0].strip()
195
+ return val or default
196
+
206
197
  # 🤖 Ollama Configuration
207
198
  print("🤖 Ollama AI Engine Configuration")
208
- ollama_host = input(" - Ollama Host URL (default: http://localhost:11434): ").strip() or "http://localhost:11434"
209
- ollama_model = input(" - Ollama Model (default: qwen2.5:1.5b-instruct): ").strip() or "qwen2.5:1.5b-instruct"
199
+ ollama_host = clean_input(" - Ollama Host URL (default: http://localhost:11434): ", "http://localhost:11434")
200
+ ollama_model = clean_input(" - Ollama Model (default: qwen2.5:1.5b-instruct): ", "qwen2.5:1.5b-instruct")
210
201
 
211
202
  # 🛰️ Telegram Setup
212
203
  print("\n🛰️ Telegram Bot Setup")
213
- tg_token = input(" - Bot Token (from @BotFather): ").strip()
204
+ tg_token = clean_input(" - Bot Token (from @BotFather): ", "")
214
205
 
215
206
  # 💬 Discord Setup
216
207
  print("\n💬 Discord Bot Setup")
217
- dc_token = input(" - Bot Token (from Discord Dev Portal): ").strip()
208
+ dc_token = clean_input(" - Bot Token (from Discord Dev Portal): ", "")
218
209
 
219
210
  # 🔍 Search Engine Setup
220
211
  print("\n🔍 Neural Search Engine")
221
- search_url = input(" - Search URL (e.g. http://ip:8080/search): ").strip()
212
+ search_url = clean_input(" - Search URL (e.g. http://ip:8080/search): ", "")
222
213
 
223
214
  # 📧 Email Setup
224
215
  print("\n📧 Email Link Protocol")
225
- email_user = input(" - Email Address: ").strip()
226
- email_pass = input(" - App Password (not your login password!): ").strip()
227
- email_imap = input(" - IMAP Host (default: imap.gmail.com): ").strip() or "imap.gmail.com"
228
- email_smtp = input(" - SMTP Host (default: smtp.gmail.com): ").strip() or "smtp.gmail.com"
216
+ email_user = clean_input(" - Email Address: ", "")
217
+ email_pass = clean_input(" - App Password (not your login password!): ", "")
218
+ email_imap = clean_input(" - IMAP Host (default: imap.gmail.com): ", "imap.gmail.com")
219
+ email_smtp = clean_input(" - SMTP Host (default: smtp.gmail.com): ", "smtp.gmail.com")
229
220
 
230
- # Write to .env
221
+ # Write to .env with proper quoting
231
222
  env_path = Path(".env")
232
223
  env_content = [
233
224
  "# YouClaw Managed Configuration",
234
- f"OLLAMA_HOST={ollama_host}",
235
- f"OLLAMA_MODEL={ollama_model}",
236
- f"TELEGRAM_BOT_TOKEN={tg_token or ''}",
237
- f"ENABLE_TELEGRAM={'true' if tg_token else 'false'}",
238
- f"DISCORD_BOT_TOKEN={dc_token or ''}",
239
- f"ENABLE_DISCORD={'true' if dc_token else 'false'}",
240
- f"SEARCH_ENGINE_URL={search_url or 'http://localhost:8080/search'}",
241
- f"EMAIL_USER={email_user or ''}",
242
- f"EMAIL_PASSWORD={email_pass or ''}",
243
- f"EMAIL_IMAP_HOST={email_imap}",
244
- f"EMAIL_SMTP_HOST={email_smtp}",
245
- f"ENABLE_EMAIL={'true' if email_user else 'false'}",
225
+ f'OLLAMA_HOST="{ollama_host}"',
226
+ f'OLLAMA_MODEL="{ollama_model}"',
227
+ f'TELEGRAM_BOT_TOKEN="{tg_token}"',
228
+ f'ENABLE_TELEGRAM="{"true" if tg_token else "false"}"',
229
+ f'DISCORD_BOT_TOKEN="{dc_token}"',
230
+ f'ENABLE_DISCORD="{"true" if dc_token else "false"}"',
231
+ f'SEARCH_ENGINE_URL="{search_url or "http://localhost:8080/search"}"',
232
+ f'EMAIL_USER="{email_user}"',
233
+ f'EMAIL_PASSWORD="{email_pass}"',
234
+ f'EMAIL_IMAP_HOST="{email_imap}"',
235
+ f'EMAIL_SMTP_HOST="{email_smtp}"',
236
+ f'ENABLE_EMAIL="{"true" if email_user else "false"}"',
246
237
  "DATABASE_PATH=./data/bot.db",
247
238
  "ADMIN_USER_IDENTITY=telegram:default"
248
239
  ]
youclaw/dashboard.py CHANGED
@@ -174,7 +174,8 @@ async def api_stats(request):
174
174
  "total_messages": total_messages,
175
175
  "unique_users": unique_users,
176
176
  "active_personality": personality_name,
177
- "user_identity": f"{platform}:{user_id}" if user_id else "Guest"
177
+ "user_identity": f"{platform}:{user_id}" if user_id else "Guest",
178
+ "is_admin": is_admin
178
179
  }
179
180
 
180
181
  if is_admin:
@@ -489,7 +490,7 @@ DASHBOARD_HTML = """
489
490
  <head>
490
491
  <meta charset="UTF-8">
491
492
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
492
- <title>YouClaw V4.7.0 | Justice Neural Hub 🦞</title>
493
+ <title>YouClaw V4.7.2 | Justice Neural Hub 🦞</title>
493
494
  <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
494
495
  <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
495
496
  <style>
@@ -782,7 +783,7 @@ DASHBOARD_HTML = """
782
783
  <!-- Sidebar Navigation -->
783
784
  <nav class="sidebar" id="app-sidebar" style="display: none;">
784
785
  <div>
785
- <div class="sidebar-logo">🦞 YOUCLAW <span style="font-size: 0.6rem; color: var(--primary);">V4.7.0</span></div>
786
+ <div class="sidebar-logo">🦞 YOUCLAW <span style="font-size: 0.6rem; color: var(--primary);">V4.7.2</span></div>
786
787
  <div class="nav-list">
787
788
  <div class="nav-item active" id="nav-dash" onclick="switchView('dashboard')"><i>📊</i> Control Center</div>
788
789
  <div class="nav-item" id="nav-chat" onclick="switchView('chat')"><i>💬</i> Neural Terminal</div>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: youclaw
3
- Version: 4.7.0
3
+ Version: 4.7.2
4
4
  Summary: Your Personal AI Assistant - Universal Neural Core
5
5
  Author-email: Imran <imran@example.com>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -1,10 +1,10 @@
1
1
  youclaw/__init__.py,sha256=O-gFt_L-TungI3JyIY56YGTiizaIjpKKTWBVAWToqmg,539
2
2
  youclaw/bot.py,sha256=-kpw0AE4svBrdz0ZpcJIZi-ZQT1yy_mXIcpRKqei6r4,5931
3
- youclaw/cli.py,sha256=qgKYY66Ddi76RF9Oz0xGk-eM-mXQrESr4Ohf5jGd5XE,18234
3
+ youclaw/cli.py,sha256=ZIaxPAGcctMZJBx6Vhw490YQ0wtqrsuJaxJw_EpA_RM,17805
4
4
  youclaw/commands.py,sha256=ljexFjbRoTyZmGKswLzOXa03WocuCzYzCYE8A08WbzE,5401
5
5
  youclaw/config.py,sha256=FayDGLQLNLBm0O9QuzBjM1gO2MiJ57cnqB6aBwUWSXw,6633
6
6
  youclaw/core_skills.py,sha256=AyoBq3LqTiwsNvVehi4T7RMGtd1J-lI-YL_owuj5ZUQ,9227
7
- youclaw/dashboard.py,sha256=4wLo1aUg0x8nDERCP16iYFyOzf_t0M_T0tfYBmNNc-g,70938
7
+ youclaw/dashboard.py,sha256=6vOPckX5fWAc829zsU0YXCe-wFjfs3QT3qqlHoZNzmA,70972
8
8
  youclaw/discord_handler.py,sha256=L3bsptg2gtpXm_HOcqmHrT45KqshnAkBXzM0S6I1o2g,7184
9
9
  youclaw/env_manager.py,sha256=uvR5ix7hB8gyv6yStRfq6s7o-ALw-dead81GI8u0CPE,1867
10
10
  youclaw/main.py,sha256=5hk17gusRviT1LpAEQ1uUZFZmmmf2tpiJ8OFoF5mflA,9090
@@ -16,9 +16,9 @@ youclaw/search_client.py,sha256=fSbflx5nclGhMfFxNScaNM15RKxO_dQbCgtId7Ggmjk,2984
16
16
  youclaw/skills_manager.py,sha256=useUV9eLY_sFULY1jHNjyD_VteU-aN8Lw6OKqdnuZNc,5183
17
17
  youclaw/telegram_handler.py,sha256=is34s3QPtJyph5HfBb_Xw6dUCzOJb2NXqt3ylApX96E,6288
18
18
  youclaw/vector_manager.py,sha256=IYIVijCEUbJq_tZ5w_E9n0O6vCaXBCaKpuQiKoDuBc8,3391
19
- youclaw-4.7.0.dist-info/LICENSE,sha256=2p_ENMOp0sRMAVx7k1vauyHfQk7npVn1J99Re-LXY6o,1062
20
- youclaw-4.7.0.dist-info/METADATA,sha256=KDZxukQvDxs2LkU14atRnugA0WUJEznvIsJlW4XXE8Y,3485
21
- youclaw-4.7.0.dist-info/WHEEL,sha256=hPN0AlP2dZM_3ZJZWP4WooepkmU9wzjGgCLCeFjkHLA,92
22
- youclaw-4.7.0.dist-info/entry_points.txt,sha256=TCRvZ6l9mCoPRBAyCwRzupie6FozD-2r540ILLLkiI0,45
23
- youclaw-4.7.0.dist-info/top_level.txt,sha256=q_WatC9Fthh_kLowtWqF7HeslKTJNKNjaWU5yxgo9Lk,8
24
- youclaw-4.7.0.dist-info/RECORD,,
19
+ youclaw-4.7.2.dist-info/LICENSE,sha256=2p_ENMOp0sRMAVx7k1vauyHfQk7npVn1J99Re-LXY6o,1062
20
+ youclaw-4.7.2.dist-info/METADATA,sha256=k1LjXov6Y7SGX7lXHae_kslcojpMCGB9A_NmsnOcFGI,3485
21
+ youclaw-4.7.2.dist-info/WHEEL,sha256=hPN0AlP2dZM_3ZJZWP4WooepkmU9wzjGgCLCeFjkHLA,92
22
+ youclaw-4.7.2.dist-info/entry_points.txt,sha256=TCRvZ6l9mCoPRBAyCwRzupie6FozD-2r540ILLLkiI0,45
23
+ youclaw-4.7.2.dist-info/top_level.txt,sha256=q_WatC9Fthh_kLowtWqF7HeslKTJNKNjaWU5yxgo9Lk,8
24
+ youclaw-4.7.2.dist-info/RECORD,,