3 Commits

Author SHA1 Message Date
root
5c2014cb11 Fix: Proper session rotation detection (v1.2)
Fixes the bug where watcher stayed stuck on old sessions after /new or /reset.

Changes:
- Added file_score() function combining mtime + size for better detection
- Added INACTIVITY_THRESHOLD (30s) - if no new data, check for active session
- Tracks last_data_time and file size to detect stale sessions
- Switches to newer session when current is inactive

The previous v1.1 fix (mtime polling) was incomplete because new sessions
can have older mtime than recently-written old sessions.

Tested: Watcher now properly follows session rotation on /new and /reset
2026-02-28 19:09:38 -06:00
root
a053ec1c3d fix: SESSIONS_DIR env var and config dimension docs
- SESSIONS_DIR now reads from OPENCLAW_SESSIONS_DIR env var with fallback
- Fixes hardcoded path issue reported by community
- config.json: add embedding_dimensions (1024) and notes field
- Update version to 1.1 in config.json

Validated 4x:
1. SESSIONS_DIR line correct
2. config.json syntax valid
3. Both files syntax OK
4. Env var logic tested

Thanks to Rob Whyte @ Fort Myers Brewing for the suggestion.
2026-02-28 17:05:43 -06:00
root
70f5aec465 Fix: Add session rotation detection (v1.1)
- Add 1-second mtime polling to detect newer sessions
- Fixes bug where watcher stayed stuck on first session forever
- Prevents data loss when sessions rotate (was losing 2+ days of history)
- Bump version to v1.1
2026-02-28 16:51:31 -06:00