#5170
refactor(session): separate persistence behind SessionStore
Summary
- add a typed
SessionStorecontract - move JSONL persistence into
JsonlSessionStore - keep caching, file-cap enforcement, and session forking in
SessionManager
Why
This creates the storage boundary needed for a later SQLite backend without changing the current JSONL format or runtime behavior. SQLite schema and data migration are intentionally out of scope.
Tests
pytest tests/agent tests/session tests/test_nanobot_facade.py tests/webui/test_session_list_index.py -q(1569 passed, 2 skipped)ruff check nanobot/- targeted BasedPyright check (0 errors)