Files
deepseek-harness/docs/graphs/session-surface.md
2026-07-03 01:13:52 +08:00

947 B

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.

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 for the full SessionEventMap, surface operations, and turn-enclosure invariant.