Expand description
Session tree journal placeholder (issue #5262).
The journal is append-only with an in-memory tree projection:
every non-header entry carries id + parentId, the active position is
a leafId, appending creates a child of the leaf, and branching only
moves the leaf — it never rewrites history. This file lands the entry
shape that #5262’s tree operations hang off of; compaction and
branch-summary entry kinds are included as first-class kinds but their
strategies are deferred.
Re-exports the protocol journal as the canonical shape so protocol and
core agree on the wire. core adds the SessionJournal wrapper that
owns the current_leaf_id column in state.threads.
Structs§
- Journal
- Append-only journal with a
leafIdcursor. The tree projection is derived root→leaf; movingleaf_idbranches without rewriting history. - Journal
Entry - One journal entry. All entries except the root header have
id+parent_id. - Thread
Leaf State - Persisted thread metadata extension for the tree. This is the
current_leaf_idcolumn added tostate.threads;Nonebefore the first turn,Some(id)after. The existingthreadsJSON shape is otherwise unchanged (back-compat: old rows read asNoneand the next append mints the header leaf).
Enums§
- Journal
Kind - First-class journal entry kinds (data shape lands now; strategies later).