feat: Wave 5 Python parity — outlook COM + time tracker
Some checks are pending
Python CI / pytest (ubuntu-latest) (push) Waiting to run
Python CI / pytest (windows-latest) (push) Waiting to run
Python CI / ruff (push) Waiting to run

Outlook COM (`outlook_handlers.py`, agent):
- 4 handlers mirroring Rust pack: unread_count, latest, send_clipboard,
  summarize_inbox. Uses `win32com.client` with lazy import so the module
  loads even when pywin32 is missing — handlers degrade gracefully and
  speak a "Outlook недоступен" reply.
- `requirements.txt`: pywin32>=305 (optional).
- 7 unit tests mock `_outlook_session` via unittest.mock.

Time tracker (`time_tracker_handlers.py`, agent):
- 5 handlers: start, stop, today, week, reset. JSON store at
  `<here>/time_tracker.json`, atomic write-then-rename.
- Same shape as the Rust pack's `jarvis.state` blob: current_session_start
  + sessions[{start,end}]. Local-calendar today boundary.
- Full Russian pluralisation (час/часа/часов, минута/минуты/минут).
- 14 unit tests using the existing `isolated_state` fixture in conftest.py.

`extensions.py` + `main.py`: imports + 9 new proxy do_* functions + 9
new dispatch elifs. `commands.yaml`: 9 new entries.

Tests: 60 → 81 (+14 tracker + 7 outlook).
This commit is contained in:
Bossiara13 2026-05-16 14:34:44 +03:00
parent 45d9425ed7
commit 5265cb0fbe
8 changed files with 971 additions and 0 deletions

18
main.py
View file

@ -1699,6 +1699,24 @@ def run_action(action):
extensions.do_personality_how_are_you(action, _current_voice or '')
elif t == 'personality_tony_quote':
extensions.do_personality_tony_quote(action, _current_voice or '')
elif t == 'tracker_start':
extensions.do_tracker_start(action, _current_voice or '')
elif t == 'tracker_stop':
extensions.do_tracker_stop(action, _current_voice or '')
elif t == 'tracker_today':
extensions.do_tracker_today(action, _current_voice or '')
elif t == 'tracker_week':
extensions.do_tracker_week(action, _current_voice or '')
elif t == 'tracker_reset':
extensions.do_tracker_reset(action, _current_voice or '')
elif t == 'outlook_unread_count':
extensions.do_outlook_unread_count(action, _current_voice or '')
elif t == 'outlook_latest':
extensions.do_outlook_latest(action, _current_voice or '')
elif t == 'outlook_send_clipboard':
extensions.do_outlook_send_clipboard(action, _current_voice or '')
elif t == 'outlook_summarize_inbox':
extensions.do_outlook_summarize_inbox(action, _current_voice or '')
_current_voice: str = ''