deepseek-harness/packages/core/session/src
Tianyi Cui a4f7e757fa session: cache the derived history — one projection per node, frozen and shared
deriveMessages() no longer re-derives and re-clones the whole surface
per call: each node is projected exactly once, when first seen (O(new
nodes) per access), through the now-public deriveEventMessage — the
per-node pure function external reconstructors and the dev invariant
fold over a log prefix, so no two paths can disagree about a request's
messages. A surface rewrite (replace, invalidate) rebuilds, signalled
by SurfaceManager.replaceGeneration — monotonic, bumped by every folded
replace and by invalidate(), never reset. Callers get a fresh array
snapshot per call over SHARED deep-frozen messages: isolation of the
append-only log moves from per-call cloning to unrepresentability
(mutation throws), which the two isolation tests now pin directly.
2026-07-06 02:51:20 +08:00
..
index.ts session: cache the derived history — one projection per node, frozen and shared 2026-07-06 02:51:20 +08:00
json.ts feat(tool-fs): result-time applied-hunk diffs for write/edit 2026-07-03 17:12:00 +08:00
repair.ts Merge remote-tracking branch 'origin/master' into session-surface 2026-06-22 10:35:59 +08:00
request-header.ts session: the request header becomes logged state — request/header events + fold/diff/apply 2026-07-06 02:42:51 +08:00
surface.ts session: cache the derived history — one projection per node, frozen and shared 2026-07-06 02:51:20 +08:00
tool-pairing.ts fix(compact): decide step-alignment from surface tool-pairing, fire compaction pre-step (CBR-001) 2026-06-26 13:51:01 +08:00
types.ts session: the request header becomes logged state — request/header events + fold/diff/apply 2026-07-06 02:42:51 +08:00