Expand description
Session persistence (JSON + SQLite backends).
Modules§
- compaction_
artifact_ store - SQLite persistence for compaction artifacts (kernel-v2 Phase 2-C).
- context_
reference - Durable context-reference metadata (session resume, HTTP runtime).
- kernel_
event_ log - Append-only SQLite log for
KernelEventrecords — Phase 3a double-write. - kernel_
event_ writer - Background drain for
KernelEventdouble-write (Phase 3b batch 2). - session_
manager - Session management for resuming conversations.
- session_
store_ sqlite
Structs§
- Context
Reference - Durable, compact metadata for a user-visible context reference.
- Kernel
Event Log - Append-only writer for the
kernel_eventstable. - Kernel
Event Writer - Owns the channel sender, shared DB handle, and the background drain task handle.
- Saved
Session - A saved session containing full conversation history
- Session
Context Reference - Durable context-reference metadata attached to a user message.
- Session
Manager - Manager for session persistence operations
- Session
Metadata - Session metadata stored with each saved session
Enums§
Functions§
- delete_
compaction_ artifacts_ for_ session - Delete all artifacts for
session_id(call when deleting a session). - delete_
session_ sqlite - ensure_
compaction_ artifacts_ table - Ensures the
compaction_artifactstable exists indb. - ensure_
kernel_ events_ table - Ensure the
kernel_eventstable and index exist. Safe to call on every startup — usesCREATE … IF NOT EXISTS. - list_
sessions_ sqlite - load_
compaction_ artifacts - Load all artifacts for
session_id, ordered oldest → newest. - load_
session_ sqlite - open_
sqlite_ session_ db - Opens (or creates) the SQLite DB at
db_path. If JSON files exist insessions_dirand the DB is empty, auto-migrates. - prune_
workspace_ snapshots - Prune snapshots older than
max_ageforworkspace. - save_
compaction_ artifact - Persist one
CompactionArtifacttodb. - save_
session_ sqlite