Skip to content

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.

fix(screen-context): German screen anglicisms + no screenshot tool for blind brains

rubenluetke10-beep94066cf274ab
diff --git a/jarvis/brain/manager.py b/jarvis/brain/manager.py
index 89ad1aa688..9ec881631f 100644
--- a/jarvis/brain/manager.py
+++ b/jarvis/brain/manager.py
@@ -5502,6 +5502,36 @@ class BrainManager:
return tools
return {n: t for n, t in tools.items() if n != "screenshot"}
+ @staticmethod
+ def _hide_screenshot_for_blind_brain(
+ tools: dict[str, Tool],
+ brain: Any,
+ *,
+ prov_name: str = "",
+ model: str | None = "",
+ ) -> dict[str, Tool]:
+ """Drop the ``screenshot`` tool when the answering brain has no vision.
+
+ A blind model that calls the tool is a guaranteed dead end: the
+ capture succeeds, its own protocol layer drops the image ("Provider
+ without vision support"), and the model honestly tells the user the
+ picture came back unusable (live 2026-08-06 20:52, grok-4.5 tool
+ loop). Gated on the runtime capability, never the provider name
+ (AP-21); the chain-level vision skip only covers images attached
+ BEFORE the turn, not ones a mid-loop tool call produces.
+ """
+ if not isinstance(tools, dict) or "screenshot" not in tools:
+ return tools
+ if getattr(brain, "supports_vision", False) is True:
+ return tools
+ log.info(
+ "Hiding the screenshot tool from %s(%s): the model cannot "
+ "inspect images, so a capture could only dead-end.",
+ prov_name,
+ model,
+ )
+ return {n: t for n, t in tools.items() if n != "screenshot"}
+
def _hide_spawn_on_knowledge_question(
self, tools: dict[str, Tool], user_text: str
) -> dict[str, Tool]:
@@ -10242,6 +10272,12 @@ class BrainManager:
has_image=bool(images),
pointing_turn=pointing_turn,
)
+ # A brain that cannot inspect pixels must never be OFFERED the
+ # screenshot tool — see _hide_screenshot_for_blind_brain.
+ if isinstance(_turn_tools, dict):
+ _turn_tools = self._hide_screenshot_for_blind_brain(
+ _turn_tools, brain, prov_name=prov_name, model=model
+ )
# Active-model self-awareness: stamp the provider/model that is about
# to answer so _build_system_prompt injects the correct, specific
# self-identity (anti-"I'm Gemini" hallucination, forensic 2026-06-20).
diff --git a/jarvis/screen_context/intent.py b/jarvis/screen_context/intent.py
index 9b6ac0e76c..c129fcf115 100644
--- a/jarvis/screen_context/intent.py
+++ b/jarvis/screen_context/intent.py
@@ -269,27 +269,31 @@ _SCREEN_INTENT_RE: re.Pattern[str] = re.compile(
r"|\b(?:schau(?:e|st)?|guck(?:e|st)?|sieh(?:st)?)"
r"(?:\s+(?:du|dir|mir|mal|bitte|kurz|eben|doch|noch))*\s+"
r"(?:auf\s+)?(?:das|den|dieses|diesen|meinen|deinen)\s+" # i18n-allow: DE input
- r"(?:bildschirm|monitor|fenster|tab|reiter|dialog|fehlermeldung|fehler" # i18n-allow
- r"|meldung|popup|seite|dokument)\b" # i18n-allow: DE input
+ r"(?:bildschirm|monitor|screen|display|fenster|tab|reiter|dialog" # i18n-allow
+ r"|fehlermeldung|fehler|meldung|popup|seite|dokument)\b" # i18n-allow: DE input
rf"|\b(?:schau|guck)\s+(?:mal\s+)?hier{_END}"
rf"|\b(?:schau|guck|sieh)\s+(?:mal|her){_END}"
rf"|\bkannst\s+du\s+(?:mal\s+)?(?:kurz\s+)?"
rf"(?:sehen|schauen|gucken|draufschauen){_END}"
- r"|\bkannst\s+du\s+(?:das|dies|es|meinen\s+bildschirm)\s+sehen\b"
- r"|\bkannst\s+du\s+(?:bitte\s+)?meinen\s+(?:bildschirm|monitor)\s+"
- r"(?:anschauen|ansehen|pruefen)\b"
+ r"|\bkannst\s+du\s+(?:das|dies|es"
+ r"|meinen\s+(?:bildschirm|screen|monitor))\s+sehen\b" # i18n-allow: DE input
+ r"|\bkannst\s+du\s+(?:bitte\s+)?meinen\s+(?:bildschirm|monitor|screen|display)\s+"
+ r"(?:anschauen|ansehen|pruefen)\b" # i18n-allow: DE input
rf"|\bsiehst\s+du\s+(?:das|dies)(?:\s+(?:hier|da|auch|gerade))*{_END}" # i18n-allow
- r"|\bsiehst\s+du\s+(?:meinen\s+bildschirm|den\s+fehler)\b" # i18n-allow: DE input
+ r"|\bsiehst\s+du\s+(?:meinen\s+(?:bildschirm|screen)|den\s+fehler)\b" # i18n-allow
r"|\bwas\s+siehst\s+du\b"
# Screen nouns in every case German inflects them into. The earlier list
# spelled out the dative only, so the natural spoken accusative ("schau mal
# auf meinEN Bildschirm") classified as NONE and the turn fell through to
# Computer-Use (BUG-124). Inflection is matching data, not prose.
+ # Anglicisms included: spoken German says "auf meinem Screen/Display" as
+ # readily as "Bildschirm" — the miss sent a live turn into a blind
+ # tool-loop instead of the one-shot look (voice session 2026-08-06 20:51).
# i18n-allow: German speech-input matching data
r"|\b(?:auf|an|in)\s+(?:dem|den|meinem|meinen|deinem|deinen|diesem|diesen)" # i18n-allow: DE input
- r"\s+(?:bildschirm|monitor)\b"
- r"|\bam\s+(?:bildschirm|monitor)\b"
- r"|\bmein(?:en|em)?\s+(?:bildschirm|monitor)\b"
+ r"\s+(?:bildschirm|monitor|screen|display)\b" # i18n-allow: DE input
+ r"|\bam\s+(?:bildschirm|monitor|screen|display)\b" # i18n-allow: DE input
+ r"|\bmein(?:en|em)?\s+(?:bildschirm|monitor|screen|display)\b" # i18n-allow
# i18n-allow: German speech-input matching data
r"|\b(?:mach|mache|machst|erstell|erstelle|erstellst|nimm|schiess|schiesse)"
rf"\b{_NEAR}"
diff --git a/tests/unit/brain/test_screen_narration_guard.py b/tests/unit/brain/test_screen_narration_guard.py
index 2a48f9bd4e..78f957e66b 100644
--- a/tests/unit/brain/test_screen_narration_guard.py
+++ b/tests/unit/brain/test_screen_narration_guard.py
@@ -124,6 +124,48 @@ def test_gate_is_noop_without_screenshot_tool() -> None:
)
+class _BlindBrain:
+ supports_vision = False
+
+
+class _SightedBrain:
+ supports_vision = True
+
+
+def test_blind_brain_never_gets_the_screenshot_tool() -> None:
+ """Live 2026-08-06 20:52: grok-4.5 (no vision) called ``screenshot``,
+
+ its protocol layer dropped the returned image, and the user heard "the
+ picture came back unusable". A blind brain must not be offered the tool.
+ """
+ m = _mgr({})
+ gated = m._hide_screenshot_for_blind_brain(
+ {"screenshot": object(), "search_web": object()},
+ _BlindBrain(),
+ prov_name="grok",
+ model="grok-4.5",
+ )
+ assert "screenshot" not in gated
+ assert "search_web" in gated
+
+
+def test_sighted_brain_keeps_the_screenshot_tool() -> None:
+ m = _mgr({})
+ tools = {"screenshot": object()}
+ assert (
+ m._hide_screenshot_for_blind_brain(tools, _SightedBrain()) == tools
+ )
+
+
+def test_missing_capability_attribute_counts_as_blind() -> None:
+ """An adapter without the flag cannot prove sight — fail closed."""
+ m = _mgr({})
+ gated = m._hide_screenshot_for_blind_brain(
+ {"screenshot": object()}, object()
+ )
+ assert "screenshot" not in gated
+
+
def test_router_prompt_forbids_screen_claims_without_image() -> None:
# Honest no-image rule present.
assert "hast du den Bildschirm NICHT gesehen" in SYSTEM_PROMPT
diff --git a/tests/unit/screen_context/test_intent.py b/tests/unit/screen_context/test_intent.py
index c370c4ccf0..a796ba4d77 100644
--- a/tests/unit/screen_context/test_intent.py
+++ b/tests/unit/screen_context/test_intent.py
@@ -57,6 +57,15 @@ from jarvis.screen_context.models import VisualIntent
"Lies bitte dieses Fenster", # i18n-allow: DE input
"Kannst du meinen Bildschirm anschauen?", # i18n-allow: DE input
"Was steht in diesem Fenster?", # i18n-allow: DE input
+ # Spoken German uses the anglicisms freely; the miss sent a live turn
+ # into a blind tool loop instead of the one-shot look (voice session
+ # 2026-08-06 20:51). i18n-allow: German speech-input fixtures
+ (
+ "Hallo, hallo, ich wollte mal wissen, irgendwas, " # i18n-allow
+ "was du auf meinen Screen siehst." # i18n-allow: DE input
+ ),
+ "Was ist auf meinem Display?", # i18n-allow: DE input
+ "Was siehst du auf meinem Screen?", # i18n-allow: DE input
# -- Spanish
"mira esto",
"puedes ver esto?",