feat: Wave 3 — plugin loader + Flet GUI (parity with Rust fork)
Plugin loader (mirrors Rust #29): - plugins_store.py walks %APPDATA%\com.priler.jarvis\plugins\<name>\ for commands.yaml fragments and merges them into VA_CMD_LIST at startup. Same schema as the project root commands.yaml. Per-pack `disabled` flag file skips a pack without deletion. Built-in ids win conflicts so a malicious pack can't silently override open_browser. 9 unit tests (parity with the Rust tests). - main.py: plugin merge runs after the root yaml load; logs the number of extra commands picked up. Flet GUI (#27 — first parity with the Rust Tauri GUI): - New gui/ package: __main__.py launches via `python -m gui` (or gui.bat). app.py routes between 7 pages (Главная / Команды / Макросы / Расписание / Память / Плагины / Настройки) via NavigationRail; dark theme matching the Tauri look. - gui/services.py centralises every store-module call the pages share — single place to swap implementations later. - One file per page in gui/pages/, all expose `build(page)` and use the same card layout idiom. Pages mirror the Tauri ones feature- for-feature: home (status + counters + launcher), commands (filterable list of all VA_CMD_LIST entries), macros (list + delete + recording banner), scheduler (list + remove), memory (add/forget/search), plugins (toggle/open folder), settings (profile + LLM hot-swap). - requirements.txt: flet>=0.85 (optional; assistant runs without). - 3 smoke tests verify imports + build callables; skip cleanly when Flet isn't installed. README: documents both the GUI and the plugin layout in user-facing terms. Tests: 42 → 54 (+9 plugins +3 GUI smoke).
This commit is contained in:
parent
2bef1d5ea7
commit
59a1258dcc
19 changed files with 1233 additions and 0 deletions
29
README.md
29
README.md
|
|
@ -37,6 +37,35 @@ Vosk-модель для русского языка лежит в `model_small/
|
|||
python main.py
|
||||
```
|
||||
|
||||
## GUI (Flet)
|
||||
|
||||
Опциональная графическая панель — те же 7 страниц, что и в Rust-форке
|
||||
(Главная / Команды / Макросы / Расписание / Память / Плагины / Настройки).
|
||||
|
||||
```bash
|
||||
pip install flet>=0.85 # одноразово, уже в requirements.txt
|
||||
python -m gui # или просто gui.bat
|
||||
```
|
||||
|
||||
GUI не запускает ассистент сам — это панель управления. Кнопка «Запустить
|
||||
J.A.R.V.I.S.» на главной запускает `main.py` отдельным процессом.
|
||||
|
||||
## Плагины
|
||||
|
||||
Голосовые команды, которые лежат **вне** репозитория. Добавляются без правки
|
||||
проекта: создайте папку в
|
||||
|
||||
```
|
||||
%APPDATA%\com.priler.jarvis\plugins\<имя_плагина>\
|
||||
commands.yaml (тот же формат, что и корневой commands.yaml)
|
||||
disabled (опционально — пустой файл, отключает плагин)
|
||||
```
|
||||
|
||||
Плагины подхватываются при следующем запуске `main.py`. ID встроенных команд
|
||||
выигрывают конфликты (плагин не может переопределить, например, `open_browser`).
|
||||
GUI-страница «Плагины» показывает список, флажки enable/disable и кнопку
|
||||
«Открыть папку».
|
||||
|
||||
## Конфигурация
|
||||
|
||||
- `config.py`:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue