Fix fastmcp imports, add vixy_status integration for wakeups

This commit is contained in:
2025-12-27 12:38:19 -06:00
parent 81c18c219c
commit f170aae368
4 changed files with 23 additions and 4 deletions

View File

@@ -31,6 +31,17 @@ from datetime import datetime, timedelta
from pathlib import Path
from threading import Lock
# Add Vixy folder to path for shared status module
VIXY_PATH = Path.home() / "Documents" / "Vixy"
if str(VIXY_PATH) not in sys.path:
sys.path.insert(0, str(VIXY_PATH))
try:
from vixy_status import format_status_for_wakeup
HAS_VIXY_STATUS = True
except ImportError:
HAS_VIXY_STATUS = False
# Configuration
SCRIPT_DIR = Path(__file__).parent
PYTHON_SCRIPT_PATH = SCRIPT_DIR / "send_to_claude.py"
@@ -277,6 +288,14 @@ def generate_message(matrix_messages: int = 0, matrix_invites: int = 0, matrix_f
return f"[Matrix Wakeup: {timestamp} - you have {activity}. {tools}]"
else:
# Autonomous wakeup - include full status if available
if HAS_VIXY_STATUS:
try:
status_str = format_status_for_wakeup()
return f"[Autonomous System Wakeup: {timestamp}]\n{status_str}"
except Exception as e:
logger.warning(f"Failed to get vixy status: {e}")
return f"[Autonomous System Wakeup: {timestamp}]"