Commit 85cad66
authored
* feat: verbatim transcripts — sessions + messages (refs #107)
Add a third memory system alongside memories (curated, decayed) and
memoirs (knowledge graphs): transcripts are verbatim recordings of
agent conversations, stored as-is with no summarization or extraction.
Retrieval uses FTS5 BM25 at query time (boolean, phrase, prefix).
Motivation: issue #107 + MemPalace traction show real demand for raw
conversation capture. Three use cases ICM couldn't previously serve:
session replay for post-mortem review, compliance/audit trails, and
training-data collection. Extraction is lossy for these — we need the
actual bytes, not a summary.
Implementation is 100% Rust, same SQLite file as memories/memoirs,
zero new runtime deps. FTS5 index writes ~10× faster than ChromaDB-
based alternatives.
## Schema
- `sessions` (id, agent, project, started_at, updated_at, metadata)
- `messages` (id, session_id, role, content, tool_name, tokens, ts, metadata)
- `messages_fts` FTS5 virtual table on role + content + tool_name
- ON DELETE CASCADE from sessions → messages; triggers keep FTS in sync
## API surface
- Core: `TranscriptStore` trait + `Session`, `Message`, `Role`,
`TranscriptHit`, `TranscriptStats` types.
- Store: 7 methods on `SqliteStore` (create_session, get_session,
list_sessions, record_message, list_session_messages,
search_transcripts, forget_session, transcript_stats).
- CLI: `icm transcript {start-session, record, search, list-sessions,
show, stats, forget}` (7 subcommands).
- MCP: 5 tools (`icm_transcript_start_session`, `_record`, `_search`,
`_show`, `_stats`) — total MCP surface: 22 → 27.
## Tests
8 new unit tests in icm-store: create+record, missing-session rejection,
FTS5 boolean + phrase, session/project scoping, stats breakdown,
cascade delete, chronological ordering, list sorting.
## Follow-ups (separate PRs)
- TUI tab "Sessions" (icm dashboard)
- Web dashboard page `/sessions` with message thread viewer
- `icm hook transcript` wiring for auto-capture from Claude Code hooks
- Optional RTK Cloud sync (paid audit / session replay tier)
* style: cargo fmt
* fix(clippy): explicit param numbering in transcript search SQL
1 parent 8a520c7 commit 85cad66
File tree
9 files changed
+1479
-4
lines changed- crates
- icm-cli/src
- icm-core/src
- icm-mcp/src
- icm-store/src
9 files changed
+1479
-4
lines changedSome 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 | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
231 | 262 | | |
232 | 263 | | |
233 | 264 | | |
| |||
266 | 297 | | |
267 | 298 | | |
268 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
269 | 310 | | |
270 | 311 | | |
271 | 312 | | |
| |||
0 commit comments