26 lines
947 B
Markdown
26 lines
947 B
Markdown
<!-- Generated by scripts/gen-doc-graphs.ts - do not edit by hand.
|
|
Run `pnpm run gen-doc-graphs` to regenerate. -->
|
|
|
|
# Session Surface And Message Projection
|
|
|
|
Maintenance mode: curated Mermaid dataflow; exact event/type shapes live in core-data-structures.
|
|
|
|
This graph separates the append-only log from the derived message surface the next model request sees.
|
|
|
|
```mermaid
|
|
flowchart LR
|
|
append["Session.append(type, data)"]
|
|
log["Append-only SessionEvent log"]
|
|
surface["SurfaceManager linked list<br/>surfaceOp + sourceEventSeqs"]
|
|
derive["deriveMessages()"]
|
|
model["GenerateOptions.messages"]
|
|
persist["JSONL / SQLite persistence"]
|
|
replay["load / replay / fork seed"]
|
|
append --> log
|
|
log --> surface
|
|
surface --> derive --> model
|
|
log --> persist --> replay --> log
|
|
```
|
|
|
|
See [core-data-structures/session.md](../core-data-structures/session.md) for the full `SessionEventMap`, surface operations, and turn-enclosure invariant.
|