mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Implement Phase 2 of the dream skill: harness-side dispatch logic for memory consolidation turns. Dream is lowest-priority (pending work > heartbeat > dream), preemptible by any inbound event, and follows the heartbeat session lifecycle (reuse until invalidated on cancel). Key additions: - KIND_DREAM_DUE (24300) ephemeral event constant in buzz-core - PromptSource::Dream variant with full match coverage - Dream session management (create once, reuse, invalidate on cancel) - dispatch_dream() with control_tx for preemption - Dream-due event detection sets pending flag (dispatch on next tick) - cancel_in_flight_dream() fires Cancel on any accepted inbound event - Panic recovery clears dream_in_flight via is_dream on TaskMeta - load_dream_prompt() reads .agents/skills/dream/SKILL.md at startup Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>