mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 10:27:56 +01:00
control-fast-state.ts had a single-line regex parser; sessions/route.ts had a more capable multi-line buffering parser that stops at ## sections. Both parsed the same on-disk handoff format (done/next/tests/todos/health). Add parseSessionFile(raw) to session-content.ts — the canonical implementation using the multi-line algorithm. Both callers now import it; the local parse functions are deleted. control-fast-state.ts shrinks from 17 lines to 5. The Python beacon's _build_summary keeps its own single-line parse (language boundary) but now has a cross-reference comment to parseSessionFile. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>