Expand description
§entelix-session
Session-as-event-SSoT (invariant 1). Defines SessionGraph with
events: Vec<GraphEvent> as the only durable audit truth, plus
fork semantics and archival watermarks. The persistent companion
is the SessionLog trait — concrete impls live in
entelix-persistence.
Per F1 mitigation, this module is distinct from the runtime
entelix_core::events::EventBus: the bus is fire-and-forget
ephemeral pub-sub, this module is the durable replay source.
Structs§
- Compacted
History - Compacted view over a
SessionGraph’s event log. - Head
Drop Compactor - Reference compactor: drop oldest turns until the rendered
character count fits under
budget_chars. Tool round-trips stay paired by construction; the strategy never partially includes a turn. - InMemory
Session Log - In-process
SessionLogfor single-binary deployments and tests. - Session
Audit Sink - Adapter that fans
AuditSink::record_*calls into a durableSessionLog. - Session
Graph - Append-only event log for a single conversation thread.
- Tool
Pair - One matched
ToolCall/ToolResultpair. Sealed: the only path to construction isCompactor::compactinternal grouping, so a pair without both halves cannot exist.
Enums§
- Graph
Event - One audit-log entry.
- Turn
- One turn in a compacted conversation. Sealed so a
Turn::Assistantcan only carryToolPairs constructed via the compactor’s internal grouping code (paired calls + results).
Traits§
- Compactor
- Operator-supplied compaction strategy.
- Session
Log - Persistent durable session-event log.
Functions§
- messages_
char_ size - Character-length proxy for the token cost of a message slice. Same
metric
HeadDropCompactoruses to compare againstbudget_chars, so threshold-driven auto-compaction can use the same yardstick. - messages_
to_ events - Render an in-flight
Vec<Message>(the shape an agent’s working state carries) into aVec<GraphEvent>thatCompactor::compactcan consume. Inverse ofCompactedHistory::to_messages.