J.A.R.V.I.S-py/commands.yaml

318 lines
8.6 KiB
YAML
Raw Normal View History

open_browser:
phrases:
- открой браузер
- запусти браузер
- открой яндекс
- яндекс браузер
action: {type: url, href: "about:blank", browser: "yandex"}
open_youtube:
phrases:
- открой ютуб
- ютуб
- запусти ютуб
action: {type: url, href: "https://www.youtube.com", browser: "yandex"}
open_google:
phrases:
- открой гугл
- гугл
- запусти гугл
action: {type: url, href: "https://www.google.com", browser: "yandex"}
feat: parity with rust fork — LLM auto-fallback + 6 new action types + 20+ commands Brings the python fork in line with the new feature/pc-tools work that landed in rust. Same UX, same trigger phrases, same env vars. config.py: + LLM_AUTO_FALLBACK = True + LLM_AUTO_FALLBACK_MIN_CHARS = 4 Mirrors the rust config knobs. The old "скажи X" trigger still works (VA_TBR strips it before intent matching, so what remains hits this fallback anyway) — but now ANY unrecognized query goes to Groq, not just "скажи" ones. main.py: va_respond: replaced the fuzz-on-"скажи" gate with a unified auto- fallback that fires whenever no command matches, GROQ_TOKEN is set, and the utterance is at least LLM_AUTO_FALLBACK_MIN_CHARS long. + _speak(text): recorder.stop() → tts.va_speak → start, used by the new action handlers so the mic doesn't pick up the assistant. + _set_clipboard(text): subprocess to PowerShell Set-Clipboard, no new python deps. + _strip_trigger(voice, triggers): shared helper for codegen/file_search where we need the text AFTER the trigger phrase. New action handlers (registered in run_action dispatch): + groq_codegen — extracts query, calls Groq with strict "code only" system prompt at temp 0.2, strips ```lang ... ``` fences, puts the result in the clipboard, speaks "Код в буфере, сэр. Строк: N". + ocr_screen — PowerShell System.Drawing screenshot to a temp PNG, shells to tesseract.exe (-l rus+eng), speaks a 120-char preview, clipboard. Looks for tesseract on PATH first then standard install dirs; gives a clear "Tesseract не установлен" if missing. + sysinfo — CIM-based battery/cpu/ram/disk via PS one-liners, time via python datetime (gets us localized weekday for free). Topics: time / battery / cpu / ram / disk / all. + file_search — strips trigger, recursive Get-ChildItem in Desktop/ Documents/Downloads (depth 3, top 5), opens explorer /select on the first hit, speaks count and basename. + audio_devices_panel — opens mmsys.cpl. Proper COM-based device switching (like the rust IPolicyConfig version) is deferred — TODO in backlog. commands.yaml: Total 33 commands (was 19). New: + open_notepad / open_calculator / open_explorer / open_terminal / open_settings / open_task_manager / lock_screen / screenshot — all via shell action (no AHK exes needed). + volume_up / volume_down — five chained keys=volumeup/volumedown presses each, like rust's _volume_helper.ps1 with Times=5. + media_stop — keys=stop. + sysinfo_time / sysinfo_battery / sysinfo_cpu / sysinfo_ram / sysinfo_disk / sysinfo_all — sysinfo action. + file_search, codegen, read_screen, switch_audio_device. Replaced (were AHK exes that Priler ships and we don't have): ~ music → keys playpause ~ music_off → keys playpause (toggle) ~ music_next → keys nexttrack ~ music_prev → keys prevtrack Removed (Priler hardware/setup specific, can't sensibly port): - gaming_mode_on / gaming_mode_off (display config switch) - music_save (depends on the specific player AHK was driving) - switch_to_headphones / switch_to_dynamics (replaced with the generic switch_audio_device that opens mmsys.cpl) Kept as-is (worked already, no AHK dependency): open_browser / open_youtube / open_google (url action) sound_off / sound_on (pycaw via system.volume_mute/unmute) thanks / stupid / off Smoke-tested: yaml.safe_load → 33 commands, ast.parse main.py → OK. Portability: USERPROFILE for screenshot path, $env:SystemDrive for disk, PATH lookup for tesseract before falling back to standard install dirs. No hardcoded user-specific paths.
2026-05-15 01:48:34 +03:00
open_notepad:
phrases:
- открой блокнот
- запусти блокнот
- открой нотепад
action: {type: shell, cmd: 'start "" notepad.exe'}
open_calculator:
phrases:
- открой калькулятор
- запусти калькулятор
- нужен калькулятор
action: {type: shell, cmd: 'start "" calc.exe'}
open_explorer:
phrases:
- открой проводник
- открой папку
- запусти проводник
- открой файлы
action: {type: shell, cmd: 'start "" explorer.exe'}
open_terminal:
phrases:
- открой терминал
- запусти терминал
- открой консоль
- открой повершелл
action: {type: shell, cmd: 'start "" wt.exe || start "" powershell.exe'}
open_settings:
phrases:
- открой настройки
- открой параметры
- открой настройки виндоус
action: {type: shell, cmd: 'start "" ms-settings:'}
open_task_manager:
phrases:
- открой диспетчер задач
- запусти диспетчер задач
- диспетчер задач
action: {type: shell, cmd: 'start "" taskmgr.exe'}
lock_screen:
phrases:
- заблокируй компьютер
- заблокируй экран
- блокировка экрана
- залочь
action: {type: shell, cmd: 'rundll32.exe user32.dll,LockWorkStation'}
screenshot:
phrases:
- сделай скриншот
- скриншот
- сними экран
action:
type: shell
cmd: >-
powershell -NoProfile -Command "Add-Type -AssemblyName System.Windows.Forms,System.Drawing; $b=[System.Windows.Forms.Screen]::PrimaryScreen.Bounds; $bmp=New-Object Drawing.Bitmap $b.Width,$b.Height; $g=[Drawing.Graphics]::FromImage($bmp); $g.CopyFromScreen($b.Location,[Drawing.Point]::Empty,$b.Size); $p=Join-Path $env:USERPROFILE ('Pictures\jarvis_'+(Get-Date -Format 'yyyyMMdd_HHmmss')+'.png'); $bmp.Save($p); $g.Dispose(); $bmp.Dispose()"
volume_up:
phrases:
- громче
- сделай громче
- прибавь звук
- увеличь громкость
- погромче
action:
type: multi
steps:
- {type: keys, sequence: 'volumeup'}
- {type: keys, sequence: 'volumeup'}
- {type: keys, sequence: 'volumeup'}
- {type: keys, sequence: 'volumeup'}
- {type: keys, sequence: 'volumeup'}
volume_down:
phrases:
- тише
- сделай тише
- убавь звук
- уменьши громкость
- потише
action:
type: multi
steps:
- {type: keys, sequence: 'volumedown'}
- {type: keys, sequence: 'volumedown'}
- {type: keys, sequence: 'volumedown'}
- {type: keys, sequence: 'volumedown'}
- {type: keys, sequence: 'volumedown'}
sound_off:
phrases:
- выключи звук
- беззвучный режим
- режим без звука
- отключи звук
action:
type: multi
steps:
- {type: play_sound, name: ok}
- {type: system, op: volume_mute}
sound_on:
phrases:
- включи звук
- режим со звуком
- верни звук
action:
type: multi
steps:
- {type: system, op: volume_unmute}
- {type: play_sound, name: ok}
2023-04-16 16:59:18 +05:00
music:
phrases:
- давай музыку
- музыка
- яндекс музыка
- включи музыку
- открой музыку
- послушаем музыку
- хочу музыку
- врубай музло
- включи что-то послушать
- давай что-то послушаем
feat: parity with rust fork — LLM auto-fallback + 6 new action types + 20+ commands Brings the python fork in line with the new feature/pc-tools work that landed in rust. Same UX, same trigger phrases, same env vars. config.py: + LLM_AUTO_FALLBACK = True + LLM_AUTO_FALLBACK_MIN_CHARS = 4 Mirrors the rust config knobs. The old "скажи X" trigger still works (VA_TBR strips it before intent matching, so what remains hits this fallback anyway) — but now ANY unrecognized query goes to Groq, not just "скажи" ones. main.py: va_respond: replaced the fuzz-on-"скажи" gate with a unified auto- fallback that fires whenever no command matches, GROQ_TOKEN is set, and the utterance is at least LLM_AUTO_FALLBACK_MIN_CHARS long. + _speak(text): recorder.stop() → tts.va_speak → start, used by the new action handlers so the mic doesn't pick up the assistant. + _set_clipboard(text): subprocess to PowerShell Set-Clipboard, no new python deps. + _strip_trigger(voice, triggers): shared helper for codegen/file_search where we need the text AFTER the trigger phrase. New action handlers (registered in run_action dispatch): + groq_codegen — extracts query, calls Groq with strict "code only" system prompt at temp 0.2, strips ```lang ... ``` fences, puts the result in the clipboard, speaks "Код в буфере, сэр. Строк: N". + ocr_screen — PowerShell System.Drawing screenshot to a temp PNG, shells to tesseract.exe (-l rus+eng), speaks a 120-char preview, clipboard. Looks for tesseract on PATH first then standard install dirs; gives a clear "Tesseract не установлен" if missing. + sysinfo — CIM-based battery/cpu/ram/disk via PS one-liners, time via python datetime (gets us localized weekday for free). Topics: time / battery / cpu / ram / disk / all. + file_search — strips trigger, recursive Get-ChildItem in Desktop/ Documents/Downloads (depth 3, top 5), opens explorer /select on the first hit, speaks count and basename. + audio_devices_panel — opens mmsys.cpl. Proper COM-based device switching (like the rust IPolicyConfig version) is deferred — TODO in backlog. commands.yaml: Total 33 commands (was 19). New: + open_notepad / open_calculator / open_explorer / open_terminal / open_settings / open_task_manager / lock_screen / screenshot — all via shell action (no AHK exes needed). + volume_up / volume_down — five chained keys=volumeup/volumedown presses each, like rust's _volume_helper.ps1 with Times=5. + media_stop — keys=stop. + sysinfo_time / sysinfo_battery / sysinfo_cpu / sysinfo_ram / sysinfo_disk / sysinfo_all — sysinfo action. + file_search, codegen, read_screen, switch_audio_device. Replaced (were AHK exes that Priler ships and we don't have): ~ music → keys playpause ~ music_off → keys playpause (toggle) ~ music_next → keys nexttrack ~ music_prev → keys prevtrack Removed (Priler hardware/setup specific, can't sensibly port): - gaming_mode_on / gaming_mode_off (display config switch) - music_save (depends on the specific player AHK was driving) - switch_to_headphones / switch_to_dynamics (replaced with the generic switch_audio_device that opens mmsys.cpl) Kept as-is (worked already, no AHK dependency): open_browser / open_youtube / open_google (url action) sound_off / sound_on (pycaw via system.volume_mute/unmute) thanks / stupid / off Smoke-tested: yaml.safe_load → 33 commands, ast.parse main.py → OK. Portability: USERPROFILE for screenshot path, $env:SystemDrive for disk, PATH lookup for tesseract before falling back to standard install dirs. No hardcoded user-specific paths.
2026-05-15 01:48:34 +03:00
action: {type: keys, sequence: 'playpause'}
2023-04-16 16:59:18 +05:00
music_off:
phrases:
- выключи музыку
- отруби музыку
- убери музыку
- отключи музыку
- закрой музыку
- останови музыку
- хватит музыки
feat: parity with rust fork — LLM auto-fallback + 6 new action types + 20+ commands Brings the python fork in line with the new feature/pc-tools work that landed in rust. Same UX, same trigger phrases, same env vars. config.py: + LLM_AUTO_FALLBACK = True + LLM_AUTO_FALLBACK_MIN_CHARS = 4 Mirrors the rust config knobs. The old "скажи X" trigger still works (VA_TBR strips it before intent matching, so what remains hits this fallback anyway) — but now ANY unrecognized query goes to Groq, not just "скажи" ones. main.py: va_respond: replaced the fuzz-on-"скажи" gate with a unified auto- fallback that fires whenever no command matches, GROQ_TOKEN is set, and the utterance is at least LLM_AUTO_FALLBACK_MIN_CHARS long. + _speak(text): recorder.stop() → tts.va_speak → start, used by the new action handlers so the mic doesn't pick up the assistant. + _set_clipboard(text): subprocess to PowerShell Set-Clipboard, no new python deps. + _strip_trigger(voice, triggers): shared helper for codegen/file_search where we need the text AFTER the trigger phrase. New action handlers (registered in run_action dispatch): + groq_codegen — extracts query, calls Groq with strict "code only" system prompt at temp 0.2, strips ```lang ... ``` fences, puts the result in the clipboard, speaks "Код в буфере, сэр. Строк: N". + ocr_screen — PowerShell System.Drawing screenshot to a temp PNG, shells to tesseract.exe (-l rus+eng), speaks a 120-char preview, clipboard. Looks for tesseract on PATH first then standard install dirs; gives a clear "Tesseract не установлен" if missing. + sysinfo — CIM-based battery/cpu/ram/disk via PS one-liners, time via python datetime (gets us localized weekday for free). Topics: time / battery / cpu / ram / disk / all. + file_search — strips trigger, recursive Get-ChildItem in Desktop/ Documents/Downloads (depth 3, top 5), opens explorer /select on the first hit, speaks count and basename. + audio_devices_panel — opens mmsys.cpl. Proper COM-based device switching (like the rust IPolicyConfig version) is deferred — TODO in backlog. commands.yaml: Total 33 commands (was 19). New: + open_notepad / open_calculator / open_explorer / open_terminal / open_settings / open_task_manager / lock_screen / screenshot — all via shell action (no AHK exes needed). + volume_up / volume_down — five chained keys=volumeup/volumedown presses each, like rust's _volume_helper.ps1 with Times=5. + media_stop — keys=stop. + sysinfo_time / sysinfo_battery / sysinfo_cpu / sysinfo_ram / sysinfo_disk / sysinfo_all — sysinfo action. + file_search, codegen, read_screen, switch_audio_device. Replaced (were AHK exes that Priler ships and we don't have): ~ music → keys playpause ~ music_off → keys playpause (toggle) ~ music_next → keys nexttrack ~ music_prev → keys prevtrack Removed (Priler hardware/setup specific, can't sensibly port): - gaming_mode_on / gaming_mode_off (display config switch) - music_save (depends on the specific player AHK was driving) - switch_to_headphones / switch_to_dynamics (replaced with the generic switch_audio_device that opens mmsys.cpl) Kept as-is (worked already, no AHK dependency): open_browser / open_youtube / open_google (url action) sound_off / sound_on (pycaw via system.volume_mute/unmute) thanks / stupid / off Smoke-tested: yaml.safe_load → 33 commands, ast.parse main.py → OK. Portability: USERPROFILE for screenshot path, $env:SystemDrive for disk, PATH lookup for tesseract before falling back to standard install dirs. No hardcoded user-specific paths.
2026-05-15 01:48:34 +03:00
- пауза
- поставь на паузу
action: {type: keys, sequence: 'playpause'}
music_next:
phrases:
- следующий трек
- следующая мелодия
- следующая песня
- переключи трек
- переключи мелодию
- переключи песню
- следующая музыка
feat: parity with rust fork — LLM auto-fallback + 6 new action types + 20+ commands Brings the python fork in line with the new feature/pc-tools work that landed in rust. Same UX, same trigger phrases, same env vars. config.py: + LLM_AUTO_FALLBACK = True + LLM_AUTO_FALLBACK_MIN_CHARS = 4 Mirrors the rust config knobs. The old "скажи X" trigger still works (VA_TBR strips it before intent matching, so what remains hits this fallback anyway) — but now ANY unrecognized query goes to Groq, not just "скажи" ones. main.py: va_respond: replaced the fuzz-on-"скажи" gate with a unified auto- fallback that fires whenever no command matches, GROQ_TOKEN is set, and the utterance is at least LLM_AUTO_FALLBACK_MIN_CHARS long. + _speak(text): recorder.stop() → tts.va_speak → start, used by the new action handlers so the mic doesn't pick up the assistant. + _set_clipboard(text): subprocess to PowerShell Set-Clipboard, no new python deps. + _strip_trigger(voice, triggers): shared helper for codegen/file_search where we need the text AFTER the trigger phrase. New action handlers (registered in run_action dispatch): + groq_codegen — extracts query, calls Groq with strict "code only" system prompt at temp 0.2, strips ```lang ... ``` fences, puts the result in the clipboard, speaks "Код в буфере, сэр. Строк: N". + ocr_screen — PowerShell System.Drawing screenshot to a temp PNG, shells to tesseract.exe (-l rus+eng), speaks a 120-char preview, clipboard. Looks for tesseract on PATH first then standard install dirs; gives a clear "Tesseract не установлен" if missing. + sysinfo — CIM-based battery/cpu/ram/disk via PS one-liners, time via python datetime (gets us localized weekday for free). Topics: time / battery / cpu / ram / disk / all. + file_search — strips trigger, recursive Get-ChildItem in Desktop/ Documents/Downloads (depth 3, top 5), opens explorer /select on the first hit, speaks count and basename. + audio_devices_panel — opens mmsys.cpl. Proper COM-based device switching (like the rust IPolicyConfig version) is deferred — TODO in backlog. commands.yaml: Total 33 commands (was 19). New: + open_notepad / open_calculator / open_explorer / open_terminal / open_settings / open_task_manager / lock_screen / screenshot — all via shell action (no AHK exes needed). + volume_up / volume_down — five chained keys=volumeup/volumedown presses each, like rust's _volume_helper.ps1 with Times=5. + media_stop — keys=stop. + sysinfo_time / sysinfo_battery / sysinfo_cpu / sysinfo_ram / sysinfo_disk / sysinfo_all — sysinfo action. + file_search, codegen, read_screen, switch_audio_device. Replaced (were AHK exes that Priler ships and we don't have): ~ music → keys playpause ~ music_off → keys playpause (toggle) ~ music_next → keys nexttrack ~ music_prev → keys prevtrack Removed (Priler hardware/setup specific, can't sensibly port): - gaming_mode_on / gaming_mode_off (display config switch) - music_save (depends on the specific player AHK was driving) - switch_to_headphones / switch_to_dynamics (replaced with the generic switch_audio_device that opens mmsys.cpl) Kept as-is (worked already, no AHK dependency): open_browser / open_youtube / open_google (url action) sound_off / sound_on (pycaw via system.volume_mute/unmute) thanks / stupid / off Smoke-tested: yaml.safe_load → 33 commands, ast.parse main.py → OK. Portability: USERPROFILE for screenshot path, $env:SystemDrive for disk, PATH lookup for tesseract before falling back to standard install dirs. No hardcoded user-specific paths.
2026-05-15 01:48:34 +03:00
action: {type: keys, sequence: 'nexttrack'}
music_prev:
phrases:
- предыдущая музыка
- предыдущий трек
- предыдущая мелодия
- предыдущая песня
- верни трек
- верни мелодию
- верни песню
- верни прошлый трек
- переключи на прошлый трек
feat: parity with rust fork — LLM auto-fallback + 6 new action types + 20+ commands Brings the python fork in line with the new feature/pc-tools work that landed in rust. Same UX, same trigger phrases, same env vars. config.py: + LLM_AUTO_FALLBACK = True + LLM_AUTO_FALLBACK_MIN_CHARS = 4 Mirrors the rust config knobs. The old "скажи X" trigger still works (VA_TBR strips it before intent matching, so what remains hits this fallback anyway) — but now ANY unrecognized query goes to Groq, not just "скажи" ones. main.py: va_respond: replaced the fuzz-on-"скажи" gate with a unified auto- fallback that fires whenever no command matches, GROQ_TOKEN is set, and the utterance is at least LLM_AUTO_FALLBACK_MIN_CHARS long. + _speak(text): recorder.stop() → tts.va_speak → start, used by the new action handlers so the mic doesn't pick up the assistant. + _set_clipboard(text): subprocess to PowerShell Set-Clipboard, no new python deps. + _strip_trigger(voice, triggers): shared helper for codegen/file_search where we need the text AFTER the trigger phrase. New action handlers (registered in run_action dispatch): + groq_codegen — extracts query, calls Groq with strict "code only" system prompt at temp 0.2, strips ```lang ... ``` fences, puts the result in the clipboard, speaks "Код в буфере, сэр. Строк: N". + ocr_screen — PowerShell System.Drawing screenshot to a temp PNG, shells to tesseract.exe (-l rus+eng), speaks a 120-char preview, clipboard. Looks for tesseract on PATH first then standard install dirs; gives a clear "Tesseract не установлен" if missing. + sysinfo — CIM-based battery/cpu/ram/disk via PS one-liners, time via python datetime (gets us localized weekday for free). Topics: time / battery / cpu / ram / disk / all. + file_search — strips trigger, recursive Get-ChildItem in Desktop/ Documents/Downloads (depth 3, top 5), opens explorer /select on the first hit, speaks count and basename. + audio_devices_panel — opens mmsys.cpl. Proper COM-based device switching (like the rust IPolicyConfig version) is deferred — TODO in backlog. commands.yaml: Total 33 commands (was 19). New: + open_notepad / open_calculator / open_explorer / open_terminal / open_settings / open_task_manager / lock_screen / screenshot — all via shell action (no AHK exes needed). + volume_up / volume_down — five chained keys=volumeup/volumedown presses each, like rust's _volume_helper.ps1 with Times=5. + media_stop — keys=stop. + sysinfo_time / sysinfo_battery / sysinfo_cpu / sysinfo_ram / sysinfo_disk / sysinfo_all — sysinfo action. + file_search, codegen, read_screen, switch_audio_device. Replaced (were AHK exes that Priler ships and we don't have): ~ music → keys playpause ~ music_off → keys playpause (toggle) ~ music_next → keys nexttrack ~ music_prev → keys prevtrack Removed (Priler hardware/setup specific, can't sensibly port): - gaming_mode_on / gaming_mode_off (display config switch) - music_save (depends on the specific player AHK was driving) - switch_to_headphones / switch_to_dynamics (replaced with the generic switch_audio_device that opens mmsys.cpl) Kept as-is (worked already, no AHK dependency): open_browser / open_youtube / open_google (url action) sound_off / sound_on (pycaw via system.volume_mute/unmute) thanks / stupid / off Smoke-tested: yaml.safe_load → 33 commands, ast.parse main.py → OK. Portability: USERPROFILE for screenshot path, $env:SystemDrive for disk, PATH lookup for tesseract before falling back to standard install dirs. No hardcoded user-specific paths.
2026-05-15 01:48:34 +03:00
action: {type: keys, sequence: 'prevtrack'}
feat: parity with rust fork — LLM auto-fallback + 6 new action types + 20+ commands Brings the python fork in line with the new feature/pc-tools work that landed in rust. Same UX, same trigger phrases, same env vars. config.py: + LLM_AUTO_FALLBACK = True + LLM_AUTO_FALLBACK_MIN_CHARS = 4 Mirrors the rust config knobs. The old "скажи X" trigger still works (VA_TBR strips it before intent matching, so what remains hits this fallback anyway) — but now ANY unrecognized query goes to Groq, not just "скажи" ones. main.py: va_respond: replaced the fuzz-on-"скажи" gate with a unified auto- fallback that fires whenever no command matches, GROQ_TOKEN is set, and the utterance is at least LLM_AUTO_FALLBACK_MIN_CHARS long. + _speak(text): recorder.stop() → tts.va_speak → start, used by the new action handlers so the mic doesn't pick up the assistant. + _set_clipboard(text): subprocess to PowerShell Set-Clipboard, no new python deps. + _strip_trigger(voice, triggers): shared helper for codegen/file_search where we need the text AFTER the trigger phrase. New action handlers (registered in run_action dispatch): + groq_codegen — extracts query, calls Groq with strict "code only" system prompt at temp 0.2, strips ```lang ... ``` fences, puts the result in the clipboard, speaks "Код в буфере, сэр. Строк: N". + ocr_screen — PowerShell System.Drawing screenshot to a temp PNG, shells to tesseract.exe (-l rus+eng), speaks a 120-char preview, clipboard. Looks for tesseract on PATH first then standard install dirs; gives a clear "Tesseract не установлен" if missing. + sysinfo — CIM-based battery/cpu/ram/disk via PS one-liners, time via python datetime (gets us localized weekday for free). Topics: time / battery / cpu / ram / disk / all. + file_search — strips trigger, recursive Get-ChildItem in Desktop/ Documents/Downloads (depth 3, top 5), opens explorer /select on the first hit, speaks count and basename. + audio_devices_panel — opens mmsys.cpl. Proper COM-based device switching (like the rust IPolicyConfig version) is deferred — TODO in backlog. commands.yaml: Total 33 commands (was 19). New: + open_notepad / open_calculator / open_explorer / open_terminal / open_settings / open_task_manager / lock_screen / screenshot — all via shell action (no AHK exes needed). + volume_up / volume_down — five chained keys=volumeup/volumedown presses each, like rust's _volume_helper.ps1 with Times=5. + media_stop — keys=stop. + sysinfo_time / sysinfo_battery / sysinfo_cpu / sysinfo_ram / sysinfo_disk / sysinfo_all — sysinfo action. + file_search, codegen, read_screen, switch_audio_device. Replaced (were AHK exes that Priler ships and we don't have): ~ music → keys playpause ~ music_off → keys playpause (toggle) ~ music_next → keys nexttrack ~ music_prev → keys prevtrack Removed (Priler hardware/setup specific, can't sensibly port): - gaming_mode_on / gaming_mode_off (display config switch) - music_save (depends on the specific player AHK was driving) - switch_to_headphones / switch_to_dynamics (replaced with the generic switch_audio_device that opens mmsys.cpl) Kept as-is (worked already, no AHK dependency): open_browser / open_youtube / open_google (url action) sound_off / sound_on (pycaw via system.volume_mute/unmute) thanks / stupid / off Smoke-tested: yaml.safe_load → 33 commands, ast.parse main.py → OK. Portability: USERPROFILE for screenshot path, $env:SystemDrive for disk, PATH lookup for tesseract before falling back to standard install dirs. No hardcoded user-specific paths.
2026-05-15 01:48:34 +03:00
media_stop:
phrases:
feat: parity with rust fork — LLM auto-fallback + 6 new action types + 20+ commands Brings the python fork in line with the new feature/pc-tools work that landed in rust. Same UX, same trigger phrases, same env vars. config.py: + LLM_AUTO_FALLBACK = True + LLM_AUTO_FALLBACK_MIN_CHARS = 4 Mirrors the rust config knobs. The old "скажи X" trigger still works (VA_TBR strips it before intent matching, so what remains hits this fallback anyway) — but now ANY unrecognized query goes to Groq, not just "скажи" ones. main.py: va_respond: replaced the fuzz-on-"скажи" gate with a unified auto- fallback that fires whenever no command matches, GROQ_TOKEN is set, and the utterance is at least LLM_AUTO_FALLBACK_MIN_CHARS long. + _speak(text): recorder.stop() → tts.va_speak → start, used by the new action handlers so the mic doesn't pick up the assistant. + _set_clipboard(text): subprocess to PowerShell Set-Clipboard, no new python deps. + _strip_trigger(voice, triggers): shared helper for codegen/file_search where we need the text AFTER the trigger phrase. New action handlers (registered in run_action dispatch): + groq_codegen — extracts query, calls Groq with strict "code only" system prompt at temp 0.2, strips ```lang ... ``` fences, puts the result in the clipboard, speaks "Код в буфере, сэр. Строк: N". + ocr_screen — PowerShell System.Drawing screenshot to a temp PNG, shells to tesseract.exe (-l rus+eng), speaks a 120-char preview, clipboard. Looks for tesseract on PATH first then standard install dirs; gives a clear "Tesseract не установлен" if missing. + sysinfo — CIM-based battery/cpu/ram/disk via PS one-liners, time via python datetime (gets us localized weekday for free). Topics: time / battery / cpu / ram / disk / all. + file_search — strips trigger, recursive Get-ChildItem in Desktop/ Documents/Downloads (depth 3, top 5), opens explorer /select on the first hit, speaks count and basename. + audio_devices_panel — opens mmsys.cpl. Proper COM-based device switching (like the rust IPolicyConfig version) is deferred — TODO in backlog. commands.yaml: Total 33 commands (was 19). New: + open_notepad / open_calculator / open_explorer / open_terminal / open_settings / open_task_manager / lock_screen / screenshot — all via shell action (no AHK exes needed). + volume_up / volume_down — five chained keys=volumeup/volumedown presses each, like rust's _volume_helper.ps1 with Times=5. + media_stop — keys=stop. + sysinfo_time / sysinfo_battery / sysinfo_cpu / sysinfo_ram / sysinfo_disk / sysinfo_all — sysinfo action. + file_search, codegen, read_screen, switch_audio_device. Replaced (were AHK exes that Priler ships and we don't have): ~ music → keys playpause ~ music_off → keys playpause (toggle) ~ music_next → keys nexttrack ~ music_prev → keys prevtrack Removed (Priler hardware/setup specific, can't sensibly port): - gaming_mode_on / gaming_mode_off (display config switch) - music_save (depends on the specific player AHK was driving) - switch_to_headphones / switch_to_dynamics (replaced with the generic switch_audio_device that opens mmsys.cpl) Kept as-is (worked already, no AHK dependency): open_browser / open_youtube / open_google (url action) sound_off / sound_on (pycaw via system.volume_mute/unmute) thanks / stupid / off Smoke-tested: yaml.safe_load → 33 commands, ast.parse main.py → OK. Portability: USERPROFILE for screenshot path, $env:SystemDrive for disk, PATH lookup for tesseract before falling back to standard install dirs. No hardcoded user-specific paths.
2026-05-15 01:48:34 +03:00
- стоп музыка
- полная тишина
action: {type: keys, sequence: 'stop'}
feat: parity with rust fork — LLM auto-fallback + 6 new action types + 20+ commands Brings the python fork in line with the new feature/pc-tools work that landed in rust. Same UX, same trigger phrases, same env vars. config.py: + LLM_AUTO_FALLBACK = True + LLM_AUTO_FALLBACK_MIN_CHARS = 4 Mirrors the rust config knobs. The old "скажи X" trigger still works (VA_TBR strips it before intent matching, so what remains hits this fallback anyway) — but now ANY unrecognized query goes to Groq, not just "скажи" ones. main.py: va_respond: replaced the fuzz-on-"скажи" gate with a unified auto- fallback that fires whenever no command matches, GROQ_TOKEN is set, and the utterance is at least LLM_AUTO_FALLBACK_MIN_CHARS long. + _speak(text): recorder.stop() → tts.va_speak → start, used by the new action handlers so the mic doesn't pick up the assistant. + _set_clipboard(text): subprocess to PowerShell Set-Clipboard, no new python deps. + _strip_trigger(voice, triggers): shared helper for codegen/file_search where we need the text AFTER the trigger phrase. New action handlers (registered in run_action dispatch): + groq_codegen — extracts query, calls Groq with strict "code only" system prompt at temp 0.2, strips ```lang ... ``` fences, puts the result in the clipboard, speaks "Код в буфере, сэр. Строк: N". + ocr_screen — PowerShell System.Drawing screenshot to a temp PNG, shells to tesseract.exe (-l rus+eng), speaks a 120-char preview, clipboard. Looks for tesseract on PATH first then standard install dirs; gives a clear "Tesseract не установлен" if missing. + sysinfo — CIM-based battery/cpu/ram/disk via PS one-liners, time via python datetime (gets us localized weekday for free). Topics: time / battery / cpu / ram / disk / all. + file_search — strips trigger, recursive Get-ChildItem in Desktop/ Documents/Downloads (depth 3, top 5), opens explorer /select on the first hit, speaks count and basename. + audio_devices_panel — opens mmsys.cpl. Proper COM-based device switching (like the rust IPolicyConfig version) is deferred — TODO in backlog. commands.yaml: Total 33 commands (was 19). New: + open_notepad / open_calculator / open_explorer / open_terminal / open_settings / open_task_manager / lock_screen / screenshot — all via shell action (no AHK exes needed). + volume_up / volume_down — five chained keys=volumeup/volumedown presses each, like rust's _volume_helper.ps1 with Times=5. + media_stop — keys=stop. + sysinfo_time / sysinfo_battery / sysinfo_cpu / sysinfo_ram / sysinfo_disk / sysinfo_all — sysinfo action. + file_search, codegen, read_screen, switch_audio_device. Replaced (were AHK exes that Priler ships and we don't have): ~ music → keys playpause ~ music_off → keys playpause (toggle) ~ music_next → keys nexttrack ~ music_prev → keys prevtrack Removed (Priler hardware/setup specific, can't sensibly port): - gaming_mode_on / gaming_mode_off (display config switch) - music_save (depends on the specific player AHK was driving) - switch_to_headphones / switch_to_dynamics (replaced with the generic switch_audio_device that opens mmsys.cpl) Kept as-is (worked already, no AHK dependency): open_browser / open_youtube / open_google (url action) sound_off / sound_on (pycaw via system.volume_mute/unmute) thanks / stupid / off Smoke-tested: yaml.safe_load → 33 commands, ast.parse main.py → OK. Portability: USERPROFILE for screenshot path, $env:SystemDrive for disk, PATH lookup for tesseract before falling back to standard install dirs. No hardcoded user-specific paths.
2026-05-15 01:48:34 +03:00
switch_audio_device:
phrases:
feat: parity with rust fork — LLM auto-fallback + 6 new action types + 20+ commands Brings the python fork in line with the new feature/pc-tools work that landed in rust. Same UX, same trigger phrases, same env vars. config.py: + LLM_AUTO_FALLBACK = True + LLM_AUTO_FALLBACK_MIN_CHARS = 4 Mirrors the rust config knobs. The old "скажи X" trigger still works (VA_TBR strips it before intent matching, so what remains hits this fallback anyway) — but now ANY unrecognized query goes to Groq, not just "скажи" ones. main.py: va_respond: replaced the fuzz-on-"скажи" gate with a unified auto- fallback that fires whenever no command matches, GROQ_TOKEN is set, and the utterance is at least LLM_AUTO_FALLBACK_MIN_CHARS long. + _speak(text): recorder.stop() → tts.va_speak → start, used by the new action handlers so the mic doesn't pick up the assistant. + _set_clipboard(text): subprocess to PowerShell Set-Clipboard, no new python deps. + _strip_trigger(voice, triggers): shared helper for codegen/file_search where we need the text AFTER the trigger phrase. New action handlers (registered in run_action dispatch): + groq_codegen — extracts query, calls Groq with strict "code only" system prompt at temp 0.2, strips ```lang ... ``` fences, puts the result in the clipboard, speaks "Код в буфере, сэр. Строк: N". + ocr_screen — PowerShell System.Drawing screenshot to a temp PNG, shells to tesseract.exe (-l rus+eng), speaks a 120-char preview, clipboard. Looks for tesseract on PATH first then standard install dirs; gives a clear "Tesseract не установлен" if missing. + sysinfo — CIM-based battery/cpu/ram/disk via PS one-liners, time via python datetime (gets us localized weekday for free). Topics: time / battery / cpu / ram / disk / all. + file_search — strips trigger, recursive Get-ChildItem in Desktop/ Documents/Downloads (depth 3, top 5), opens explorer /select on the first hit, speaks count and basename. + audio_devices_panel — opens mmsys.cpl. Proper COM-based device switching (like the rust IPolicyConfig version) is deferred — TODO in backlog. commands.yaml: Total 33 commands (was 19). New: + open_notepad / open_calculator / open_explorer / open_terminal / open_settings / open_task_manager / lock_screen / screenshot — all via shell action (no AHK exes needed). + volume_up / volume_down — five chained keys=volumeup/volumedown presses each, like rust's _volume_helper.ps1 with Times=5. + media_stop — keys=stop. + sysinfo_time / sysinfo_battery / sysinfo_cpu / sysinfo_ram / sysinfo_disk / sysinfo_all — sysinfo action. + file_search, codegen, read_screen, switch_audio_device. Replaced (were AHK exes that Priler ships and we don't have): ~ music → keys playpause ~ music_off → keys playpause (toggle) ~ music_next → keys nexttrack ~ music_prev → keys prevtrack Removed (Priler hardware/setup specific, can't sensibly port): - gaming_mode_on / gaming_mode_off (display config switch) - music_save (depends on the specific player AHK was driving) - switch_to_headphones / switch_to_dynamics (replaced with the generic switch_audio_device that opens mmsys.cpl) Kept as-is (worked already, no AHK dependency): open_browser / open_youtube / open_google (url action) sound_off / sound_on (pycaw via system.volume_mute/unmute) thanks / stupid / off Smoke-tested: yaml.safe_load → 33 commands, ast.parse main.py → OK. Portability: USERPROFILE for screenshot path, $env:SystemDrive for disk, PATH lookup for tesseract before falling back to standard install dirs. No hardcoded user-specific paths.
2026-05-15 01:48:34 +03:00
- переключи устройство
- смени вывод
- переключи на наушники
- переключи на колонки
- переключи на динамики
- открой настройки звука
action: {type: audio_devices_panel}
sysinfo_time:
phrases:
- сколько времени
- который час
- какой сегодня день
- какое сегодня число
action: {type: sysinfo, topic: time}
sysinfo_battery:
phrases:
- сколько заряда
- заряд батареи
- сколько процентов батареи
action: {type: sysinfo, topic: battery}
sysinfo_cpu:
phrases:
- загрузка процессора
- сколько процессор
- нагрузка цпу
action: {type: sysinfo, topic: cpu}
sysinfo_ram:
phrases:
- сколько памяти
- сколько оперативки
- загрузка оперативки
- сколько свободной памяти
action: {type: sysinfo, topic: ram}
sysinfo_disk:
phrases:
- сколько свободно на диске
- сколько места на диске
- сколько свободно на компе
action: {type: sysinfo, topic: disk}
sysinfo_all:
phrases:
- статус системы
- что с компьютером
- состояние пк
- что по системе
action: {type: sysinfo, topic: all}
file_search:
phrases:
- найди файл
- найди документ
- поиск файла
- ищи файл
- где файл
action: {type: file_search}
codegen:
phrases:
- напиши код
- сгенерируй код
- набросай код
- сделай скрипт
- напиши скрипт
- сгенерируй скрипт
action: {type: groq_codegen}
read_screen:
phrases:
- прочитай экран
- что на экране
- распознай текст с экрана
- что написано на экране
- сними текст с экрана
action: {type: ocr_screen}
thanks:
phrases:
- спасибо
- молодец
- респект
- ты супер
- отличная работа
- ты крут
- ты большой молодец
- ты реально крут
- ты афигенный
action: {type: play_sound, name: thanks}
2023-04-16 16:59:18 +05:00
stupid:
phrases:
- ты дурак
- ты дебил
- ты глупый
- ты тупой
action: {type: play_sound, name: stupid}
'off':
phrases:
- выключись
- вырубись
- завершить работу
- закройся
- отключись
- заверши свою работу
- на сегодня хватит
- выгрузи себя из памяти
- ты мне надоел
- пора спать
action:
type: multi
steps:
- {type: play_sound, name: "off"}
- {type: system, op: exit}