Commit graph

31 commits

Author SHA1 Message Date
Bossiara13
429113175a build(core): add build.rs so cargo test links against libvosk
cargo test on jarvis-core was failing with `LNK1181 cannot open input
file "libvosk.lib"`. The link-search path is declared in jarvis-app's
build.rs (and jarvis-cli's), but the test binary for jarvis-core has
no such config and the workspace .cargo/config.toml didn't cover it.

Adds a minimal build.rs that emits `cargo:rustc-link-search=native=...`
pointing at lib/windows/amd64 (resolved relative to CARGO_MANIFEST_DIR,
no hardcoded absolute paths so the project still builds for anyone
cloning under a different drive/path).

Verified: cargo test -p jarvis-core --lib commands::tests now passes
3/3 (every_command_toml_parses, lua_command_scripts_exist,
every_command_has_phrases).
2026-05-15 01:32:17 +03:00
Bossiara13
24457ad6c9 chore(gui): rebrand — strip TG/Boosty/Patreon/feedback-bot, keep CC BY-NC-SA attribution
The previous feature/gui-rebrand-polish work only updated the appInfo store
keys; Footer.svelte, settings, and the commands page were still rendering
upstream's Telegram channel, Boosty/Patreon support links, feedback bot,
and the original author byline. This finishes the job.

Rust side (applies after `cargo build` — currently a no-op until MSVC Build
Tools are reinstalled):
- Cargo.toml: authors = ["Bossiara13"], repository = J.A.R.V.I.S-rust fork.
  Original attribution stays in LICENSE.txt per CC BY-NC-SA 4.0; the UI
  no longer renders an author byline.
- config.rs: dropped TG_OFFICIAL_LINK / FEEDBACK_LINK / SUPPORT_BOOSTY_LINK
  / SUPPORT_PATREON_LINK. Added UPSTREAM_REPOSITORY_LINK (Priler/jarvis for
  the licence attribution), ISSUES_LINK (this fork's GH issues), and
  PYTHON_FORK_LINK.
- tauri_commands/etc.rs: dropped get_tg_official_link/get_boosty_link/
  get_patreon_link/get_feedback_link. Added get_upstream_link, get_issues_link,
  get_python_fork_link. Tidied up the Option<&str> -> String boilerplate
  with unwrap_or.
- main.rs: invoke_handler updated to match.

Frontend side (visible only after Rust rebuild — Tauri bundles the dist into
the exe):
- stores.ts: appInfo shape reduced to repositoryLink / upstreamLink /
  issuesLink / pythonForkLink / logFilePath. loadAppInfo() uses fetchOr()
  with hardcoded fallbacks so the UI still populates correctly when run
  against an un-rebuilt binary; fetchRepoOr() additionally overrides
  CARGO_PKG_REPOSITORY if it still resolves to upstream's Priler/jarvis.
- Footer.svelte: rewritten — © year + "J.A.R.V.I.S." + repo link + issues
  link + small "fork of Priler/jarvis · CC BY-NC-SA 4.0" attribution line.
  No author byline (it's in LICENSE.txt).
- routes/settings/index.svelte: feedback link now points to GitHub Issues.
- routes/commands/index.svelte: TG-channel reference replaced with a link
  to the Python fork (where the command builder lives) plus a pointer to
  resources/commands/ in this repo. Bruh GIF removed.
- locales/{ru,en,ua}.ftl: removed footer-author / footer-telegram /
  footer-support, added footer-issues / footer-fork-of, rewrote
  commands-wip-* strings, retargeted settings-beta-bot to "GitHub Issues".

Bundle identifier (com.priler.jarvis) kept intact to avoid moving the app
data directory.
2026-05-15 01:09:14 +03:00
Bossiara13
85a004e263 test(commands): schema and Lua script validation for resources/commands/
Three unit tests catch the kind of bug that broke weather/set_city (a
phrases array instead of lang→array map silently dropped the whole pack):

- every_command_toml_parses: every resources/commands/*/command.toml round-
  trips through toml::from_str::<JCommandsList>. Reports all failures at
  once instead of failing on the first.
- lua_command_scripts_exist: for every type="lua" command, the named (or
  default script.lua) script file exists in the pack dir.
- every_command_has_phrases: structural commands (terminate/stop_chaining)
  excluded, every other command has ≥1 phrase across all languages.

Tests use env!("CARGO_MANIFEST_DIR") -> ../.. -> resources/commands so they
work from any cwd.

NB: cargo test does not run on this machine right now — aws-lc-sys needs
cl.exe (MSVC Build Tools missing). The release binary was built earlier
with MSVC available; toolchain install is a follow-up. The tests are still
valid for CI / a re-armed dev box.
2026-05-15 00:55:01 +03:00
Bossiara13
acebb02a8e test: vad listening window timing 2026-04-23 11:08:02 +03:00
Bossiara13
37c8371f3f feat(core): vad-driven listening window state machine 2026-04-23 11:07:35 +03:00
Bossiara13
3f19366ad0 chore: add webrtc-vad workspace dep 2026-04-23 11:07:04 +03:00
Bossiara13
e5aaa7e064 feat(app): wire LlmClient into voice loop with trigger-prefix fallback
new module crates/jarvis-app/src/llm_fallback.rs holds an optional
LlmClient + ConversationHistory built once at startup. if GROQ_TOKEN is
unset the module logs a warning and stays disabled — voice commands keep
working as before.

both the wake-word voice path (recognize_command in app.rs) and the
gui-side text command path (process_text_command) now check whether the
recognized phrase starts with one of the configured trigger phrases
(ru: 'скажи' / 'ответь' / 'произнеси'). when it does, the remainder of
the phrase is sent to Groq and the reply is published as a new
IpcEvent::LlmReply { text } so the gui can speak it.

on api error the trailing user turn is popped from history, the russian
fallback line is sent over ipc and a 'error' voice cue plays. the loop
itself never panics.
2026-04-23 02:16:02 +03:00
Bossiara13
176f405310 feat(core): pop_last_user helper on conversation history
used by llm fallback to roll back the user turn when the api call fails,
so the next attempt does not leave a dangling user message in the history.
2026-04-23 02:15:41 +03:00
Bossiara13
1e2c883e68 chore(core): llm config knobs, system prompt, trigger phrases
add LLM_DEFAULT_ENABLED / LLM_DEFAULT_MAX_HISTORY / LLM_DEFAULT_MAX_TOKENS
defaults, the russian J.A.R.V.I.S. system prompt, a fallback error line,
and per-language helpers get_llm_trigger_phrases() and get_llm_system_prompt()
so the voice loop can opt into Groq with a 'скажи …' style prefix.
2026-04-22 23:16:30 +03:00
Bossiara13
40f2f8b5f9 feat(core): conversation history with bounded length
split llm.rs into a module with separate client and history submodules.
ConversationHistory holds an optional system prompt plus a FIFO of user/
assistant turns capped at max_turns; oldest turns evict on overflow,
system prompt is preserved across truncation and clear().
2026-04-22 23:16:25 +03:00
Bossiara13
02f5829aaa feat(core): add Groq/OpenAI-compatible LlmClient
New jarvis-core::llm module providing a blocking client for
OpenAI-compatible chat completions endpoints (Groq by default).

- LlmClient::new / from_env (GROQ_TOKEN, GROQ_BASE_URL, GROQ_MODEL)
- complete(messages, max_tokens) -> String
- thiserror-based LlmError / ConfigError
- gated behind a new llm feature, included in default jarvis_app

Not yet wired into the wake-word/intent loop; that lands in v0.3.
2026-04-22 19:36:14 +03:00
Priler
520b98143f AI models shared registry + Code cleanup + Better async handling + Some fixes, etc 2026-02-18 21:08:48 +05:00
Priler
a8ff3442ff some fixes + gliner first implementation 2026-02-11 07:21:50 +05:00
Priler
b9d5f41bbd Fix intent classifier init 2026-02-08 07:30:46 +05:00
Priler
8e830334e8 New intent classification engine - MiniLM L6v2 and MiniLM L12v2 ONNX 2026-02-08 07:16:03 +05:00
Priler
4815c7f9bb Bump to Lua 5.5 2026-02-08 06:42:58 +05:00
Priler
acc806d403 Improved wake-word & command detection, with dual mode 2026-02-08 06:37:39 +05:00
Priler
7440baa1b2 basic Lua 5.4 implementation with few example commands 2026-01-17 05:46:38 +05:00
Priler
11c2500d9c Commands/voices multilanguage support + Ukranian vosk model added 2026-01-13 02:21:59 +05:00
Priler
e2370dc046 VAD fixes + some calibrations 2026-01-08 00:35:21 +05:00
Priler
47b7e7a65d Tray options implementation + Voice system rewrite + build fixes 2026-01-07 23:29:46 +05:00
Priler
412acb7e2d Multilingual support via Fluent + Frontend improvements + Rewrite of ArcReactor 2026-01-07 05:04:04 +05:00
Priler
adec595cfa websockets based IPC added in order to bind GUI/app together 2026-01-07 00:15:36 +05:00
Priler
eb0d40bae6 noise suppression added via nnnoiseless + vad + gain-normalizer + few frontend changes 2026-01-06 23:32:58 +05:00
Priler
a640e6caea vosk usage optimization 2026-01-05 04:20:43 +05:00
Priler
cab53abcbe vosk model selection in GUI 2026-01-05 03:38:04 +05:00
Priler
36acacf259 jarvis-cli added for dev tests 2026-01-05 02:23:32 +05:00
Priler
5f1f9ce321 intent recognition added (first implementation) 2026-01-05 01:22:45 +05:00
Priler
091a41ac33 frontend fixes & db rewrite with serde 2026-01-04 09:00:51 +05:00
Priler
61b7a79455 rustpotter detections optimization + few code improvements 2026-01-04 06:14:05 +05:00
Priler
09f72622bc project restructure with Rust workspaces 2026-01-04 05:19:47 +05:00