feat: Python parity for Wave 6-8 — memory admin / cooking / leftoff / trivia / routines

New module `wave68_handlers.py` (~270 lines) covering the Rust packs that
were Rust-only after Waves 6-8:

  - memory_admin: do_memory_count/list/wipe (with full RU plural decl.)
  - cooking: do_cooking + reusable match_recipe(phrase) for the 15-dish
    preset table. Schedules a "ready!" reminder via scheduler_store.
  - leftoff: do_leftoff stitches memory + scheduled tasks + last reply
    into a one-paragraph recap. Offline.
  - trivia: do_trivia random one-liner from RU/EN MCU pools.
  - routines: do_good_night (sleep profile + cancel one-shots),
    do_good_morning (default profile + agenda hint),
    do_coffee_break (5-min check-in via scheduler).

memory_store: new clear_all() returning removed count, atomic via _save.

extensions.py: imports + set_speak wiring + 9 proxy do_* fns.
main.py: 9 new dispatch elifs.
commands.yaml: 9 new entries (now 196 total).

tests/test_wave68_handlers.py: 15 unit tests covering each handler.
Test helper `_rewire()` re-imports state modules via the existing
isolated_state fixture then re-binds the wave68_handlers module-level
refs — fixes the gotcha where module-level imports cache the OLD
memory_store / scheduler_store instances from process startup.

Tests: 81 → 96 (+15).
This commit is contained in:
Bossiara13 2026-05-16 14:55:47 +03:00
parent 5265cb0fbe
commit 94edb73f26
7 changed files with 644 additions and 0 deletions

18
main.py
View file

@ -1717,6 +1717,24 @@ def run_action(action):
extensions.do_outlook_send_clipboard(action, _current_voice or '')
elif t == 'outlook_summarize_inbox':
extensions.do_outlook_summarize_inbox(action, _current_voice or '')
elif t == 'memory_count':
extensions.do_memory_count(action, _current_voice or '')
elif t == 'memory_list':
extensions.do_memory_list(action, _current_voice or '')
elif t == 'memory_wipe':
extensions.do_memory_wipe(action, _current_voice or '')
elif t == 'cooking':
extensions.do_cooking(action, _current_voice or '')
elif t == 'leftoff':
extensions.do_leftoff(action, _current_voice or '')
elif t == 'trivia':
extensions.do_trivia(action, _current_voice or '')
elif t == 'good_night':
extensions.do_good_night(action, _current_voice or '')
elif t == 'good_morning':
extensions.do_good_morning(action, _current_voice or '')
elif t == 'coffee_break':
extensions.do_coffee_break(action, _current_voice or '')
_current_voice: str = ''