2 Commits

Author SHA1 Message Date
Rudy Celekli
6498bc7fbc fix(memory): keep footnote-like tokens in entry text on round-trip
parse() swallowed a `[^token]` that was part of an entry's text. The
new-bullet regex matched trailing markers as `[^...]` (any non-`]`
run), so prose ending in a footnote-like token (e.g. "footnote syntax
is [^note]") was absorbed into the markers group and dropped, breaking
the documented `parse(serialize(d)) == d` contract. Because the token
label failed to resolve, the text was silently truncated and, once the
entry also carried a real ref, its markers were mangled too.

serialize() emits integer labels exclusively, so narrow the inline-marker
pattern to `[^<digits>]`. Non-integer footnote-like tokens now stay in
the text where they belong; real numeric citation markers still parse
(including the legacy compact `[^1][^2]` form).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-01 09:13:39 -05:00
Bingxi Zhao (Frank)
2b7242081f feat(memory): three-layer memory subsystem (L1/L2/L3) with workbench
Replaces the flat single-blob memory page with a structured store:
- L1 captures raw run traces; L2 holds normalized document records;
  L3 holds curated slots per surface (chat, notebook, book, TutorBot).
- New consolidator pipeline (chunker, guards, parse, references, runs,
  modes, line-doc, meta) turns traces into versioned line-oriented
  documents with stable ids and snapshot history.
- Per-user isolation flows through PathService; the store API is
  stateless.

UI ships a dedicated /memory workbench with graph / L1 / L2 / L3 /
resolve subpages, plus a reusable MemorySection embedded where the
legacy panel lived.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 18:02:32 +08:00