J.A.R.V.I.S-rust/resources/commands/expenses
Bossiara13 87bb186e94
Some checks are pending
Rust CI / cargo test (jarvis-core) (push) Waiting to run
Rust CI / cargo clippy (push) Waiting to run
Rust CI / cargo check (workspace) (push) Waiting to run
feat: Wave 10 — expense tracker pack (voice-driven)
resources/commands/expenses/ (4 commands):
- expenses.log     "потратил 500 на еду"     → append entry
- expenses.today   "сколько потратил сегодня" → today's total
- expenses.week    "сколько на неделе"       → 7-day rolling total
- expenses.breakdown "куда ушли деньги"      → top-5 categories

Storage: `jarvis.state` (auto-namespaced per-pack JSON). Wire format is
compact "ts1,amount1,cat1|ts2,amount2,cat2" so we don't need a JSON parser
inside Lua.

Phrase parsing:
- Trigger stripped via jarvis.text.strip_trigger.
- First number captured; "12,50" comma decimals accepted.
- Category extracted from "на <слово>" (RU) or "for/on <word>" (EN);
  defaults to "разное" / "misc".

Time math:
- Day boundary: local-calendar midnight via os.time({year,month,day,...}).
- Week boundary: rolling 7×86400 seconds.

Pack count: 98 → 99 functional.
2026-05-16 14:57:58 +03:00
..
breakdown.lua feat: Wave 10 — expense tracker pack (voice-driven) 2026-05-16 14:57:58 +03:00
command.toml feat: Wave 10 — expense tracker pack (voice-driven) 2026-05-16 14:57:58 +03:00
log.lua feat: Wave 10 — expense tracker pack (voice-driven) 2026-05-16 14:57:58 +03:00
today.lua feat: Wave 10 — expense tracker pack (voice-driven) 2026-05-16 14:57:58 +03:00
week.lua feat: Wave 10 — expense tracker pack (voice-driven) 2026-05-16 14:57:58 +03:00