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
fix(screen-context): recognise German separable verbs as desktop operations
Harald2ca57abe3299
diff --git a/jarvis/brain/manager.py b/jarvis/brain/manager.pyindex 8db3957293..3c35e18d5f 100644--- a/jarvis/brain/manager.py+++ b/jarvis/brain/manager.py@@ -5731,12 +5731,12 @@ class BrainManager:blinded the very run_shell call the local-outcome mandate requires.2026-08-17: the hide is now a narrow deny-list, because the boundary it- was standing in for is enforced where it actually belongs. A turn that- mixes a look with an action ("Schau mal hier. Mach das Fenster zu.") is- classified SCREEN whenever ``intent.requests_screen_operation``'s- clause anchoring misses the action verb — and an emptied surface then- left the model describing a picture with no way to do the thing that was- asked. ``computer_use`` therefore stays: every call runs through+ was standing in for is enforced where it actually belongs. A turn can+ carry a screen image and still ask for an action — the image may come+ from an earlier utterance, from an explicit attach, or from a mixed+ request — and an emptied surface left the model describing a picture+ with no way to do the thing that was asked. ``computer_use`` therefore+ stays: every call runs through``cu_gate.llm_computer_use_allowed`` first, which refuses a look requesteven inside a live desktop episode, so the two paths still cannot bothrun for one utterance. That gate reads the USER's utterance, never thediff --git a/jarvis/screen_context/intent.py b/jarvis/screen_context/intent.pyindex c129fcf115..c3010ced7d 100644--- a/jarvis/screen_context/intent.py+++ b/jarvis/screen_context/intent.py@@ -382,6 +382,12 @@ _DE_ACTION = (r"(?:ein)?tipp|zieh|verschieb|drueck|(?:ein)?fueg|(?:aus)?waehl|markier|" # i18n-allowr"kopier|reich\w*\s+ein|send\w*\s+ab|zoom|speicher|loesch|entfern|"r"lad\w*\s+(?:hoch|runter)|oeffn|schliess|aktualisier|neu\s+lad|"+ # Separable verbs in their JOINED form: the infinitive and the participle+ # put the particle back on the front ("zumachen", "aufmachen",+ # "runterfahren", "umschalten"). "fahr" is spelled out per particle so the+ # ordinary nouns "Zufahrt" and "Ausfahrt" cannot enter through it.+ r"(?:auf|zu|an|aus|ein|um|weg|rein|raus|zurueck)(?:ge)?" # i18n-allow+ r"(?:mach|klapp|schalt)|(?:runter|hoch)(?:ge)?fahr|" # i18n-allowr"anmeld|abmeld|minimier|maximier|verkleiner|vergroesser|wechsel|navigier)\w*")_ES_ACTION = (@@ -391,8 +397,47 @@ _ES_ACTION = (r"mueve|cambia|navega|amplia|reduce)\w*")+# German separable verbs park the particle at the END of the clause: "mach das+# Fenster ZU", "mach den Browser AUF", "fahr den Rechner RUNTER". A matcher+# anchored on the clause-INITIAL token therefore sees a bare stem, and "mach"+# on its own is the most generic verb the language has — the particle is what+# makes the clause a command. Missing that shape read "Schau mal hier. Mach das+# Fenster zu." as a pure look, while jarvis/brain/cu_gate.py's+# ``\bmach\w*\b[^.?!]{0,40}\b(?:auf|zu)\b`` already read the same sentence as an+# action: the two halves of one ownership boundary disagreed about one turn.+#+# The stem list is short on purpose. Verbs whose particle form is more often a+# phone or travel command than a desktop one are left out ("leg auf", "ruf an",+# "fahr los"), because a false positive here costs the screenshot.+_DE_SEPARABLE_STEM = ( # i18n-allow: German speech-input matching data+ r"(?:mach|fahr|klapp|schalt|blend)(?:e|st|t|en)?"+)++# Particles that actually close a spoken desktop command. "nach", "vor" and+# "los" are deliberately absent: they open ordinary phrases far more often than+# they close a command.+_DE_SEPARABLE_PARTICLE = ( # i18n-allow: German speech-input matching data+ r"(?:auf|zu|an|aus|ein|um|runter|hoch|weg|rein|raus|zurueck)"+)++# The particle must CLOSE its clause, spoken fillers and a trailing comma+# aside. Mid-clause the very same token is a preposition, and that is the+# reading this boundary must never swallow: "Was ist da AUF dem Bildschirm?"+# is a question about the screen, not an order to operate it.+_DE_PARTICLE_CLAUSE_END = ( # i18n-allow: German speech-input matching data+ r"(?:\s+(?:bitte|mal|kurz|jetzt|nochmal|danke))*\s*(?:$|[,.;:!?])"+)++# Same bounded gap cu_gate uses, and ``[^.?!]`` so the verb of one sentence can+# never bind the particle of the next.+_DE_SEPARABLE_ACTION = (+ rf"{_DE_SEPARABLE_STEM}\b[^.?!]{{0,40}}?"+ rf"\b{_DE_SEPARABLE_PARTICLE}{_DE_PARTICLE_CLAUSE_END}"+)+_ACTION_CONNECTOR_SPLIT_RE: re.Pattern[str] = re.compile(- rf"\b(?:and|und|y)\s+(?=(?:{_EN_ACTION}|{_DE_ACTION}|{_ES_ACTION})\b)",+ rf"\b(?:and|und|y)\s+"+ rf"(?=(?:{_EN_ACTION}|{_DE_ACTION}|{_ES_ACTION})\b|(?:{_DE_SEPARABLE_ACTION}))",re.IGNORECASE,)@@ -418,6 +463,10 @@ _SCREEN_OPERATION_CLAUSE_RE: re.Pattern[str] = re.compile(rf"|^bitte\s+[^.?!]{{0,96}}?{_DE_ACTION}\b" # i18n-allowrf"|^(?:kannst|koenntest|wuerdest|wirst)\s+du\s+(?:bitte\s+)?"rf"[^.?!]{{0,96}}?{_DE_ACTION}\b" # i18n-allow+ # German separable verbs, split across the clause ("mach das Fenster zu").+ rf"|^(?:bitte\s+)?{_DE_SEPARABLE_ACTION}" # i18n-allow+ rf"|^(?:kannst|koenntest|wuerdest|wirst)\s+du\s+(?:bitte\s+)?"+ rf"[^.?!]{{0,72}}?{_DE_SEPARABLE_ACTION}" # i18n-allow# Spanish imperative and modal request forms.rf"|^(?:por\s+favor\s+)?{_ES_ACTION}\b"rf"|^(?:puedes|podrias)\s+(?:por\s+favor\s+)?[^.?!]{{0,96}}?{_ES_ACTION}\b",diff --git a/tests/unit/brain/test_image_turn_tool_override.py b/tests/unit/brain/test_image_turn_tool_override.pyindex 72188c6345..e378a96229 100644--- a/tests/unit/brain/test_image_turn_tool_override.py+++ b/tests/unit/brain/test_image_turn_tool_override.py@@ -4,15 +4,16 @@ Historically hard ``{}`` (docs/screen-context.md §3.1a, maintainer mandate2026-08-02 "looking is not operating"), then widened once for a mandated WRITEtool (code-review finding 2026-08-08).-2026-08-17 review: an emptied surface left a turn that MIXES a look with an-action ("Schau mal hier. Mach das Fenster zu.") describing a picture with no way-to do the thing that was asked — ``intent.requests_screen_operation`` anchors its-action verbs at the clause start, so a separable German verb slips through and-the turn still classifies SCREEN. ``computer_use`` therefore stays in the-surface; the look/operate boundary is enforced per call by-``cu_gate.llm_computer_use_allowed``, which reads the USER's utterance and so-refuses a pure look request anyway (pinned in-``test_screen_turn_computer_use_boundary`` below).+2026-08-17 review: an emptied surface left a turn that arrives WITH an image but+still asks for an action describing a picture with no way to do the thing that+was asked. ``computer_use`` therefore stays in the surface; the look/operate+boundary is enforced per call by ``cu_gate.llm_computer_use_allowed``, which+reads the USER's utterance and so refuses a pure look request anyway (pinned in+``test_screen_turn_computer_use_boundary_still_holds`` below).++A turn whose utterance itself mixes a look with an action ("Schau mal hier. Mach+das Fenster zu.") never reaches this surface at all: ``intent`` now reads the+German separable verb and hands the turn to Computer-Use with no capture.""" # i18n-allow: verbatim quote of the German utterancefrom __future__ import annotations@@ -103,11 +104,15 @@ def test_screen_turn_computer_use_boundary_still_holds() -> None:for look in ("Was siehst du auf meinem Bildschirm?", "Lies mir das mal vor"):assert not llm_computer_use_allowed(look), look- # The turn the empty surface used to break: a look glued to an action whose- # verb ``requests_screen_operation`` misses (German separable "mach … zu"),- # so it still classifies SCREEN and still captures — but the action is real- # and the vehicle must be both visible AND allowed.+ # A look glued to an action belongs to Computer-Use outright: the ownership+ # boundary reads the German separable verb ("mach … zu") and stands Screen+ # Context down, so no one-shot capture happens first.mixed = "Schau mal hier. Mach das Fenster zu."- assert classify(mixed).intent is VisualIntent.SCREEN+ assert classify(mixed).intent is VisualIntent.NONEassert llm_computer_use_allowed(mixed)++ # The surface still carries computer_use on a captured-screen turn. A turn+ # can arrive with an image for reasons other than the utterance (an+ # explicit screenshot, a pointing turn), and emptying the surface left the+ # model describing a picture with no way to act.assert "computer_use" in _mgr(_surface())._image_turn_tool_override()diff --git a/tests/unit/screen_context/test_intent.py b/tests/unit/screen_context/test_intent.pyindex a796ba4d77..f5606c9d79 100644--- a/tests/unit/screen_context/test_intent.py+++ b/tests/unit/screen_context/test_intent.py@@ -108,6 +108,70 @@ def test_desktop_operations_belong_to_computer_use(utterance: str) -> None:assert classify(utterance).intent is VisualIntent.NONE+ "utterance",+ [+ # i18n-allow: German speech-input fixtures+ "Mach das Fenster zu", # i18n-allow: DE input+ "Mach den Browser auf", # i18n-allow: DE input+ "Bitte mach den Browser auf", # i18n-allow: DE input+ "Mach das Fenster zu, bitte", # i18n-allow: DE input+ "Machst du das Fenster zu?", # i18n-allow: DE input+ "Fahr den Rechner runter", # i18n-allow: DE input+ "Schalt den Bildschirm aus", # i18n-allow: DE input+ "Klapp das Menü zu", # i18n-allow: DE input+ # The joined infinitive is the same verb with the particle back on the+ # front — the shape a transcript usually carries.+ "Kannst du das Fenster zumachen?", # i18n-allow: DE input+ "Kannst du bitte den Browser aufmachen?", # i18n-allow: DE input+ # A look glued to an action: the action owns the turn.+ "Schau mal hier. Mach das Fenster zu.", # i18n-allow: DE input+ "Schau dir das an und mach das Fenster zu", # i18n-allow: DE input+ ],+)+def test_german_separable_verbs_are_desktop_operations(utterance: str) -> None:+ """A separable verb parks its particle at the clause END.++ Anchoring action verbs on the clause-initial token saw only the bare stem+ ("mach"), so an unambiguous command read as a pure look while+ ``jarvis/brain/cu_gate.py`` already read the same sentence as an action.+ """+ assert requests_screen_operation(utterance)+ assert classify(utterance).intent is VisualIntent.NONE+++ "utterance",+ [+ # The particle words are ordinary prepositions mid-clause. These are+ # the sentences the separable-verb rule must never swallow.+ # i18n-allow: German speech-input fixtures+ "Was ist da auf dem Bildschirm?", # i18n-allow: DE input+ "Was siehst du auf meinem Monitor?", # i18n-allow: DE input+ "Was steht da auf dem Bildschirm?", # i18n-allow: DE input+ "Schau mal auf meinen Bildschirm", # i18n-allow: DE input+ ],+)+def test_a_particle_word_alone_is_not_an_operation(utterance: str) -> None:+ assert not requests_screen_operation(utterance)+ assert classify(utterance).wants_capture+++ "utterance",+ [+ # A separable stem with no clause-final particle, and nouns that merely+ # start with one. i18n-allow: German speech-input fixtures+ "Mach dir keine Sorgen um das Update", # i18n-allow: DE input+ "Was macht das Programm auf dem Bildschirm?", # i18n-allow: DE input+ "Die Ausfahrt Nummer 3 ist gesperrt", # i18n-allow: DE input+ "Ich fahre morgen nach Berlin", # i18n-allow: DE input+ ],+)+def test_separable_stems_without_a_closing_particle_stay_quiet(utterance: str) -> None:+ assert not requests_screen_operation(utterance)++@pytest.mark.parametrize("utterance",[