feat: Wave 1 — 10 new packs (75 → 85 rust packs)

User picked from the fishki roadmap; this commit ships the 10 easy/medium
ones in one batch. No Rust core changes — all pure Lua + jarvis.* APIs.

Pack catalog

magic_8ball
  - "ответь да или нет" / "магический шар" / "что скажешь"
  - 15 канонических ответов, random pick. Pure fun.

github_issues (2 cmds)
  - "какие issues" / "открытые issues" — gh issue list по сохранённому репо
  - "мои issues" / "что мне назначено" — gh issue list --assignee @me

weather_extended (2 cmds, Open-Meteo, no key)
  - "погода завтра" — temp min/max + conditions + rain note
  - "прогноз на неделю" — общий диапазон температур
  - Auto-detects location via ipinfo.io if not in memory; stores lat/lon/city.

rss_reader (3 cmds)
  - "добавь rss <url>" — extracts URL, persists via memory под ключом "rss.<domain>"
  - "что в ленте" — fetches first feed, parses <title> tags, speaks top 3
  - "какие у меня rss" — lists subscribed feed domains

ics_event
  - "добавь встречу завтра в 15:00 обсудить проект"
  - Parses time (HH:MM или "в HH") + date keywords (сегодня/завтра/послезавтра)
  - Writes valid iCalendar v2.0 file to ~/Documents/jarvis-events/
  - jarvis.system.open → дефолтный handler (Outlook/Mail/whatever)

backup
  - "сделай бекап" — PowerShell Compress-Archive всех state files из APPDATA/Jarvis
  - Outputs to ~/Documents/jarvis-backup-<YYYYMMDD-HHMMSS>.zip
  - Bundles: long_term_memory, schedule, macros, profiles/, active_profile, llm_backend, settings

clip_history (3 cmds, 20-slot rolling buffer)
  - "запиши буфер" — push current clipboard onto memory keys clip.0..clip.19
  - "что я копировал" — speak preview of last 3
  - "верни первый/второй/третий буфер" — restore clip.N to clipboard

notif_queue (2 cmds)
  - "что я пропустил" — enumerate memory keys "notif.*", speak last 5 by recency
  - "очисти уведомления" — purge all notif.* keys
  - Producers (scheduler/macros/llm) can later push to memory[notif.<ts>] = text

password_vault (3 cmds, Windows DPAPI)
  - "сохрани пароль от GitHub" — encrypts current clipboard content via DPAPI
    (CurrentUser scope), base64-stored in memory[vault.GitHub]. Clears clipboard.
    Password is NEVER spoken or written to disk in plaintext.
  - "пароль от GitHub" — decrypts via DPAPI, restores to clipboard for 30 sec,
    schedules auto-clear via jarvis.scheduler. Speaks only "Пароль от X в буфере."
  - "какие у меня пароли" — list of stored service names.

habit_streaks (2 cmds, integrates with habit_nudge)
  - "сколько дней подряд" / "статистика привычек" — reads memory keys
    "habit_streak.<habit>.<YYYY-MM-DD>", computes consecutive-day streak per habit.
  - "я попил воды" / "отметь привычку" — marks today's check-in.
    Maps voice to habit: воды→water, размял/зарядк→stretch, глаз→eyes.

Tests: 6 commands tests pass (auto-validate the 10 new packs).
This commit is contained in:
Bossiara13 2026-05-16 01:04:23 +03:00
parent 4d3d664abd
commit c4b22618f8
30 changed files with 1086 additions and 0 deletions

View file

@ -0,0 +1,55 @@
# Clipboard history — store last 20 copies, recall by index/keyword.
[[commands]]
id = "cliphist.save"
type = "lua"
script = "save.lua"
sandbox = "full"
timeout = 3000
[commands.phrases]
ru = [
"запиши буфер",
"сохрани буфер",
"запомни буфер",
"запомни что в буфере",
]
en = ["save clipboard", "remember clipboard"]
ua = ["запам'ятай буфер"]
[[commands]]
id = "cliphist.list"
type = "lua"
script = "list.lua"
sandbox = "minimal"
timeout = 3000
[commands.phrases]
ru = [
"что я копировал",
"история буфера",
"последние буферы",
"что было в буфере",
]
en = ["clipboard history", "what did I copy"]
ua = ["що я копіював"]
[[commands]]
id = "cliphist.restore"
type = "lua"
script = "restore.lua"
sandbox = "full"
timeout = 3000
[commands.phrases]
ru = [
"верни первый буфер",
"верни второй буфер",
"верни третий буфер",
"восстанови буфер",
"вставь старый буфер",
]
en = ["restore clipboard", "paste old clipboard"]
ua = ["поверни буфер"]

View file

@ -0,0 +1,21 @@
-- Speak first 30 chars of each stored clip.
local count = 0
local line = "В истории буфера: "
for i = 0, 19 do
local val = jarvis.memory.recall("clip." .. i)
if val then
count = count + 1
if count <= 3 then
local preview = val:sub(1, 30):gsub("\r?\n", " ")
line = line .. (count == 1 and "" or " | ") .. preview
if count == 3 then break end
end
end
end
if count == 0 then
return jarvis.cmd.ok("История буфера пуста.")
end
line = line .. ". Всего " .. count .. " записей."
return jarvis.cmd.ok(line)

View file

@ -0,0 +1,21 @@
-- "Верни первый/второй/третий буфер" — copy to clipboard.
local phrase = (jarvis.context.phrase or ""):lower()
local idx = 0 -- "первый" = 0 (most recent)
if phrase:find("втор") then idx = 1
elseif phrase:find("трет") then idx = 2
elseif phrase:find("четверт") then idx = 3
elseif phrase:find("пят") then idx = 4
end
-- Allow explicit number "вставь буфер 3"
local n = phrase:match("(%d+)")
if n then idx = tonumber(n) - 1 end -- 1-based → 0-based
local content = jarvis.memory.recall("clip." .. idx)
if not content then
return jarvis.cmd.not_found("В истории нет такой записи.")
end
jarvis.system.clipboard.set(content)
local preview = content:sub(1, 30):gsub("\r?\n", " ")
return jarvis.cmd.ok("Восстановил: " .. preview .. ".")

View file

@ -0,0 +1,24 @@
-- Take whatever's in the clipboard and push into history (memory keys clip.0..clip.19, rotated).
local content = jarvis.system.clipboard.get()
if not content or content == "" then
return jarvis.cmd.not_found("Буфер пуст.")
end
-- Shift existing entries: clip.18 → clip.19, clip.17 → clip.18, etc.
for i = 19, 1, -1 do
local prev = jarvis.memory.recall("clip." .. (i - 1))
if prev then
jarvis.memory.remember("clip." .. i, prev)
end
end
-- Truncate if huge
local trimmed = content
if #trimmed > 2000 then
trimmed = trimmed:sub(1, 2000) .. "..."
end
jarvis.memory.remember("clip.0", trimmed)
-- Speak first 40 chars as confirmation
local preview = trimmed:sub(1, 40):gsub("\r?\n", " ")
return jarvis.cmd.ok("Запомнил: " .. preview .. ".")