Some checks failed
Release / semantic-release (push) Successful in 59s
tests / Unit tests (Linux, Python 3.11) (push) Successful in 13m45s
Release / build-linux (push) Failing after 7m47s
Release / build-windows (push) Has been cancelled
Release / build-macos (arm64, macos-latest) (push) Has been cancelled
Release / build-macos (x64, macos-15-intel) (push) Has been cancelled
Release / release-main (push) Has been cancelled
Release / release-develop (push) Has been cancelled
Transform isair/jarvis into a Discord-controlled voice assistant running on the Ubuntu VNC desktop, keeping the mature ~39k-line Python brain intact. - bot/ (Node + bun, discord.js): /자비스 slash commands (ephemeral), voice channel join + voice receive/playback, pluggable VNC screen broadcast (selfbot live / noVNC / screenshot) - bridge/ (Python, Flask): wraps jarvis STT + run_reply_engine + Piper TTS behind a thin localhost HTTP API - .env.example, scripts/ (start_bridge/start_bot/dev), README rewrite, docs/language-comparison.md and docs/vnc-xfce-setup.md Language decision: hybrid (Python brain + Node/bun Discord layer) because Discord blocks bot video; native screen broadcast only works via a Node selfbot library.
37 lines
1.1 KiB
Python
37 lines
1.1 KiB
Python
import pytest
|
|
from jarvis.config import get_default_config, load_settings
|
|
|
|
|
|
@pytest.mark.unit
|
|
def test_default_config_has_empty_mcps():
|
|
cfg = get_default_config()
|
|
assert isinstance(cfg.get("mcps"), dict)
|
|
assert cfg["mcps"] == {}
|
|
|
|
|
|
@pytest.mark.unit
|
|
def test_load_settings_normalizes_mcps(monkeypatch, tmp_path):
|
|
# Write a minimal config that overrides mcps with a list of dicts using name field
|
|
cfg_path = tmp_path / "config.json"
|
|
cfg_path.write_text(
|
|
"""
|
|
{
|
|
"mcps": [
|
|
{"name": "fs", "transport": "stdio", "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "~"], "env": {}}
|
|
],
|
|
"ollama_base_url": "http://localhost",
|
|
"ollama_embed_model": "x",
|
|
"ollama_chat_model": "y"
|
|
}
|
|
""",
|
|
encoding="utf-8",
|
|
)
|
|
|
|
# Point loader to our temporary config
|
|
monkeypatch.setenv("JARVIS_CONFIG_PATH", str(cfg_path))
|
|
s = load_settings()
|
|
assert isinstance(s.mcps, dict)
|
|
assert "fs" in s.mcps
|
|
assert s.mcps["fs"]["transport"] == "stdio"
|
|
|