youclaw 4.6.8__py3-none-any.whl → 4.6.9__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 +37 -0
- youclaw/dashboard.py +14 -5
- {youclaw-4.6.8.dist-info → youclaw-4.6.9.dist-info}/METADATA +1 -1
- {youclaw-4.6.8.dist-info → youclaw-4.6.9.dist-info}/RECORD +8 -8
- {youclaw-4.6.8.dist-info → youclaw-4.6.9.dist-info}/LICENSE +0 -0
- {youclaw-4.6.8.dist-info → youclaw-4.6.9.dist-info}/WHEEL +0 -0
- {youclaw-4.6.8.dist-info → youclaw-4.6.9.dist-info}/entry_points.txt +0 -0
- {youclaw-4.6.8.dist-info → youclaw-4.6.9.dist-info}/top_level.txt +0 -0
youclaw/cli.py
CHANGED
|
@@ -390,6 +390,39 @@ class YouClawCLI:
|
|
|
390
390
|
print("\n👋 Dashboard stopped")
|
|
391
391
|
return 0
|
|
392
392
|
|
|
393
|
+
def cmd_uninstall(self, args):
|
|
394
|
+
"""Uninstall YouClaw"""
|
|
395
|
+
print("🦞 YouClaw Unmet protocol initiated...")
|
|
396
|
+
confirm = input("Are you sure you want to remove YouClaw configuration and data? (y/N): ").strip().lower()
|
|
397
|
+
if confirm != 'y':
|
|
398
|
+
print("❌ Cancelled.")
|
|
399
|
+
return 0
|
|
400
|
+
|
|
401
|
+
# Stop service
|
|
402
|
+
self.cmd_stop(args)
|
|
403
|
+
|
|
404
|
+
# Remove data
|
|
405
|
+
try:
|
|
406
|
+
import shutil
|
|
407
|
+
data_dir = self.project_dir / "data"
|
|
408
|
+
if data_dir.exists():
|
|
409
|
+
print(f"🗑️ Removing {data_dir}...")
|
|
410
|
+
shutil.rmtree(data_dir)
|
|
411
|
+
|
|
412
|
+
for file in ["youclaw.log", "bot_output.log", ".env"]:
|
|
413
|
+
fpath = Path(file)
|
|
414
|
+
if fpath.exists():
|
|
415
|
+
print(f"🗑️ Removing {fpath}...")
|
|
416
|
+
fpath.unlink()
|
|
417
|
+
|
|
418
|
+
print("\n✅ Data and configuration cleared.")
|
|
419
|
+
print("To complete the uninstallation, please run:")
|
|
420
|
+
print("\n pip uninstall youclaw\n")
|
|
421
|
+
return 0
|
|
422
|
+
except Exception as e:
|
|
423
|
+
print(f"❌ Error cleaning up: {e}")
|
|
424
|
+
return 1
|
|
425
|
+
|
|
393
426
|
def run(self):
|
|
394
427
|
"""Main CLI entry point"""
|
|
395
428
|
parser = argparse.ArgumentParser(
|
|
@@ -434,6 +467,9 @@ Examples:
|
|
|
434
467
|
dashboard_parser = subparsers.add_parser("dashboard", help="Start web dashboard")
|
|
435
468
|
dashboard_parser.add_argument("-p", "--port", type=int, default=8080, help="Dashboard port")
|
|
436
469
|
|
|
470
|
+
# Uninstall command
|
|
471
|
+
subparsers.add_parser("uninstall", help="Uninstall YouClaw and clean up data")
|
|
472
|
+
|
|
437
473
|
args = parser.parse_args()
|
|
438
474
|
|
|
439
475
|
if not args.command:
|
|
@@ -450,6 +486,7 @@ Examples:
|
|
|
450
486
|
"stop": self.cmd_stop,
|
|
451
487
|
"restart": self.cmd_restart,
|
|
452
488
|
"dashboard": self.cmd_dashboard,
|
|
489
|
+
"uninstall": self.cmd_uninstall,
|
|
453
490
|
}
|
|
454
491
|
|
|
455
492
|
if args.command in command_map:
|
youclaw/dashboard.py
CHANGED
|
@@ -141,6 +141,17 @@ async def api_stats(request):
|
|
|
141
141
|
total_messages = (await cursor.fetchone())[0]
|
|
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
|
+
|
|
145
|
+
# Calculate uptime
|
|
146
|
+
import time, psutil, os
|
|
147
|
+
try:
|
|
148
|
+
process = psutil.Process(os.getpid())
|
|
149
|
+
uptime_seconds = time.time() - process.create_time()
|
|
150
|
+
hours = int(uptime_seconds // 3600)
|
|
151
|
+
minutes = int((uptime_seconds % 3600) // 60)
|
|
152
|
+
uptime_str = f"{hours}h {minutes}m"
|
|
153
|
+
except:
|
|
154
|
+
uptime_str = "0h 0m"
|
|
144
155
|
|
|
145
156
|
from personality_manager import PERSONALITIES, DEFAULT_PERSONALITY
|
|
146
157
|
active_p = await memory_manager.get_global_setting("active_personality", DEFAULT_PERSONALITY)
|
|
@@ -153,11 +164,9 @@ async def api_stats(request):
|
|
|
153
164
|
|
|
154
165
|
stats = {
|
|
155
166
|
"status": "online",
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
"ollama_status": "online" if ollama_health else "offline",
|
|
160
|
-
"model": ollama_client.model,
|
|
167
|
+
"uptime": uptime_str,
|
|
168
|
+
"ollama_connected": ollama_health,
|
|
169
|
+
"ollama_model": ollama_client.model if ollama_health else "Disconnected (Check URL)",
|
|
161
170
|
"telegram_enabled": config.telegram.enabled,
|
|
162
171
|
"discord_enabled": config.discord.enabled,
|
|
163
172
|
"timestamp": datetime.now().isoformat(),
|
|
@@ -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=
|
|
3
|
+
youclaw/cli.py,sha256=qgKYY66Ddi76RF9Oz0xGk-eM-mXQrESr4Ohf5jGd5XE,18234
|
|
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=
|
|
7
|
+
youclaw/dashboard.py,sha256=tyEg9iYfifczHEmmNsKgWJxS-yMmDkH46mKdpuPvgo4,68891
|
|
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.6.
|
|
20
|
-
youclaw-4.6.
|
|
21
|
-
youclaw-4.6.
|
|
22
|
-
youclaw-4.6.
|
|
23
|
-
youclaw-4.6.
|
|
24
|
-
youclaw-4.6.
|
|
19
|
+
youclaw-4.6.9.dist-info/LICENSE,sha256=2p_ENMOp0sRMAVx7k1vauyHfQk7npVn1J99Re-LXY6o,1062
|
|
20
|
+
youclaw-4.6.9.dist-info/METADATA,sha256=Ei5dTcTL_XtnK0Q30sT3VE1DbuBJ_zQDCjiH5-aGSVU,3485
|
|
21
|
+
youclaw-4.6.9.dist-info/WHEEL,sha256=hPN0AlP2dZM_3ZJZWP4WooepkmU9wzjGgCLCeFjkHLA,92
|
|
22
|
+
youclaw-4.6.9.dist-info/entry_points.txt,sha256=TCRvZ6l9mCoPRBAyCwRzupie6FozD-2r540ILLLkiI0,45
|
|
23
|
+
youclaw-4.6.9.dist-info/top_level.txt,sha256=q_WatC9Fthh_kLowtWqF7HeslKTJNKNjaWU5yxgo9Lk,8
|
|
24
|
+
youclaw-4.6.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|