Skip to content

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 01 Apr 21:27

What's New

Proactive Memory Embedding

Memories are now embedded immediately after ctx_memory write (fire-and-forget) and swept periodically on the dream timer. The first ctx_search after dreamer runs no longer pays bulk embedding latency. The lazy search-time fallback remains as a safety net.

Smarter Compressor Selection

The compressor no longer always picks the oldest compartments for compression. A new weighted scoring system (0.7 × age + 0.3 × inverse compression depth) prevents the earliest compartments from being re-compressed indefinitely while untouched middle history exists. Per-message compression depth is tracked in a new compression_depth table and incremented after each successful pass.

Depth-Aware U: Line Handling

The compressor prompt now adapts based on how many times the selected compartments have been compressed:

  • Avg depth < 2: Preserve all U: lines exactly as-is — compression targets prose only
  • Avg depth 2–3: Condense each U: line to its core intent in one sentence
  • Avg depth 3+: Fold U: intent into narrative prose — no separate U: lines

This preserves user voice in recent history while allowing graceful degradation in ultra-long sessions.

Bug Fixes

  • History budget formula: Was contextLimit × historyBudgetPercentage, now correctly contextLimit × executeThreshold × historyBudgetPercentage as originally designed. With execute_threshold=40% and history_budget=15%, the budget was 150k (wrong) instead of the correct 60k.