mnesis.models.summary¶
summary
¶
Summary DAG and file reference data models.
SummaryNode
¶
Bases: BaseModel
A materialized summary of a contiguous span of messages.
At MVP level (Phase 1) these are stored as assistant messages with
is_summary=True in the ImmutableStore. The SummaryDAGStore adapts
those messages into this model.
Two kinds exist:
"leaf"— produced by summarising raw messages directly."condensed"— produced by condensing one or more existing summary nodes;parent_node_idsrecords all consumed node IDs.
level
class-attribute
instance-attribute
¶
DAG depth: 0 = covers raw messages directly, 1+ = covers other nodes.
kind
class-attribute
instance-attribute
¶
'leaf' = summarised from raw messages; 'condensed' = merged from summary nodes.
span_start_message_id
instance-attribute
¶
ID of the first message in the summarized span.
span_end_message_id
instance-attribute
¶
ID of the last message in the summarized span (inclusive).
content
instance-attribute
¶
The summary text that will be prepended to the active context.
parent_node_id
class-attribute
instance-attribute
¶
ID of the parent SummaryNode in a multi-level DAG (kept for backwards compat).
parent_node_ids
class-attribute
instance-attribute
¶
All parent SummaryNode IDs consumed by this condensation (populated for 'condensed').
compaction_level
class-attribute
instance-attribute
¶
Escalation level: 1 = selective, 2 = aggressive, 3 = deterministic (fallback).
MessageSpan
¶
Bases: BaseModel
A contiguous span of messages not yet covered by any SummaryNode.
FileReference
¶
Bases: BaseModel
Content-addressed external file reference stored in the file_references table.
Used by LargeFileHandler to avoid inlining large files into the context window. Keyed by content hash so identical files are deduplicated automatically.
exploration_summary
instance-attribute
¶
Compact structural description generated by LargeFileHandler.