docs(graphs): add generated documentation atlas

This commit is contained in:
Tianyi Cui
2026-07-03 01:13:52 +08:00
parent 33bc374038
commit 665c10ff19
19 changed files with 1584 additions and 5 deletions

View File

@@ -0,0 +1,25 @@
<!-- 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.