1. Momentum cliff at 10 messages (P0): The conversation momentum formula
had a discontinuity where the 10th message caused momentum to DROP from
0.9 to 0.5. Replaced with a smooth log1p curve that monotonically
increases (0→0→0.20→0.32→...→0.70→0.89→1.0 at 30 msgs).
2. Neutral keywords overriding all moods (P0): detect_mood_shift() checked
neutral early with generic keywords (okay, sure, hmm) that matched
almost any response, constantly resetting mood to neutral. Now: all
specific moods are scored by match count first (best-match wins),
neutral is only checked as fallback and requires 2+ keyword matches.
3. Uncancellable delayed_wakeup tasks (P0): Fire-and-forget sleep tasks
could stack and overwrite mood state after manual wake-up. Added a
centralized wakeup task registry in ServerManager with automatic
cancellation on manual wake or new sleep cycle.
- Replaced Playwright browser scraping with direct API media extraction
- Both fetch_miku_tweets() and fetch_figurine_tweets_latest() now use twscrape's built-in media info
- Reduced tweet fetching from 10-15 minutes to ~5 seconds
- Eliminated browser timeout/hanging issues
- Relaxed autonomous tweet sharing conditions:
* Increased message threshold from 10 to 20 per hour
* Reduced cooldown from 3600s to 2400s (40 minutes)
* Increased energy threshold from 50% to 70%
* Added 'silly' and 'flirty' moods to allowed sharing moods
This makes both figurine notifications and tweet sharing much more reliable and responsive.
- Created new logging infrastructure with per-component filtering
- Added 6 log levels: DEBUG, INFO, API, WARNING, ERROR, CRITICAL
- Implemented non-hierarchical level control (any combination can be enabled)
- Migrated 917 print() statements across 31 files to structured logging
- Created web UI (system.html) for runtime configuration with dark theme
- Added global level controls to enable/disable levels across all components
- Added timestamp format control (off/time/date/datetime options)
- Implemented log rotation (10MB per file, 5 backups)
- Added API endpoints for dynamic log configuration
- Configured HTTP request logging with filtering via api.requests component
- Intercepted APScheduler logs with proper formatting
- Fixed persistence paths to use /app/memory for Docker volume compatibility
- Fixed checkbox display bug in web UI (enabled_levels now properly shown)
- Changed System Settings button to open in same tab instead of new window
Components: bot, api, api.requests, autonomous, persona, vision, llm,
conversation, mood, dm, scheduled, gpu, media, server, commands,
sentiment, core, apscheduler
All settings persist across container restarts via JSON config.
- Moved on_message_event() call to END of message processing in bot.py
- Only track messages for autonomous when NOT addressed to Miku
- Fixed autonomous_engine.py to convert all message-triggered actions to join_conversation
- Prevent inappropriate autonomous actions (general, share_tweet, change_profile_picture) when triggered by user messages
- Ensures Miku responds to user messages FIRST before any autonomous action fires
This fixes the issue where autonomous actions would fire before Miku's response to user messages, and ensures the 'detect and join conversation' safeguard works properly.