feat(commands): analog-inspired tier-2 — news, currency, crypto, fun, wiki, power, help (33 packs)
Seven more portable Lua packs lifted from common voice-assistant playbooks (Siri/Alexa/Алиса/Cortana). All sandbox=full, jarvis.http + jarvis.system.exec, zero new Rust code. cargo test still 3/3. news/ — pulls Lenta.ru RSS (en switches to BBC), regex-extracts the top 5 <title> entries (skipping the channel header), drops them into the clipboard, then asks Groq for a 2-3 sentence summary at temp 0.4 and speaks it via SAPI. If GROQ_TOKEN is missing it falls back to just reading the first three headlines. currency/ — cbr-xml-daily.ru/daily_json.js. Picks USD/EUR/CNY/GBP/ JPY/KZT by keyword in the phrase, computes value / nominal, diffs against Valute.Previous, says "X стоит N рублей, поднялся/опустился на M" with ▲/▼ in the notify body. crypto/ — CoinGecko simple/price with usd,rub and 24hr_change. Recognises bitcoin / ethereum / solana / dogecoin / the-open-network. Reports price + direction in plain Russian. fun/ — joke / fact / quote / compliment, single ask.lua dispatched by command_id. Per-command system prompt at temp 1.0; seeds with a random integer so consecutive calls don't repeat. wiki/ — ru.wikipedia opensearch → REST summary endpoint. If Groq is available and extract > 350 chars, asks for a 2-3 sentence retell; otherwise speaks the first 400 chars verbatim. Full extract goes to clipboard. power/ — shutdown_pc / restart_pc / sleep_pc / hibernate_pc / logoff_user / cancel_shutdown. Single act.lua keyed by command_id. shutdown/restart use shutdown.exe /s|/r /t 30 with a /c message — 30-second grace window so "отмени выключение" actually works. sleep uses rundll32 powrprof,SetSuspendState, hibernate uses shutdown.exe /h. help/ — "что ты умеешь". Reads the parent commands/ dir via jarvis.fs.list, sorts subdirs (pack names), pairs each with a hardcoded Russian/English one-liner description, copies the full list to clipboard and speaks a count + "see clipboard for full list". Total command packs is now 33 (was 26).
This commit is contained in:
parent
dcee98bddf
commit
9d8b917149
14 changed files with 749 additions and 0 deletions
50
resources/commands/fun/command.toml
Normal file
50
resources/commands/fun/command.toml
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
[[commands]]
|
||||
id = "joke"
|
||||
type = "lua"
|
||||
script = "ask.lua"
|
||||
sandbox = "full"
|
||||
timeout = 15000
|
||||
|
||||
[commands.phrases]
|
||||
ru = ["расскажи шутку", "пошути", "анекдот", "рассмеши меня"]
|
||||
en = ["tell a joke", "make me laugh", "joke"]
|
||||
ua = ["розкажи жарт", "пожартуй"]
|
||||
|
||||
|
||||
[[commands]]
|
||||
id = "fact"
|
||||
type = "lua"
|
||||
script = "ask.lua"
|
||||
sandbox = "full"
|
||||
timeout = 15000
|
||||
|
||||
[commands.phrases]
|
||||
ru = ["расскажи факт", "интересный факт", "поделись фактом"]
|
||||
en = ["tell a fact", "interesting fact"]
|
||||
ua = ["цікавий факт"]
|
||||
|
||||
|
||||
[[commands]]
|
||||
id = "quote"
|
||||
type = "lua"
|
||||
script = "ask.lua"
|
||||
sandbox = "full"
|
||||
timeout = 15000
|
||||
|
||||
[commands.phrases]
|
||||
ru = ["вдохнови меня", "цитата дня", "мотивируй", "процитируй кого-нибудь"]
|
||||
en = ["inspire me", "quote of the day", "motivate me"]
|
||||
ua = ["надихни", "цитата дня"]
|
||||
|
||||
|
||||
[[commands]]
|
||||
id = "compliment"
|
||||
type = "lua"
|
||||
script = "ask.lua"
|
||||
sandbox = "full"
|
||||
timeout = 15000
|
||||
|
||||
[commands.phrases]
|
||||
ru = ["сделай комплимент", "похвали меня"]
|
||||
en = ["compliment me", "say something nice"]
|
||||
ua = ["зроби комплімент"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue