youclaw 4.6.10__tar.gz → 4.7.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.
- {youclaw-4.6.10/src/youclaw.egg-info → youclaw-4.7.0}/PKG-INFO +1 -1
- {youclaw-4.6.10 → youclaw-4.7.0}/pyproject.toml +1 -1
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw/dashboard.py +51 -13
- {youclaw-4.6.10 → youclaw-4.7.0/src/youclaw.egg-info}/PKG-INFO +1 -1
- {youclaw-4.6.10 → youclaw-4.7.0}/LICENSE +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/MANIFEST.in +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/README.md +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/setup.cfg +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw/__init__.py +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw/bot.py +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw/cli.py +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw/commands.py +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw/config.py +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw/core_skills.py +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw/discord_handler.py +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw/env_manager.py +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw/main.py +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw/memory_manager.py +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw/ollama_client.py +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw/personality_manager.py +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw/scheduler_manager.py +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw/search_client.py +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw/skills_manager.py +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw/telegram_handler.py +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw/vector_manager.py +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw.egg-info/SOURCES.txt +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw.egg-info/dependency_links.txt +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw.egg-info/entry_points.txt +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw.egg-info/requires.txt +0 -0
- {youclaw-4.6.10 → youclaw-4.7.0}/src/youclaw.egg-info/top_level.txt +0 -0
|
@@ -142,23 +142,24 @@ async def api_stats(request):
|
|
|
142
142
|
async with memory_manager.db.execute("SELECT COUNT(DISTINCT user_id) FROM conversations") as cursor:
|
|
143
143
|
unique_users = (await cursor.fetchone())[0]
|
|
144
144
|
|
|
145
|
-
# Calculate uptime
|
|
146
|
-
import time,
|
|
145
|
+
# Calculate uptime (simplified to avoid psutil issues)
|
|
146
|
+
import time, os
|
|
147
147
|
try:
|
|
148
|
-
process
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
uptime_str = f"{hours}h {minutes}m"
|
|
148
|
+
# Just show process start time relative to now if possible,
|
|
149
|
+
# but without psutil we can't easily get start time cross-platform.
|
|
150
|
+
# We will skip uptime or assume 0 for stability.
|
|
151
|
+
uptime_str = "Running"
|
|
153
152
|
except:
|
|
154
|
-
uptime_str = "
|
|
153
|
+
uptime_str = "Unknown"
|
|
155
154
|
|
|
156
155
|
from personality_manager import PERSONALITIES, DEFAULT_PERSONALITY
|
|
157
156
|
active_p = await memory_manager.get_global_setting("active_personality", DEFAULT_PERSONALITY)
|
|
158
157
|
personality_name = PERSONALITIES.get(active_p, PERSONALITIES[DEFAULT_PERSONALITY])['name']
|
|
159
158
|
|
|
160
159
|
try:
|
|
161
|
-
|
|
160
|
+
import asyncio
|
|
161
|
+
# Force 3-second timeout for dashboard responsiveness
|
|
162
|
+
ollama_health = await asyncio.wait_for(ollama_client.check_health(), timeout=2.0)
|
|
162
163
|
except:
|
|
163
164
|
ollama_health = False
|
|
164
165
|
|
|
@@ -317,6 +318,7 @@ async def api_get_env(request):
|
|
|
317
318
|
"telegram_token": env_vars.get("TELEGRAM_BOT_TOKEN", ""),
|
|
318
319
|
"discord_token": env_vars.get("DISCORD_BOT_TOKEN", ""),
|
|
319
320
|
"search_url": config.search_url,
|
|
321
|
+
"ollama_url": config.ollama.host,
|
|
320
322
|
"email": {
|
|
321
323
|
"imap_host": config.email.imap_host,
|
|
322
324
|
"imap_port": config.email.imap_port,
|
|
@@ -348,6 +350,22 @@ async def api_save_system_secrets(request):
|
|
|
348
350
|
val = data['search_url']
|
|
349
351
|
env_manager.set_key("SEARCH_ENGINE_URL", val)
|
|
350
352
|
await memory_manager.set_global_setting("search_url", val)
|
|
353
|
+
|
|
354
|
+
ollama_status = "unchanged"
|
|
355
|
+
if 'ollama_url' in data:
|
|
356
|
+
val = data['ollama_url']
|
|
357
|
+
env_manager.set_key("OLLAMA_HOST", val)
|
|
358
|
+
await memory_manager.set_global_setting("ollama_host", val)
|
|
359
|
+
|
|
360
|
+
# Instant validation
|
|
361
|
+
await config.refresh_from_db()
|
|
362
|
+
await ollama_client.initialize() # Re-init with new URL
|
|
363
|
+
try:
|
|
364
|
+
import asyncio
|
|
365
|
+
is_online = await asyncio.wait_for(ollama_client.check_health(), timeout=2.0)
|
|
366
|
+
ollama_status = "online" if is_online else "offline"
|
|
367
|
+
except:
|
|
368
|
+
ollama_status = "offline"
|
|
351
369
|
|
|
352
370
|
# Email Secrets
|
|
353
371
|
if 'email' in data:
|
|
@@ -363,7 +381,9 @@ async def api_save_system_secrets(request):
|
|
|
363
381
|
|
|
364
382
|
bot_instance = request.app.get('bot')
|
|
365
383
|
if bot_instance: asyncio.create_task(bot_instance.restart_handlers())
|
|
366
|
-
|
|
384
|
+
bot_instance = request.app.get('bot')
|
|
385
|
+
if bot_instance: asyncio.create_task(bot_instance.restart_handlers())
|
|
386
|
+
return web.json_response({"success": True, "ollama_status": ollama_status})
|
|
367
387
|
except Exception as e:
|
|
368
388
|
return web.json_response({"error": str(e)}, status=500)
|
|
369
389
|
|
|
@@ -469,7 +489,7 @@ DASHBOARD_HTML = """
|
|
|
469
489
|
<head>
|
|
470
490
|
<meta charset="UTF-8">
|
|
471
491
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
472
|
-
<title>YouClaw V4.7 | Justice Neural Hub 🦞</title>
|
|
492
|
+
<title>YouClaw V4.7.0 | Justice Neural Hub 🦞</title>
|
|
473
493
|
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
|
|
474
494
|
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
475
495
|
<style>
|
|
@@ -762,7 +782,7 @@ DASHBOARD_HTML = """
|
|
|
762
782
|
<!-- Sidebar Navigation -->
|
|
763
783
|
<nav class="sidebar" id="app-sidebar" style="display: none;">
|
|
764
784
|
<div>
|
|
765
|
-
<div class="sidebar-logo">🦞 YOUCLAW <span style="font-size: 0.6rem; color: var(--primary);">V4.
|
|
785
|
+
<div class="sidebar-logo">🦞 YOUCLAW <span style="font-size: 0.6rem; color: var(--primary);">V4.7.0</span></div>
|
|
766
786
|
<div class="nav-list">
|
|
767
787
|
<div class="nav-item active" id="nav-dash" onclick="switchView('dashboard')"><i>📊</i> Control Center</div>
|
|
768
788
|
<div class="nav-item" id="nav-chat" onclick="switchView('chat')"><i>💬</i> Neural Terminal</div>
|
|
@@ -801,6 +821,15 @@ DASHBOARD_HTML = """
|
|
|
801
821
|
</div>
|
|
802
822
|
</div>
|
|
803
823
|
|
|
824
|
+
<div class="card" style="grid-column: span 6;">
|
|
825
|
+
<div class="card-title">🧠 Neural Core Configuration</div>
|
|
826
|
+
<div class="input-group">
|
|
827
|
+
<span class="input-label">Ollama Host URL</span>
|
|
828
|
+
<input type="text" id="vault-ollama" class="text-input" placeholder="http://localhost:11434">
|
|
829
|
+
</div>
|
|
830
|
+
<div style="font-size: 0.8rem; color: var(--text-dim); margin-top: -10px;">Changing this will instantly verify connectivity.</div>
|
|
831
|
+
</div>
|
|
832
|
+
|
|
804
833
|
<div class="card" style="grid-column: span 6;">
|
|
805
834
|
<div class="card-title">🌐 Platform Connectivity</div>
|
|
806
835
|
<div style="display: flex; flex-direction: column; gap: 24px;">
|
|
@@ -1253,6 +1282,7 @@ DASHBOARD_HTML = """
|
|
|
1253
1282
|
document.getElementById('vault-tg').value = data.telegram_token || "";
|
|
1254
1283
|
document.getElementById('vault-dc').value = data.discord_token || "";
|
|
1255
1284
|
document.getElementById('vault-search').value = data.search_url || "";
|
|
1285
|
+
document.getElementById('vault-ollama').value = data.ollama_url || "";
|
|
1256
1286
|
|
|
1257
1287
|
if(data.email) {
|
|
1258
1288
|
document.getElementById('toggle-email').checked = data.email.enabled;
|
|
@@ -1310,6 +1340,7 @@ DASHBOARD_HTML = """
|
|
|
1310
1340
|
telegram_token: document.getElementById('vault-tg').value,
|
|
1311
1341
|
discord_token: document.getElementById('vault-dc').value,
|
|
1312
1342
|
search_url: document.getElementById('vault-search').value,
|
|
1343
|
+
ollama_url: document.getElementById('vault-ollama').value,
|
|
1313
1344
|
email: {
|
|
1314
1345
|
imap_host: document.getElementById('vault-imap-host').value,
|
|
1315
1346
|
imap_port: parseInt(document.getElementById('vault-imap-port').value),
|
|
@@ -1319,7 +1350,14 @@ DASHBOARD_HTML = """
|
|
|
1319
1350
|
password: document.getElementById('vault-email-pass').value
|
|
1320
1351
|
}
|
|
1321
1352
|
});
|
|
1322
|
-
if(res.success)
|
|
1353
|
+
if(res.success) {
|
|
1354
|
+
let msg = "Vault updated.";
|
|
1355
|
+
if(res.ollama_status !== "unchanged") {
|
|
1356
|
+
msg += " AI Core Status: " + res.ollama_status.toUpperCase();
|
|
1357
|
+
}
|
|
1358
|
+
alert(msg);
|
|
1359
|
+
updateDashboard();
|
|
1360
|
+
}
|
|
1323
1361
|
btn.innerText = "Apply Changes"; btn.disabled = false;
|
|
1324
1362
|
}
|
|
1325
1363
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|