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(voice): give the handshake a state, and a way back out of it
rubenluetke10-beepef368145f051
diff --git a/jarvis/speech/pipeline.py b/jarvis/speech/pipeline.pyindex 805d4ba0b3..13c5ecc4b4 100644--- a/jarvis/speech/pipeline.py+++ b/jarvis/speech/pipeline.py@@ -3217,14 +3217,27 @@ class SpeechPipeline:# ------------------------------------------------------------------async def _transition(self, new_state: str) -> None:- if self._supervisor is not None:+ # This only DISPLAYS state, so nothing in it may end a call. A pipeline+ # assembled without a supervisor (headless, and every unit test that+ # builds one field by field) must still run the call to completion —+ # before this was defensive, adding one status update to the realtime+ # path aborted the whole session loop on a missing attribute.+ supervisor = getattr(self, "_supervisor", None)+ if supervisor is not None:try:- await self._supervisor.set_state(new_state)+ await supervisor.set_state(new_state)except Exception as exc: # noqa: BLE001log.warning("Supervisor-Transition zu %s fehlgeschlagen: %s", new_state, exc)# Permanent-Vision Privacy-Hook (Wave-2 B7): bei IDLE pausieren,# bei ACTIVE-Familie (LISTENING/THINKING/SPEAKING) resumen.- self._maybe_toggle_vision_on_state(new_state)+ try:+ self._maybe_toggle_vision_on_state(new_state)+ except Exception: # noqa: BLE001+ log.debug(+ "Vision toggle for state %s skipped (pipeline without vision)",+ new_state,+ exc_info=True,+ )async def _set_turn_state(self,@@ -7986,6 +7999,13 @@ class SpeechPipeline:message.get("input_sample_rate", "unknown"),message.get("output_sample_rate", "unknown"),)+ # The handshake put the machine into CONNECTING; nothing took it+ # back out. On a hosted provider that gap is under a second and+ # the next event papers over it, but a self-hosted server needs+ # seconds, and the bar sat on "connecting" for a call that was+ # already listening (field report 2026-08-06). Say the true+ # state now: from here the session hears the user.+ await self._transition("LISTENING")elif kind == "transcript":role = str(message.get("role", ""))if role == "user" and bool(message.get("is_final", False)):diff --git a/jarvis/state/supervisor.py b/jarvis/state/supervisor.pyindex 72773c6cea..3329012950 100644--- a/jarvis/state/supervisor.py+++ b/jarvis/state/supervisor.py@@ -16,6 +16,15 @@ if TYPE_CHECKING:class SupervisorState(str, Enum):IDLE = "IDLE"+ # A realtime transport is negotiating: the call has been accepted but the+ # provider has not taken a single audio frame yet. Without this state the+ # machine had nowhere to go during a handshake, ``set_state("CONNECTING")``+ # was silently dropped, and the bar and orb kept claiming the user was+ # being heard while nothing was listening. A hosted provider hides that in+ # under a second; a self-hosted one takes seconds and made it obvious+ # (field report 2026-08-06). The overlay surfaces and the web UI already+ # rendered this state — only the state machine did not have it.+ CONNECTING = "CONNECTING"LISTENING = "LISTENING"THINKING = "THINKING"SPEAKING = "SPEAKING"diff --git a/jarvis/ui/web/frontend/src/components/VoiceIndicator.tsx b/jarvis/ui/web/frontend/src/components/VoiceIndicator.tsxindex 7abb867141..0bfc315e56 100644--- a/jarvis/ui/web/frontend/src/components/VoiceIndicator.tsx+++ b/jarvis/ui/web/frontend/src/components/VoiceIndicator.tsx@@ -6,6 +6,7 @@ import { cn } from "@/lib/utils";// here fails the TypeScript build instead of rendering an undefined swatch.const STATE_STYLE: Record<VoiceState, { color: string; ring: string }> = {idle: { color: "bg-blue-500", ring: "ring-blue-500/40" },+ connecting: { color: "bg-amber-400", ring: "ring-amber-400/50 animate-pulse" },listening: { color: "bg-emerald-500", ring: "ring-emerald-500/50 animate-pulse" },thinking: { color: "bg-yellow-500", ring: "ring-yellow-500/50 animate-pulse" },speaking: { color: "bg-pink-500", ring: "ring-pink-500/50 animate-pulse" },diff --git a/jarvis/ui/web/frontend/src/components/agentic/VoiceBubble.tsx b/jarvis/ui/web/frontend/src/components/agentic/VoiceBubble.tsxindex bd5fd1bfba..e06e58ec3c 100644--- a/jarvis/ui/web/frontend/src/components/agentic/VoiceBubble.tsx+++ b/jarvis/ui/web/frontend/src/components/agentic/VoiceBubble.tsx@@ -158,6 +158,10 @@ function storePos(pos: BubblePos): void {/** Locale keys for the status line, per state. */const STATUS_KEY: Record<VoiceState, string> = {idle: "agentic_grid.voice_bubble.ready",+ // The bubble has no line of its own for a negotiating transport, and the+ // sidebar already spells it out. Borrow the voice-state wording rather than+ // invent a second phrasing for the same moment.+ connecting: "voice_state.connecting",listening: "agentic_grid.voice_bubble.listening",thinking: "agentic_grid.voice_bubble.thinking",speaking: "agentic_grid.voice_bubble.speaking",diff --git a/jarvis/ui/web/frontend/src/components/agentic/VoiceOrb.tsx b/jarvis/ui/web/frontend/src/components/agentic/VoiceOrb.tsxindex 4cdb63f727..d8b3ad3686 100644--- a/jarvis/ui/web/frontend/src/components/agentic/VoiceOrb.tsx+++ b/jarvis/ui/web/frontend/src/components/agentic/VoiceOrb.tsx@@ -42,6 +42,19 @@ interface Motion {}const MOTIONS: Record<VoiceState, Motion> = {+ connecting: {+ // Waiting on a transport, not on the user: busier than idle so the wait is+ // visible, calmer than thinking so it does not claim work is happening.+ // Nothing is being heard yet, hence no voice impact.+ flowX: 0.42,+ flowY: -0.12,+ breathAmp: 0.012,+ breathHz: 0.5,+ turbulence: 1.2,+ energy: 0.94,+ voiceImpact: 0,+ colorChurn: 0.7,+ },idle: {flowX: 0.025,flowY: 0.008,diff --git a/jarvis/ui/web/frontend/src/store/events.ts b/jarvis/ui/web/frontend/src/store/events.tsindex ce899df9ff..ee25b3eac8 100644--- a/jarvis/ui/web/frontend/src/store/events.ts+++ b/jarvis/ui/web/frontend/src/store/events.ts@@ -19,6 +19,11 @@ import {*/export type VoiceState =| "idle"+ // A realtime transport is negotiating: the call is accepted, the provider+ // has not taken an audio frame yet. Hosted providers pass through it in+ // under a second; a self-hosted server takes seconds, which is when a+ // missing state stops being cosmetic.+ | "connecting"| "listening"| "thinking"| "speaking"@@ -28,6 +33,7 @@ export type VoiceState =/** The full lowercased supervisor vocabulary, in the order it is declared. */export const VOICE_STATES: readonly VoiceState[] = ["idle",+ "connecting","listening","thinking","speaking",