media/ — play_pause, next, prev, stop via user32!keybd_event (VK_MEDIA_*
0xB0..0xB3). Helper _media_helper.ps1 mirrors the volume/ pack pattern,
so the same C# P/Invoke style works for the four standard media keys
without needing any external tooling. Catches Spotify, foobar, browsers,
Yandex Music PWA — anything that responds to system media keys.
sysinfo/ — battery / time / cpu / ram / disk and an "all" combo.
_sysinfo.ps1 uses CIM queries (Win32_Battery, Win32_OperatingSystem,
Win32_LogicalDisk, Win32_Processor + Win32_PerfFormattedData_PerfOS_
Processor) — no external deps. Time is rendered in ru-RU culture
("01:17, 15 мая, пятница"). Battery falls back to a friendly "no
battery, looks like a desktop" when Win32_Battery is empty. SystemDrive
env var resolves the right disk on non-C:/ installs.
Each sysinfo command notifies the line as a Windows toast and logs it.
Triggered locally: sysinfo_all currently reports:
Сейчас: 01:17, 15 мая, пятница
Батарея не обнаружена (видимо, десктоп)
CPU: AMD Ryzen 7 5700X3D 8-Core Processor, загрузка 4%
RAM: 23.4 из 47.9 ГБ (49% занято)
Диск C:: свободно 118.2 из 1906.8 ГБ
Total command packs is now 9 (verified via jarvis-gui startup log).
Portability: all PowerShell helpers use $env:SystemDrive and CIM
classes that ship with every Windows install; Lua wrappers resolve
the helper path via jarvis.context.command_path (no hardcoded user
profile paths or absolute C:\ refs).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three unit tests catch the kind of bug that broke weather/set_city (a
phrases array instead of lang→array map silently dropped the whole pack):
- every_command_toml_parses: every resources/commands/*/command.toml round-
trips through toml::from_str::<JCommandsList>. Reports all failures at
once instead of failing on the first.
- lua_command_scripts_exist: for every type="lua" command, the named (or
default script.lua) script file exists in the pack dir.
- every_command_has_phrases: structural commands (terminate/stop_chaining)
excluded, every other command has ≥1 phrase across all languages.
Tests use env!("CARGO_MANIFEST_DIR") -> ../.. -> resources/commands so they
work from any cwd.
NB: cargo test does not run on this machine right now — aws-lc-sys needs
cl.exe (MSVC Build Tools missing). The release binary was built earlier
with MSVC available; toolchain install is a follow-up. The tests are still
valid for CI / a re-armed dev box.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
All four packs are pure Lua (sandbox=full) and call out to PowerShell helpers
where COM / native APIs are needed. No new Rust code, no rebuild required:
post_build.py --sync copies them under target/{debug,release}/resources/.
volume/
- volume_up / volume_down: 5x VK_VOLUME_UP|DOWN via keybd_event
- volume_mute: VK_VOLUME_MUTE
- volume_max: 50x VK_VOLUME_UP (system clamps)
Helper _volume_helper.ps1 P/Invokes user32!keybd_event.
apps/
- open_browser : start "" https://www.google.com (uses system default browser)
- open_notepad : notepad.exe
- open_calculator: calc.exe
- open_explorer : explorer.exe
- open_terminal : wt.exe, falls back to powershell.exe
- open_settings : ms-settings: protocol
- open_task_manager: taskmgr.exe
- lock_screen : rundll32 user32.dll,LockWorkStation
- screenshot : System.Drawing capture to ~/Pictures/jarvis_screenshot_*.png
file_search/
- find file <query> : recursive Get-ChildItem in Desktop/Documents/Downloads
(depth 3, top 5 matches). Strips Russian/English/Ukrainian trigger
prefixes from the recognized phrase, then opens explorer /select on the
first hit and notifies with the total count.
output_device/
- list_output_devices : enumerates active render endpoints via
IMMDeviceEnumerator and notifies friendly names with indices
- next_output_device : cycles the system default render device via the
undocumented IPolicyConfig::SetDefaultEndpoint (eConsole/Multimedia/
Communications). Tested locally — listed 7 devices, current correctly
identified at index 5.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
set_city used a plain `phrases = [...]` array which fails the lang-map schema
in JCommand — the whole weather pack was being skipped at load. Normalized
to per-language phrases.
browser/command.toml pointed at Priler's bundled AutoHotKey exes that do not
ship in this fork, so the entries were dead. Renamed to .disabled (the loader
skips packs without command.toml) so we do not collide with the new Lua
apps pack while keeping the directory for reference.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>