SessionPersistence grows readFrom(id, fromSeq, signal?): the non-mutating read-from-seq primitive for checkpoint consumers (the persisted projection cache folds only the tail past its watermark). Coordinator owns validation, per-id serialization, and the sequential fallback (loadStored + forward skip); SQLite implements the optional seek-capable loadStoredFrom hook (WHERE seq >= ?), JSONL stays sequential by contract. Contract suite covers suffix exactness, empty-tail, non-mutation, and cancellation; seam README (both languages) documents the method and the hook.
session-persistence/ — persistence capability family
English | 中文
The durable session-persistence seam and its storage backends. The interface package owns the abstract SessionPersistence service and the shared write coordinator; the backends are concrete implementations that register on ctx.sessionPersistence. All product packages.
| Package | Role | ctx key |
|---|---|---|
session-persistence/ |
Persistence seam + shared write coordinator | ctx.sessionPersistence |
session-checkpoint-policy/ |
Semantic durability barriers for agent requests and tool execution | (wraps ctx.llm / ctx.tools, listens on agent events) |
session-persistence-jsonl/ |
JSONL-sidecar persistence backend | (registers ctx.sessionPersistence) |
session-persistence-sqlite/ |
SQLite persistence backend | (registers ctx.sessionPersistence) |
The interface lives at session-persistence/session-persistence/; backends are flat siblings. A new storage backend joins here and registers on ctx.sessionPersistence. See session persistence.