resources/commands/birthdays/ (2 commands):
- birthdays.add "запомни день рождения мама 15 марта" → memory key
"birthday.мама" = "15.03". Accepts both DD.MM and "DD <month>"
formats; recognises all 12 RU + 12 EN month names.
- birthdays.next "ближайший день рождения" → reads every "birthday.*"
memory key, computes days-until each entry (with year wrap), speaks
the nearest one in human form ("сегодня" / "завтра" / "через N дней").
Storage piggybacks on the existing long-term memory store, so
birthdays survive restart, sync to disk atomically, and don't need a
new persistence layer. Naming convention "birthday.<name>" keeps the
data discoverable in /memory GUI.
Pack count: 99 → 100 functional packs.
Tests: 140 rust, unchanged.
50 lines
1.3 KiB
TOML
50 lines
1.3 KiB
TOML
# Birthday tracker — voice-add and check upcoming birthdays.
|
||
# Storage uses `jarvis.memory.remember` with keys "birthday.<name>" so the
|
||
# data lives in the same long-term memory store and survives across packs.
|
||
#
|
||
# Voice flow:
|
||
# "запомни день рождения мама 15 марта"
|
||
# → memory key "birthday.мама" = "15.03"
|
||
# "ближайший день рождения" → reads all "birthday.*" keys + tells the next
|
||
# "день рождения мама" → reads back what we know about Mom
|
||
|
||
[[commands]]
|
||
id = "birthdays.add"
|
||
type = "lua"
|
||
script = "add.lua"
|
||
sandbox = "standard"
|
||
timeout = 3000
|
||
|
||
[commands.phrases]
|
||
ru = [
|
||
"запомни день рождения",
|
||
"день рождения у",
|
||
"добавь день рождения",
|
||
"запиши день рождения",
|
||
]
|
||
en = [
|
||
"remember birthday",
|
||
"add birthday",
|
||
"save birthday",
|
||
]
|
||
|
||
|
||
[[commands]]
|
||
id = "birthdays.next"
|
||
type = "lua"
|
||
script = "next.lua"
|
||
sandbox = "standard"
|
||
timeout = 3000
|
||
|
||
[commands.phrases]
|
||
ru = [
|
||
"ближайший день рождения",
|
||
"у кого скоро день рождения",
|
||
"кто следующий именинник",
|
||
"когда следующий день рождения",
|
||
]
|
||
en = [
|
||
"next birthday",
|
||
"whose birthday is next",
|
||
"upcoming birthdays",
|
||
]
|