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
- 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.
- Document that snowflake-arctic-embed2 outputs 1024 dimensions (not 768)
- Document SESSIONS_DIR hardcoded path and how to patch with env var
- Add Known Limitations section near File Watching docs
- Fixes community feedback from GitLab issue #1
Thanks to Rob Whyte @ Fort Myers Brewing for identifying these issues.
- 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