Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
chore: auto-save WIP via Claude stop-hook safety net (2026-06-30 12:46)
Ruben Lütkea32fb03d6115
diff --git a/jarvis/brain/model_catalog.py b/jarvis/brain/model_catalog.pyindex 6bc9b113c8..8aaa8746f9 100644--- a/jarvis/brain/model_catalog.py+++ b/jarvis/brain/model_catalog.py@@ -489,11 +489,12 @@ def _squash(text: str) -> str:# (``claude-opus-4-8``) or OpenRouter (``anthropic/claude-opus-4.8``). Extend# freely — this is a curated favourites list, presentation only.STARRED_MODELS: frozenset[str] = frozenset({- _squash("claude-opus-4.8"), # Opus 4.8- _squash("gpt-5.5"), # GPT-5.5- _squash("gemini-3.5-flash"), # Gemini 3.5 Flash- _squash("claude-fable-5"), # Fable 5- _squash("glm-5.2"), # GLM-5.2+ _squash("claude-opus-4.8"), # Opus 4.8+ _squash("claude-opus-4.8-fast"), # Opus 4.8 (Fast)+ _squash("gpt-5.5"), # GPT-5.5+ _squash("gemini-3.5-flash"), # Gemini 3.5 Flash+ _squash("claude-fable-5"), # Fable 5+ _squash("glm-5.2"), # GLM-5.2})diff --git a/jarvis/ui/web/frontend/src/components/BrainModelSelector.test.tsx b/jarvis/ui/web/frontend/src/components/BrainModelSelector.test.tsxindex ae254898de..ea2bcb73c1 100644--- a/jarvis/ui/web/frontend/src/components/BrainModelSelector.test.tsx+++ b/jarvis/ui/web/frontend/src/components/BrainModelSelector.test.tsx@@ -376,6 +376,16 @@ describe("BrainModelSelector", () => {expect(screen.queryByText("NVIDIA: Nemotron 3 Ultra (free)")).toBeNull();});+ it("shows the active band's hint line ('when price doesn't matter…')", async () => {+ vi.stubGlobal("fetch", mockTagged());+ render(<BrainModelSelector providerId="openrouter" currentModel="" />);+ await openDropdown();+ // No hint while on "all" (the full list needs no explanation).+ expect(screen.queryByText("apikeys_model.filter_hint_frontier")).toBeNull();+ fireEvent.click(await screen.findByLabelText("apikeys_model.filter_frontier"));+ expect(await screen.findByText("apikeys_model.filter_hint_frontier")).toBeTruthy();+ });+it("hides the filter chips for a tag-less catalog (voice/STT)", async () => {// The Gemini mock carries no tags → the band chips must not render.vi.stubGlobal("fetch", mockFetch());diff --git a/jarvis/ui/web/frontend/src/components/BrainModelSelector.tsx b/jarvis/ui/web/frontend/src/components/BrainModelSelector.tsxindex 3800e2eebf..29b3a3dcaa 100644--- a/jarvis/ui/web/frontend/src/components/BrainModelSelector.tsx+++ b/jarvis/ui/web/frontend/src/components/BrainModelSelector.tsx@@ -363,37 +363,48 @@ export function BrainModelSelector({{/* Quality-band filter chips — narrow the list to free / frontier /best-value / starred. Only shown for catalogs that carry tags (the- brain-model pickers), never for the voice/STT lists. */}+ brain-model pickers), never for the voice/STT lists. A one-line hint+ under the chips explains the active band ("when price doesn't+ matter…") so the picker is self-explanatory for a non-technical+ user. */}{hasTags && (- <div className="flex flex-wrap items-center gap-1 border-b border-border px-2 py-1.5">- {MODEL_FILTERS.map((f) => {- const count = filterCounts[f];- const isActive = filter === f;- // A band with no current hit is shown but disabled, so the chip- // row stays stable while typing instead of reflowing.- const disabled = f !== "all" && count === 0;- return (- <button- key={f}- type="button"- onClick={() => setFilter(f)}- disabled={disabled}- aria-pressed={isActive}- aria-label={t(`apikeys_model.filter_${f}`)}- className={cn(- "inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[10px] transition-colors",- isActive- ? "border-primary/40 bg-primary/20 text-primary"- : "border-border bg-muted text-muted-foreground hover:text-foreground",- disabled && "cursor-not-allowed opacity-40 hover:text-muted-foreground",- )}- >- {f === "starred" && <Star className="h-2.5 w-2.5 fill-current" />}- {t(`apikeys_model.filter_${f}`)}- {f !== "all" && <span className="tabular-nums opacity-60">{count}</span>}- </button>- );- })}+ <div className="border-b border-border">+ <div className="flex flex-wrap items-center gap-1 px-2 py-1.5">+ {MODEL_FILTERS.map((f) => {+ const count = filterCounts[f];+ const isActive = filter === f;+ // A band with no current hit is shown but disabled, so the chip+ // row stays stable while typing instead of reflowing.+ const disabled = f !== "all" && count === 0;+ return (+ <button+ key={f}+ type="button"+ onClick={() => setFilter(f)}+ disabled={disabled}+ aria-pressed={isActive}+ aria-label={t(`apikeys_model.filter_${f}`)}+ title={t(`apikeys_model.filter_hint_${f}`)}+ className={cn(+ "inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[10px] transition-colors",+ isActive+ ? "border-primary/40 bg-primary/20 text-primary"+ : "border-border bg-muted text-muted-foreground hover:text-foreground",+ disabled && "cursor-not-allowed opacity-40 hover:text-muted-foreground",+ )}+ >+ {f === "starred" && <Star className="h-2.5 w-2.5 fill-current" />}+ {t(`apikeys_model.filter_${f}`)}+ {f !== "all" && <span className="tabular-nums opacity-60">{count}</span>}+ </button>+ );+ })}+ </div>+ {filter !== "all" && (+ <p className="px-2.5 pb-1.5 text-[10px] leading-snug text-muted-foreground">+ {t(`apikeys_model.filter_hint_${filter}`)}+ </p>+ )}</div>)}diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.jsonindex ccb55b8a81..f344f9cdf4 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json@@ -883,7 +883,12 @@"filter_free": "Kostenlos","filter_frontier": "Frontier","filter_value": "Preis-Leistung",- "starred_label": "Top-Empfehlung"+ "starred_label": "Top-Empfehlung",+ "filter_hint_all": "Alle Modelle im Katalog.",+ "filter_hint_starred": "Handverlesene Top-Modelle.",+ "filter_hint_free": "Kostenlose Modelle — kein API-Guthaben nötig.",+ "filter_hint_frontier": "Wenn der Preis egal ist — die leistungsstärksten Modelle.",+ "filter_hint_value": "Die beste Leistung fürs Geld."},"apikeys_cu_model": {"heading": "Modell für Computer-Use",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.jsonindex 348ba83b6e..637d50dde9 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json@@ -884,7 +884,12 @@"filter_free": "Free","filter_frontier": "Frontier","filter_value": "Best value",- "starred_label": "Top pick"+ "starred_label": "Top pick",+ "filter_hint_all": "Every model in the catalog.",+ "filter_hint_starred": "Hand-picked best models.",+ "filter_hint_free": "Zero-cost models — no API credit needed.",+ "filter_hint_frontier": "When price doesn't matter — the most capable models.",+ "filter_hint_value": "The best performance for the price."},"apikeys_cu_model": {"heading": "Computer-Use model",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.jsonindex 9b3345e9f9..0f1ea2c8fc 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json@@ -883,7 +883,12 @@"filter_free": "Gratis","filter_frontier": "Frontier","filter_value": "Mejor valor",- "starred_label": "Selección top"+ "starred_label": "Selección top",+ "filter_hint_all": "Todos los modelos del catálogo.",+ "filter_hint_starred": "Los mejores modelos, elegidos a mano.",+ "filter_hint_free": "Modelos gratuitos — sin necesidad de crédito de API.",+ "filter_hint_frontier": "Cuando el precio no importa — los modelos más capaces.",+ "filter_hint_value": "La mejor relación calidad-precio."},"apikeys_cu_model": {"heading": "Modelo para Computer-Use",diff --git a/scripts/config-soll.json b/scripts/config-soll.jsonindex 91d4cbca14..84cc1a25a0 100644--- a/scripts/config-soll.json+++ b/scripts/config-soll.json@@ -89,6 +89,6 @@"model": "gemini-3.5-flash"},"brain.providers.openrouter": {- "model": "nvidia/nemotron-3-ultra-550b-a55b:free"+ "model": "nvidia/nemotron-3.5-content-safety:free"}}diff --git a/tests/unit/brain/test_model_catalog.py b/tests/unit/brain/test_model_catalog.pyindex f3470d25e2..e1c9f872f0 100644--- a/tests/unit/brain/test_model_catalog.py+++ b/tests/unit/brain/test_model_catalog.py@@ -604,6 +604,8 @@ class TestModelClassification:# OpenRouter namespaced id — separator/punctuation differences and all.assert is_starred_model("claude-opus-4-8") is Trueassert is_starred_model("anthropic/claude-opus-4.8") is True+ # The separate Fast variant is its own starred pick (distinct from base).+ assert is_starred_model("anthropic/claude-opus-4.8-fast") is Trueassert is_starred_model("claude-fable-5") is Trueassert is_starred_model("openai/gpt-5.5") is Trueassert is_starred_model("gemini-3.5-flash") is Truediff --git a/tests/unit/brain/test_plugin_relevance_wiring.py b/tests/unit/brain/test_plugin_relevance_wiring.pyindex 6212baa74f..6524058590 100644--- a/tests/unit/brain/test_plugin_relevance_wiring.py+++ b/tests/unit/brain/test_plugin_relevance_wiring.py@@ -9,19 +9,19 @@ class _T:def test_apply_plugin_relevance_drops_irrelevant():- # A heavy plugin (github exposes ~37 tools live) crosses the tool-count gate.# github's card keywords do not match "termine" -> all its tools dropped;- # google-calendar's card matches -> kept; run-shell is native -> always kept.+ # google_calendar's card matches ("termine"/"heute") -> kept; run-shell is+ # native -> always kept.mgr = BrainManager.__new__(BrainManager)tools = {"run-shell": _T("run-shell"),- "google-calendar/list_events": _T("google-calendar/list_events"),+ "google_calendar/list_events": _T("google_calendar/list_events"),}for i in range(20):tools[f"github/tool_{i}"] = _T(f"github/tool_{i}")out = mgr._apply_plugin_relevance("was habe ich heute für termine", tools)assert "run-shell" in out- assert "google-calendar/list_events" in out+ assert "google_calendar/list_events" in outassert not any(n.startswith("github/") for n in out)diff --git a/tests/unit/brain/test_routing.py b/tests/unit/brain/test_routing.pyindex bf10427f64..110bb8e90c 100644--- a/tests/unit/brain/test_routing.py+++ b/tests/unit/brain/test_routing.py@@ -778,6 +778,37 @@ def test_router_prompt_mentions_plugin_inline_reads():assert "spawn_worker" in low or "spawn-worker" in low+def test_apply_plugin_relevance_drops_cardless_mcp_on_unrelated_turn() -> None:+ """Manager-level guard for the over-trigger: a connected MCP server with no+ usage card (notebooklm-mcp) must not be exposed to the router on a turn that+ does not signal it. Forensic (voice session): a plain flight question+ reflexively fired ``notebooklm-mcp/chat_configure``, wasting ~35s before the+ turn timed out. Keyword-only relevance gate (AP-9), provider-agnostic.+ """++ class _T:+ def __init__(self, name: str) -> None:+ self.name = name++ mgr = BrainManager.__new__(BrainManager)+ tools = {+ "search_web": _T("search_web"),+ "notebooklm-mcp/chat_configure": _T("notebooklm-mcp/chat_configure"),+ "notebooklm-mcp/notebook_list": _T("notebooklm-mcp/notebook_list"),+ }+ out = mgr._apply_plugin_relevance(+ "Was ist der kürzeste Flug von München nach Bora Bora?", tools+ )+ assert "search_web" in out # native tool kept+ assert not any(n.startswith("notebooklm-mcp/") for n in out)++ # Same MCP server, now explicitly named -> kept (the clear keep case).+ named = mgr._apply_plugin_relevance(+ "frag das NotebookLM nach meinen Quellen", tools+ )+ assert "notebooklm-mcp/notebook_list" in named++def test_factory_wires_computer_use_tool_into_router_set() -> None:"""End-to-end wiring: entry-point + ROUTER_TOOLS + factory branch connect.diff --git a/tests/unit/marketplace/test_plugin_relevance.py b/tests/unit/marketplace/test_plugin_relevance.pyindex de7c357c29..b7a1aea2ef 100644--- a/tests/unit/marketplace/test_plugin_relevance.py+++ b/tests/unit/marketplace/test_plugin_relevance.py@@ -1,8 +1,17 @@+"""Per-turn relevance gate: a connected plugin/MCP tool reaches the brain only+when the turn signals it (the user named it, or its usage-card keywords match) —+never just because it is connected.++A card-less, un-named plugin/MCP is DROPPED. This is the fix for the live+over-trigger: a plain flight question reflexively fired the card-less+``notebooklm-mcp/chat_configure``, wasting ~35s before timing out. Keyword-only,+no LLM, no IO (AP-9 / AP-11).+"""from jarvis.marketplace.plugin_relevance import filter_plugin_toolsclass _Tool:- def __init__(self, name):+ def __init__(self, name: str) -> None:self.name = name@@ -10,44 +19,82 @@ def _heavy(plugin_id: str, n: int) -> list[_Tool]:return [_Tool(f"{plugin_id}/tool_{i}") for i in range(n)]-def test_keeps_only_relevant_plugin_namespace():- # max_unfiltered_tools=1 forces gating with 2 plugin tools (default keeps a- # handful ungated — gating triggers on the TOTAL plugin-tool count).- tools = [_Tool("google-calendar/list_events"), _Tool("github/create_issue")]- kept = filter_plugin_tools("was habe ich heute für termine", tools, max_unfiltered_tools=1)- assert [t.name for t in kept] == ["google-calendar/list_events"]+# --- The reported bug: a card-less connected MCP server must not ride along. ----def test_non_plugin_tools_always_kept():- tools = [_Tool("run-shell"), _Tool("github/create_issue")]- kept = filter_plugin_tools("erzähl einen witz", tools, max_unfiltered_tools=0)- assert any(t.name == "run-shell" for t in kept) # native tool survives- assert all("github/" not in t.name for t in kept) # irrelevant plugin dropped+def test_cardless_mcp_dropped_on_unrelated_turn():+ # notebooklm-mcp has no usage card; a flight question signals it in no way,+ # so none of its tools may reach the brain.+ tools = [+ _Tool("notebooklm-mcp/chat_configure"),+ _Tool("notebooklm-mcp/notebook_list"),+ _Tool("search_web"),+ ]+ kept = [+ t.name+ for t in filter_plugin_tools(+ "Was ist der kürzeste Flug von München nach Bora Bora?", tools+ )+ ]+ assert "search_web" in kept # native tool survives+ assert all(not n.startswith("notebooklm-mcp/") for n in kept)-def test_small_surface_kept_whole():- # A handful of plugin tools stays fully visible (no bloat, no wrong-drop).- tools = [_Tool("google-calendar/list_events")]- kept = filter_plugin_tools("mach mal", tools, max_unfiltered_tools=12)- assert [t.name for t in kept] == ["google-calendar/list_events"]+def test_cardless_mcp_dropped_even_on_tiny_surface():+ # The old small-surface bypass kept a couple of plugin tools ungated — that+ # is exactly how a single connected MCP server leaked onto every turn. A tiny+ # surface no longer bypasses the relevance decision.+ tools = [_Tool("notebooklm-mcp/chat_configure"), _Tool("search_web")]+ kept = [t.name for t in filter_plugin_tools("what's the weather tomorrow", tools)]+ assert kept == ["search_web"]-def test_two_heavy_plugins_gate_by_tool_count():- # The live bug: github(37)+linear(35)=72 tools from only 2 plugins slipped- # through the old plugin-count gate. With tool-count gating an unrelated- # utterance drops BOTH heavy plugins.- tools = _heavy("github", 37) + _heavy("linear", 35) + [_Tool("run-shell")]- kept = filter_plugin_tools("was habe ich heute für termine", tools)- names = [t.name for t in kept]- assert "run-shell" in names- assert all(not n.startswith("github/") and not n.startswith("linear/") for n in names)+def test_cardless_mcp_kept_when_user_names_it():+ # Explicit mention is the clear keep case; spacing/casing variants collapse:+ # "NotebookLM", "Notebook LM", "notebook-lm" all match the id "notebooklm-mcp".+ tools = [_Tool("notebooklm-mcp/notebook_query"), _Tool("search_web")]+ for utter in (+ "ask NotebookLM about my sources",+ "frag das Notebook LM nach der Zusammenfassung",+ "use notebook-lm for this",+ ):+ kept = [t.name for t in filter_plugin_tools(utter, tools)]+ assert "notebooklm-mcp/notebook_query" in kept, utter+ assert "search_web" in kept++# --- No regression: carded plugins still gate by their curated keywords. ----def test_heavy_plugin_kept_when_relevant():- # github-unique wording ("repository" is not a Linear keyword; "issue" would- # match both cards, so avoid it here).++def test_carded_plugin_kept_when_relevant():+ # github-unique wording ("repository" is not a Linear keyword).tools = _heavy("github", 37) + _heavy("linear", 35)- kept = filter_plugin_tools("zeig mir meine github repositories", tools)- names = [t.name for t in kept]- assert any(n.startswith("github/") for n in names) # github card matches- assert all(not n.startswith("linear/") for n in names) # linear dropped+ kept = [+ t.name for t in filter_plugin_tools("zeig mir meine github repositories", tools)+ ]+ assert any(n.startswith("github/") for n in kept) # github card matches+ assert all(not n.startswith("linear/") for n in kept) # linear dropped+++def test_carded_plugins_dropped_on_unrelated_turn():+ tools = _heavy("github", 37) + _heavy("linear", 35) + [_Tool("run-shell")]+ kept = [+ t.name for t in filter_plugin_tools("was habe ich heute für termine", tools)+ ]+ assert "run-shell" in kept+ assert all(+ not n.startswith("github/") and not n.startswith("linear/") for n in kept+ )+++def test_native_tools_never_touched():+ tools = [_Tool("run-shell"), _Tool("screen-snapshot"), _Tool("github/create_issue")]+ kept = [t.name for t in filter_plugin_tools("erzähl einen witz", tools)]+ assert "run-shell" in kept and "screen-snapshot" in kept # native always kept+ assert all("github/" not in n for n in kept) # irrelevant plugin dropped+++def test_no_plugin_tools_returns_all_unchanged():+ tools = [_Tool("run-shell"), _Tool("search_web")]+ kept = filter_plugin_tools("anything at all", tools)+ assert [t.name for t in kept] == ["run-shell", "search_web"]diff --git a/tests/unit/speech/test_speak_playback_timeout.py b/tests/unit/speech/test_speak_playback_timeout.pyindex 833a7ab4e3..1b717bc003 100644--- a/tests/unit/speech/test_speak_playback_timeout.py+++ b/tests/unit/speech/test_speak_playback_timeout.py@@ -25,7 +25,12 @@ import pytestfrom jarvis.core.bus import EventBusfrom jarvis.core.config import JarvisConfigfrom jarvis.core.protocols import AudioChunk-from jarvis.speech.pipeline import _BRAIN_TIMEOUT_PHRASE, SpeechPipeline+from jarvis.speech.pipeline import (+ SPOKEN_KIND_COMPLETION,+ _TIMEOUT_NO_ANSWER_PHRASE,+ _TIMEOUT_TOOL_STALL_PHRASE,+ SpeechPipeline,+)@dataclass@@ -496,7 +501,7 @@ async def test_spoken_warn_reports_no_first_frame_true_for_attribution(with caplog.at_level(logging.WARNING, logger="jarvis.speech.pipeline"):await p._handle_silent_brain_turn("de", "")- assert spoken == [_BRAIN_TIMEOUT_PHRASE["de"]]+ assert spoken == [_TIMEOUT_TOOL_STALL_PHRASE["de"]]assert any("spoken" in rec.messageand "site=empty_after_no_first_frame" in rec.message@@ -514,7 +519,7 @@ async def test_genuinely_slow_empty_turn_still_speaks_timeout() -> None:await p._handle_silent_brain_turn("de", "")- assert spoken == [_BRAIN_TIMEOUT_PHRASE["de"]], (+ assert spoken == [_TIMEOUT_TOOL_STALL_PHRASE["de"]], ("a genuinely slow beheaded turn must still speak the timeout phrase")diff --git a/tests/unit/speech/test_turn_taking.py b/tests/unit/speech/test_turn_taking.pyindex eab383c212..991e87537b 100644--- a/tests/unit/speech/test_turn_taking.py+++ b/tests/unit/speech/test_turn_taking.py@@ -8,7 +8,11 @@ import pytestfrom jarvis.core.bus import EventBusfrom jarvis.core.events import TranscriptFinal, TranscriptionUpdatefrom jarvis.core.protocols import AudioChunk, Transcript-from jarvis.speech.pipeline import SpeechPipeline, TurnTakingState+from jarvis.speech.pipeline import (+ _BRAIN_TIMEOUT_PHRASE,+ SpeechPipeline,+ TurnTakingState,+)@dataclass@@ -428,9 +432,13 @@ async def test_brain_call_timeout_returns_to_listening_without_hanging() -> Noneassert keep_session is Trueassert pipe._turn_state == TurnTakingState.LISTENING- # AD-OE6: a stall must be spoken, not a silent drop.+ # AD-OE6: a stall must be spoken, not a silent drop. Assert against the+ # actual phrase table (not a hardcoded word) so a future reword of the+ # timeout phrase can't silently re-break this contract test.assert pipe._spoken, "brain timeout stayed silent (AD-OE6 violation)"- assert "lange" in pipe._spoken[0][0].lower() or "too long" in pipe._spoken[0][0].lower()+ assert pipe._spoken[0][0] in _BRAIN_TIMEOUT_PHRASE.values(), (+ f"expected a brain-timeout fallback phrase, got {pipe._spoken[0][0]!r}"+ )# ---------------------------------------------------------------------------