mirror of
https://ghproxy.cflmy.top/https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-11-30 09:09:35 +08:00
The opt-in SQLite Session store kept each durable write as one compressed frame, so SQL could not see an event's sequence, type or time. It now stores one row per event: the envelope members are columns and data is JSON text, or one Zstandard frame when it is large. Segments use integer ids and a segment_paths table that lists each Segment's history, so the session_* views return a Session's events in one join, forks included. Derived tables for model calls, tool calls, tool results and compactions are written in the events' transaction and rebuilt from events when a table is missing, its version changes, or its derivation was absent. Opening a database runs ordered upgrade steps under src/migrations. The first rewrites the frame layout (schema version 1) in place; a frame it cannot read is set aside without blocking the other Sessions. BREAKING CHANGE: the frameEvents setting is removed, and a database upgraded to schema version 2 cannot be opened by earlier releases.