Commit 48c4b1a
Yogthos
phase 1: SQLite session database with FTS5
Port of Hermes's hermes_state.py. Persists session transcripts
in .dirge/sessions/state.db with the same schema: sessions table
+ messages table + messages_fts FTS5 virtual table with content
sync triggers.
Features:
- SessionDb::open() with WAL mode + DELETE fallback for NFS/SMB
- Schema versioning with forward migrations (v1 baseline)
- insert_session / insert_message with message count tracking
- search_messages with FTS5 full-text search + optional role filter
- list_sessions_rich with source exclusion (review-fork, etc.)
- set_parent_session for compression-driven session splitting
- resolve_parent for walking lineage chain to root
- get_anchored_view for ±N message windows around an anchor
9 tests: CRUD, FTS5 search, role filter, source exclusion,
session splitting, parent resolution, anchored message windows.
Added rusqlite with bundled SQLite feature.1 parent 723b059 commit 48c4b1a
4 files changed
Lines changed: 659 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
0 commit comments