youclaw 4.6.11__tar.gz → 4.7.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.
- {youclaw-4.6.11/src/youclaw.egg-info → youclaw-4.7.1}/PKG-INFO +1 -1
- {youclaw-4.6.11 → youclaw-4.7.1}/pyproject.toml +1 -1
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw/cli.py +33 -42
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw/dashboard.py +41 -4
- {youclaw-4.6.11 → youclaw-4.7.1/src/youclaw.egg-info}/PKG-INFO +1 -1
- {youclaw-4.6.11 → youclaw-4.7.1}/LICENSE +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/MANIFEST.in +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/README.md +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/setup.cfg +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw/__init__.py +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw/bot.py +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw/commands.py +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw/config.py +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw/core_skills.py +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw/discord_handler.py +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw/env_manager.py +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw/main.py +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw/memory_manager.py +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw/ollama_client.py +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw/personality_manager.py +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw/scheduler_manager.py +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw/search_client.py +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw/skills_manager.py +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw/telegram_handler.py +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw/vector_manager.py +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw.egg-info/SOURCES.txt +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw.egg-info/dependency_links.txt +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw.egg-info/entry_points.txt +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw.egg-info/requires.txt +0 -0
- {youclaw-4.6.11 → youclaw-4.7.1}/src/youclaw.egg-info/top_level.txt +0 -0
|
@@ -150,26 +150,11 @@ class YouClawCLI:
|
|
|
150
150
|
# Check if process is actually running
|
|
151
151
|
os.kill(pid, 0)
|
|
152
152
|
|
|
153
|
-
#
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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 =
|
|
209
|
-
ollama_model =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
226
|
-
email_pass =
|
|
227
|
-
email_imap =
|
|
228
|
-
email_smtp =
|
|
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
|
|
235
|
-
f
|
|
236
|
-
f
|
|
237
|
-
f
|
|
238
|
-
f
|
|
239
|
-
f
|
|
240
|
-
f
|
|
241
|
-
f
|
|
242
|
-
f
|
|
243
|
-
f
|
|
244
|
-
f
|
|
245
|
-
f
|
|
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
|
]
|
|
@@ -318,6 +318,7 @@ async def api_get_env(request):
|
|
|
318
318
|
"telegram_token": env_vars.get("TELEGRAM_BOT_TOKEN", ""),
|
|
319
319
|
"discord_token": env_vars.get("DISCORD_BOT_TOKEN", ""),
|
|
320
320
|
"search_url": config.search_url,
|
|
321
|
+
"ollama_url": config.ollama.host,
|
|
321
322
|
"email": {
|
|
322
323
|
"imap_host": config.email.imap_host,
|
|
323
324
|
"imap_port": config.email.imap_port,
|
|
@@ -349,6 +350,22 @@ async def api_save_system_secrets(request):
|
|
|
349
350
|
val = data['search_url']
|
|
350
351
|
env_manager.set_key("SEARCH_ENGINE_URL", val)
|
|
351
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"
|
|
352
369
|
|
|
353
370
|
# Email Secrets
|
|
354
371
|
if 'email' in data:
|
|
@@ -364,7 +381,9 @@ async def api_save_system_secrets(request):
|
|
|
364
381
|
|
|
365
382
|
bot_instance = request.app.get('bot')
|
|
366
383
|
if bot_instance: asyncio.create_task(bot_instance.restart_handlers())
|
|
367
|
-
|
|
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})
|
|
368
387
|
except Exception as e:
|
|
369
388
|
return web.json_response({"error": str(e)}, status=500)
|
|
370
389
|
|
|
@@ -470,7 +489,7 @@ DASHBOARD_HTML = """
|
|
|
470
489
|
<head>
|
|
471
490
|
<meta charset="UTF-8">
|
|
472
491
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
473
|
-
<title>YouClaw V4.7 | Justice Neural Hub 🦞</title>
|
|
492
|
+
<title>YouClaw V4.7.0 | Justice Neural Hub 🦞</title>
|
|
474
493
|
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
|
|
475
494
|
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
476
495
|
<style>
|
|
@@ -763,7 +782,7 @@ DASHBOARD_HTML = """
|
|
|
763
782
|
<!-- Sidebar Navigation -->
|
|
764
783
|
<nav class="sidebar" id="app-sidebar" style="display: none;">
|
|
765
784
|
<div>
|
|
766
|
-
<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>
|
|
767
786
|
<div class="nav-list">
|
|
768
787
|
<div class="nav-item active" id="nav-dash" onclick="switchView('dashboard')"><i>📊</i> Control Center</div>
|
|
769
788
|
<div class="nav-item" id="nav-chat" onclick="switchView('chat')"><i>💬</i> Neural Terminal</div>
|
|
@@ -802,6 +821,15 @@ DASHBOARD_HTML = """
|
|
|
802
821
|
</div>
|
|
803
822
|
</div>
|
|
804
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
|
+
|
|
805
833
|
<div class="card" style="grid-column: span 6;">
|
|
806
834
|
<div class="card-title">🌐 Platform Connectivity</div>
|
|
807
835
|
<div style="display: flex; flex-direction: column; gap: 24px;">
|
|
@@ -1254,6 +1282,7 @@ DASHBOARD_HTML = """
|
|
|
1254
1282
|
document.getElementById('vault-tg').value = data.telegram_token || "";
|
|
1255
1283
|
document.getElementById('vault-dc').value = data.discord_token || "";
|
|
1256
1284
|
document.getElementById('vault-search').value = data.search_url || "";
|
|
1285
|
+
document.getElementById('vault-ollama').value = data.ollama_url || "";
|
|
1257
1286
|
|
|
1258
1287
|
if(data.email) {
|
|
1259
1288
|
document.getElementById('toggle-email').checked = data.email.enabled;
|
|
@@ -1311,6 +1340,7 @@ DASHBOARD_HTML = """
|
|
|
1311
1340
|
telegram_token: document.getElementById('vault-tg').value,
|
|
1312
1341
|
discord_token: document.getElementById('vault-dc').value,
|
|
1313
1342
|
search_url: document.getElementById('vault-search').value,
|
|
1343
|
+
ollama_url: document.getElementById('vault-ollama').value,
|
|
1314
1344
|
email: {
|
|
1315
1345
|
imap_host: document.getElementById('vault-imap-host').value,
|
|
1316
1346
|
imap_port: parseInt(document.getElementById('vault-imap-port').value),
|
|
@@ -1320,7 +1350,14 @@ DASHBOARD_HTML = """
|
|
|
1320
1350
|
password: document.getElementById('vault-email-pass').value
|
|
1321
1351
|
}
|
|
1322
1352
|
});
|
|
1323
|
-
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
|
+
}
|
|
1324
1361
|
btn.innerText = "Apply Changes"; btn.disabled = false;
|
|
1325
1362
|
}
|
|
1326
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
|