Major test coverage push: pins IPC wire format, scheduler parser/serde,
runtime_config env handling. Plus two debug/discovery packs.
Tests (62 → 99, +37)
IPC roundtrip (new file crates/jarvis-core/src/ipc/tests.rs, +19 tests)
- Event tags use snake_case ("wake_word_detected", "speech_recognized", ...)
- Idle event has minimal payload (tag only, no extra fields)
- SpeechRecognized/LlmReply/Error carry their text payloads
- CommandExecuted carries id + success bool
- HealthSnapshot full shape: tts/llm/llm_model/profile/memory_facts/
scheduled_tasks/language/version
- HealthSnapshot handles llm_model:null / version:null
- Cross-variant invariant: every event has snake-case "event" tag
- Action parsing: stop / ping / text_command / set_muted / switch_llm /
reload_llm / query_health
- Unknown action variant errors out
- switch_llm requires "backend" field (missing field errors)
runtime_config (was 2, now 11 tests, +9)
- get_bool recognises 1/true/yes/on (case-insensitive)
- get_bool falsifies 0/false/no/off/anything-else
- get() strips whitespace, empty = unset
- llm_router_threshold default 0.55 / custom parse / garbage fallback
- llm_tts_enabled default true, recognises "false"
- llm_router_enabled default true
- Uses unique env var names per test to avoid thread races
scheduler (was 10, now 19 tests, +9)
- parse_in_hours yields Once
- parse_at_today_or_tomorrow
- parse_at_rejects_bad_time (25:00, 12:99, "notatime")
- parse_daily_rejects_bad_hour (24:00, 12:60)
- parse_every_seconds
- parse_unrecognised_spec_errors ("nonsense", "daily", "every")
- task_serde_round_trip preserves last_fired + action variant
- schedule_kind_tag_in_json pins {"kind":"daily","hour":...,"minute":...}
- action_serde_lua_variant roundtrip
New packs
resources/commands/intro/ (3 commands)
- intro.capabilities "что ты умеешь" / "помощь" / "помоги"
→ speaks a 7-line category overview
- intro.about "расскажи о себе" / "кто ты такой"
→ LLM-varied bio with profile name
Falls back to canned text if LLM unavailable.
- intro.commands_count "сколько команд знаешь"
→ reads jarvis.health() and reports backends + counts
resources/commands/echo/ (2 commands)
- echo.repeat "повтори за мной X" → speaks X verbatim
Preserves original casing by re-grabbing from raw phrase.
- echo.what_did_i_say "что я сказал" → echoes jarvis.context.phrase
- Both useful for testing mic-pickup + STT-quality + TTS-clarity without
touching LLM. If user can't hear/understand the echo, the issue is the
audio chain, not the command logic.
Build: cargo build --release green. 99/99 tests pass.
35 lines
717 B
TOML
35 lines
717 B
TOML
# Echo debug pack — Jarvis repeats what you said. Useful for testing mic+TTS
|
||
# without involving wake-word or LLM.
|
||
|
||
[[commands]]
|
||
id = "echo.repeat"
|
||
type = "lua"
|
||
script = "repeat.lua"
|
||
sandbox = "minimal"
|
||
timeout = 3000
|
||
|
||
[commands.phrases]
|
||
ru = [
|
||
"повтори за мной",
|
||
"скажи как я",
|
||
"эхо",
|
||
"проверка эхо",
|
||
]
|
||
en = ["repeat after me", "echo"]
|
||
ua = ["повтори за мною", "ехо"]
|
||
|
||
|
||
[[commands]]
|
||
id = "echo.what_did_i_say"
|
||
type = "lua"
|
||
script = "what.lua"
|
||
sandbox = "minimal"
|
||
timeout = 2000
|
||
|
||
[commands.phrases]
|
||
ru = [
|
||
"что я сказал",
|
||
"что ты услышал",
|
||
]
|
||
en = ["what did i say", "what did you hear"]
|
||
ua = ["що я сказав"]
|