feat: Wave 8 — bedtime/morning/coffee routine packs
routines/good_night: - Switch profile to "sleep" (silences idle banter overnight). - Cancel one-shot timers (Таймер:/Timer:/Кухня:/Cooking: name prefix) so a forgotten 6-hour reminder doesn't wake the user up. - Speak a varied 5-line RU/EN good night with cancelled-count suffix. - Deliberately does NOT lock PC / shut displays — too destructive without an explicit confirm step. routines/good_morning: - Switch profile back to "default". - Report scheduled task count for the day. - Speak a varied 5-line greeting with agenda preview. routines/coffee_break: - Pause idle banter so Jarvis isn't talking to an empty chair. - Schedule a 5-minute check-in via the persistent scheduler. - Speak a varied 3-line acknowledgement. Pack count: 97 → 98 (one pack, three commands). Tests: 140 still pass.
This commit is contained in:
parent
7e1d1c3cc7
commit
bb2799ed8c
4 changed files with 193 additions and 0 deletions
45
resources/commands/routines/good_morning.lua
Normal file
45
resources/commands/routines/good_morning.lua
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
-- "Good morning" routine:
|
||||
-- 1. switch active profile back to "default"
|
||||
-- 2. count today's scheduled tasks
|
||||
-- 3. reply with a varied morning greeting + agenda hint
|
||||
|
||||
local lang = jarvis.context.language
|
||||
|
||||
pcall(function() jarvis.profile.set("default") end)
|
||||
|
||||
local tasks_today = jarvis.scheduler.list() or {}
|
||||
local n_tasks = #tasks_today
|
||||
|
||||
local lines_ru = {
|
||||
"Доброе утро, сэр. Системы в порядке.",
|
||||
"Доброе утро. Готов к новому дню.",
|
||||
"С пробуждением, сэр. День в норме.",
|
||||
"Доброе утро, сэр. Кофе сам себя не сварит.",
|
||||
"Доброе утро. Все онлайн, рапорт по запросу.",
|
||||
}
|
||||
local lines_en = {
|
||||
"Good morning, sir. All systems nominal.",
|
||||
"Good morning. Ready for the day.",
|
||||
"Welcome back, sir. The day looks normal.",
|
||||
"Good morning, sir. The coffee won't brew itself.",
|
||||
"Good morning. Everything online, ready when you are.",
|
||||
}
|
||||
local pool = (lang == "ru") and lines_ru or lines_en
|
||||
local greeting = pool[math.random(#pool)]
|
||||
|
||||
local agenda
|
||||
if n_tasks > 0 then
|
||||
if lang == "ru" then
|
||||
agenda = " В расписании " .. tostring(n_tasks) .. ", скажите 'покажи расписание', чтобы услышать."
|
||||
else
|
||||
agenda = " " .. tostring(n_tasks) .. " scheduled — say 'show schedule' for details."
|
||||
end
|
||||
else
|
||||
if lang == "ru" then
|
||||
agenda = " Расписание чистое."
|
||||
else
|
||||
agenda = " Schedule is clear."
|
||||
end
|
||||
end
|
||||
|
||||
return jarvis.cmd.ok(greeting .. agenda)
|
||||
Loading…
Add table
Add a link
Reference in a new issue