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
feat(backend): consolidate in-flight brain/core/agents/board/missions work
Ruben Lütkedb6eb6770242
diff --git a/jarvis/agents/__init__.py b/jarvis/agents/__init__.pyindex ce3738bd4a..c633faff17 100644--- a/jarvis/agents/__init__.py+++ b/jarvis/agents/__init__.py@@ -1,11 +1,11 @@-"""Sub-Agent registry — live tree of all active Jarvis sub-agents.+"""Jarvis-Agent registry — live tree of all active Jarvis-Agents.Subscribes to the EventBus and builds an in-memory tree from the Phase-5.5-instrumentation events (OpenClawTaskStarted/Completed, BrainTurnStarted/+instrumentation events (JarvisAgentTaskStarted/Completed, BrainTurnStarted/Completed, ToolCallStarted/Completed, HarnessDispatched/Completed).Consumed by the desktop app canvas view via the API``GET /api/sub-agents/tree``."""-from .registry import AgentNode, SubAgentRegistry+from .registry import AgentNode, JarvisAgentRegistry-__all__ = ["AgentNode", "SubAgentRegistry"]+__all__ = ["AgentNode", "JarvisAgentRegistry"]diff --git a/jarvis/agents/registry.py b/jarvis/agents/registry.pyindex e3c5da4a13..3ce3bcc8c3 100644--- a/jarvis/agents/registry.py+++ b/jarvis/agents/registry.py@@ -1,4 +1,4 @@-"""SubAgentRegistry — live tree of all active Jarvis sub-agents.+"""JarvisAgentRegistry — live tree of all active Jarvis-Agents.The registry is a typed bus subscriber: it holds an in-memory dictof ``AgentNode`` instances and maintains parent-child links via the@@ -12,7 +12,7 @@ Design decisions (see Plan §3):removes the node from the map and from ``parent.children_trace_ids``.- **Heuristic parent linking for HarnessDispatched**: the event has no``parent_trace_id`` field. We take the most recently started still-running- OpenClaw node as the parent. If none exists, the harness node becomes root.+ worker node as the parent. If none exists, the harness node becomes root."""from __future__ import annotations@@ -30,9 +30,9 @@ from jarvis.core.events import (BrainTurnStarted,HarnessCompleted,HarnessDispatched,- OpenClawReviewTriggered,- OpenClawTaskCompleted,- OpenClawTaskStarted,+ JarvisAgentReviewTriggered,+ JarvisAgentTaskCompleted,+ JarvisAgentTaskStarted,ToolCallCompleted,ToolCallStarted,)@@ -51,7 +51,7 @@ from jarvis.missions.events import (log = logging.getLogger(__name__)-NodeKind = Literal["router", "openclaw", "harness", "tool_call"]+NodeKind = Literal["router", "jarvis_agent", "harness", "tool_call"]NodeStatus = Literal["running", "completed", "failed"]@@ -90,12 +90,12 @@ class AgentNode:depth: int = 0-class SubAgentRegistry:- """Live tree registry for the sub-agent dashboard.+class JarvisAgentRegistry:+ """Live tree registry for the Jarvis-Agent dashboard.Usage::- registry = SubAgentRegistry(bus)+ registry = JarvisAgentRegistry(bus)registry.attach() # activate bus subscriptionsroots = registry.tree() # root nodes only (no parent)snap = registry.snapshot() # flat Dict[trace_id, AgentNode]@@ -109,12 +109,12 @@ class SubAgentRegistry:self._mission_bus_attached = Falseself._cleanup_tasks: set[asyncio.Task[None]] = set()- def attach(self) -> SubAgentRegistry:+ def attach(self) -> JarvisAgentRegistry:if self._attached:return self- self._bus.subscribe(OpenClawTaskStarted, self._on_openclaw_started)- self._bus.subscribe(OpenClawReviewTriggered, self._on_openclaw_review)- self._bus.subscribe(OpenClawTaskCompleted, self._on_openclaw_completed)+ self._bus.subscribe(JarvisAgentTaskStarted, self._on_worker_started)+ self._bus.subscribe(JarvisAgentReviewTriggered, self._on_worker_review)+ self._bus.subscribe(JarvisAgentTaskCompleted, self._on_worker_completed)self._bus.subscribe(BrainTurnStarted, self._on_brain_turn_started)self._bus.subscribe(BrainTurnCompleted, self._on_brain_turn_completed)self._bus.subscribe(ToolCallStarted, self._on_tool_call_started)@@ -124,7 +124,7 @@ class SubAgentRegistry:self._attached = Truereturn self- def attach_mission_bus(self, mission_bus: Any) -> SubAgentRegistry:+ def attach_mission_bus(self, mission_bus: Any) -> JarvisAgentRegistry:"""Bridge Phase-6 MissionBus events into the legacy agent-tree.Welle-4 removed the publishers for OpenClawTaskStarted/Completed et@@ -164,27 +164,27 @@ class SubAgentRegistry:if child_tid not in parent.children_trace_ids:parent.children_trace_ids.append(child_tid)- def _find_newest_running_openclaw(self) -> AgentNode | None:+ def _find_newest_running_worker(self) -> AgentNode | None:candidates = [n for n in self._nodes.values()- if n.kind == "openclaw" and n.status == "running"+ if n.kind == "jarvis_agent" and n.status == "running"]if not candidates:return Nonereturn max(candidates, key=lambda n: n.started_ns)- async def _on_openclaw_started(self, e: OpenClawTaskStarted) -> None:+ async def _on_worker_started(self, e: JarvisAgentTaskStarted) -> None:tid = _tid(e.trace_id)if tid is None:returnparent_tid = _tid(e.parent_trace_id)# User-facing name is the neutral role only. provider/model are kept as# structured fields (below) for internal aggregation, but never baked- # into the display name — the Sub-Agents board must not surface the+ # into the display name — the Jarvis-Agent board must not surface the# underlying engine or model. `kind` stays the internal routing tag.- name = "Sub-Agent"+ name = "Jarvis-Agent"self._nodes[tid] = AgentNode(- trace_id=tid, kind="openclaw", name=name, status="running",+ trace_id=tid, kind="jarvis_agent", name=name, status="running",parent_trace_id=parent_tid,provider=e.provider or None, model=e.model or None,started_ns=e.timestamp_ns,@@ -194,7 +194,7 @@ class SubAgentRegistry:)self._attach_child(parent_tid, tid)- async def _on_openclaw_review(self, e: OpenClawReviewTriggered) -> None:+ async def _on_worker_review(self, e: JarvisAgentReviewTriggered) -> None:tid = _tid(e.trace_id)if tid is None or tid not in self._nodes:return@@ -202,7 +202,7 @@ class SubAgentRegistry:self._nodes[tid].review_iterations, e.iteration)- async def _on_openclaw_completed(self, e: OpenClawTaskCompleted) -> None:+ async def _on_worker_completed(self, e: JarvisAgentTaskCompleted) -> None:tid = _tid(e.trace_id)if tid is None or tid not in self._nodes:return@@ -231,7 +231,7 @@ class SubAgentRegistry:async def _on_brain_turn_completed(self, e: BrainTurnCompleted) -> None:running = [n for n in self._nodes.values()- if n.kind == "openclaw" and n.status == "running"+ if n.kind == "jarvis_agent" and n.status == "running"]if not running:return@@ -267,7 +267,7 @@ class SubAgentRegistry:tid = _tid(e.trace_id)if tid is None:return- parent = self._find_newest_running_openclaw()+ parent = self._find_newest_running_worker()parent_tid = parent.trace_id if parent else Noneself._nodes[tid] = AgentNode(trace_id=tid, kind="harness",@@ -365,10 +365,10 @@ class SubAgentRegistry:returnself._nodes[tid] = AgentNode(trace_id=tid,- kind="openclaw",+ kind="jarvis_agent",# Neutral role label only — no engine/provider/model/language in# the name. The prompt (what it is doing) rides `utterance`.- name="Sub-Agent",+ name="Jarvis-Agent",status="running",started_ns=ts_ns,utterance=payload.prompt,diff --git a/jarvis/board/achievements.py b/jarvis/board/achievements.pyindex 52b2dfd348..263168a570 100644--- a/jarvis/board/achievements.py+++ b/jarvis/board/achievements.py@@ -93,7 +93,7 @@ def _eval_first_mcp(event: Event, ctx: AchievementContext) -> UnlockDecision | Ndef _eval_openclaw_summoner(event: Event, ctx: AchievementContext) -> UnlockDecision | None:"""First successful OpenClaw spawn."""- if type(event).__name__ != "OpenClawTaskCompleted":+ if type(event).__name__ != "JarvisAgentTaskCompleted":return Noneif not bool(getattr(event, "success", False)):return None@@ -136,9 +136,9 @@ def _eval_triple_combo(event: Event, ctx: AchievementContext) -> UnlockDecisiondef _make_task_count_eval(threshold: int) -> Callable[[Event, AchievementContext], UnlockDecision | None]:def _eval(event: Event, ctx: AchievementContext) -> UnlockDecision | None:name = type(event).__name__- if name not in ("TaskCompleted", "OpenClawTaskCompleted"):+ if name not in ("TaskCompleted", "JarvisAgentTaskCompleted"):return None- if name == "OpenClawTaskCompleted" and not bool(getattr(event, "success", False)):+ if name == "JarvisAgentTaskCompleted" and not bool(getattr(event, "success", False)):return Nonetotal = ctx.successful_tasks_total()if total >= threshold:@@ -154,7 +154,7 @@ def _eval_ten_x_engineer(event: Event, ctx: AchievementContext) -> UnlockDecisiosums over OpenClaw runtimes during which the user was typically doingsomething else."""- if type(event).__name__ != "OpenClawTaskCompleted":+ if type(event).__name__ != "JarvisAgentTaskCompleted":return Noneif ctx.hours_saved_last_7d() >= 10.0:return UnlockDecision(evidence={"hours_saved_7d": round(ctx.hours_saved_last_7d(), 1)})@@ -195,8 +195,8 @@ ACHIEVEMENTS: list[AchievementSpec] = [),AchievementSpec(id="openclaw_summoner",- title="OpenClaw Summoner",- description="Erster erfolgreicher OpenClaw-Spawn.",+ title="Jarvis-Agent Summoner",+ description="Erster erfolgreicher Jarvis-Agent-Spawn.",tier="mastery",evaluator=_eval_openclaw_summoner,),@@ -231,7 +231,7 @@ ACHIEVEMENTS: list[AchievementSpec] = [AchievementSpec(id="ten_x_engineer",title="10x Engineer",- description="Ueber 10 OpenClaw-Stunden in den letzten 7 Tagen.",+ description="Ueber 10 Jarvis-Agent-Stunden in den letzten 7 Tagen.",tier="mastery",evaluator=_eval_ten_x_engineer,),@@ -271,6 +271,6 @@ ACHIEVEMENTS_BY_ID: dict[str, AchievementSpec] = {a.id: a for a in ACHIEVEMENTS}TRIGGERING_EVENT_NAMES: frozenset[str] = frozenset({"ActionExecuted","HarnessCompleted",- "OpenClawTaskCompleted",+ "JarvisAgentTaskCompleted","TaskCompleted",})diff --git a/jarvis/board/aggregator.py b/jarvis/board/aggregator.pyindex d204a8c430..161bebf40c 100644--- a/jarvis/board/aggregator.py+++ b/jarvis/board/aggregator.py@@ -65,8 +65,8 @@ ACTIVE_EVENT_NAMES = {"ListeningStarted","MessageSent","ResponseGenerated",- "OpenClawBackgroundCompleted",- "OpenClawTaskCompleted",+ "JarvisAgentBackgroundCompleted",+ "JarvisAgentTaskCompleted","SystemStarted","TaskCompleted","TaskFailed",@@ -377,7 +377,7 @@ class BoardAggregator:stats.tasks_completed += 1elif event == "TaskFailed":stats.tasks_failed += 1- elif event == "OpenClawTaskCompleted":+ elif event == "JarvisAgentTaskCompleted":if payload.get("success"):stats.tasks_completed += 1else:diff --git a/jarvis/board/evaluator.py b/jarvis/board/evaluator.pyindex 32817f9546..4ce3229663 100644--- a/jarvis/board/evaluator.py+++ b/jarvis/board/evaluator.py@@ -186,7 +186,7 @@ class _LiveContext(AchievementContext):self._successful_tasks += 1self._persist("successful_tasks_total", str(self._successful_tasks))- elif name == "OpenClawTaskCompleted":+ elif name == "JarvisAgentTaskCompleted":if bool(getattr(event, "success", False)):self._successful_tasks += 1self._openclaw_success += 1diff --git a/jarvis/brain/app_control.py b/jarvis/brain/app_control.pyindex 48349ea9f1..a31aaa654a 100644--- a/jarvis/brain/app_control.py+++ b/jarvis/brain/app_control.py@@ -534,8 +534,8 @@ async def _switch_subagent(ANTIGRAVITY_SUBAGENT_SLUGS,CODEX_SUBAGENT_CANONICAL,CODEX_SUBAGENT_SLUGS,- JARVIS_TO_OPENCLAW,- canonical_subagent_provider,+ JARVIS_TO_WORKER_SLUG,+ canonical_worker_provider,)except Exception as exc: # noqa: BLE001return {@@ -544,10 +544,11 @@ async def _switch_subagent("error": f"Subagent provider map unavailable: {exc}",}- canon = canonical_subagent_provider(provider) or ""+ canon = canonical_worker_provider(provider) or ""- # Codex is a DIRECT worker (no OpenClaw slug) — accept it explicitly, mirroring- # the REST ``/api/subagent/switch`` path so the two switch sites never drift.+ # Codex is a DIRECT worker (no worker-harness slug) — accept it explicitly,+ # mirroring the REST ``/api/jarvis-agent/switch`` path so the two switch sites+ # never drift.# Backed by the ChatGPT subscription (OAuth) OR an OpenAI API key.if canon in CODEX_SUBAGENT_SLUGS:try:@@ -626,13 +627,13 @@ async def _switch_subagent("requires_restart": True,}- if canon not in JARVIS_TO_OPENCLAW:- # List EVERY subagent-capable provider, not just the API/OpenClaw ones —+ if canon not in JARVIS_TO_WORKER_SLUG:+ # List EVERY worker-capable provider, not just the API/harness ones —# Codex and Antigravity route through their own workers, so omitting them# produced the false "codex is not a valid provider, only claude/gemini/# openai/openrouter" reply (forensic 2026-06-27).known = ", ".join(sorted(- set(JARVIS_TO_OPENCLAW)+ set(JARVIS_TO_WORKER_SLUG)| {CODEX_SUBAGENT_CANONICAL, ANTIGRAVITY_SUBAGENT_CANONICAL}))return {diff --git a/jarvis/brain/factory.py b/jarvis/brain/factory.pyindex a68ffb3c6e..470f401ae3 100644--- a/jarvis/brain/factory.py+++ b/jarvis/brain/factory.py@@ -214,7 +214,7 @@ SELF_MOD_TOOL_NAMES_ROUTER = frozenset({})-def warn_if_phantom_openclaw(config: Any, harness_manager: Any) -> bool:+def warn_if_phantom_worker_harness(config: Any, harness_manager: Any) -> bool:"""Log a warning when ``[harness.openclaw].enabled`` is true but unregistered.OpenClaw was removed in Welle 4 and has no entry-point, so an@@ -587,7 +587,7 @@ _KONTROLLIERER_REF: list[Any] = []# "noch nicht bereit, bitte einen Moment warten" the in-progress path# returns when both the manager and kontrollierer singletons are None# but the server is still booting.-_OPENCLAW_BOOTSTRAP_FAILED: list[bool] = [False]+_WORKER_BOOTSTRAP_FAILED: list[bool] = [False]def set_mission_manager(manager: Any) -> None:@@ -617,21 +617,21 @@ def set_kontrollierer(kontrollierer: Any) -> None:_KONTROLLIERER_REF.append(kontrollierer)-def set_openclaw_bootstrap_failed(flag: bool) -> None:- """Mark the OpenClaw bootstrap as permanently broken for this process.+def set_worker_bootstrap_failed(flag: bool) -> None:+ """Mark the worker-harness bootstrap as permanently broken for this process.Called from ``server.py::_init_mission_stack`` when the Mission-Stackbootstrap raised. spawn_worker reads this via- ``is_openclaw_bootstrap_failed()`` and surfaces an honest "konnte+ ``is_worker_bootstrap_failed()`` and surfaces an honest "konntenicht initialisiert werden" message instead of the transient"noch nicht bereit" the in-progress path returns."""- _OPENCLAW_BOOTSTRAP_FAILED[0] = bool(flag)+ _WORKER_BOOTSTRAP_FAILED[0] = bool(flag)-def is_openclaw_bootstrap_failed() -> bool:+def is_worker_bootstrap_failed() -> bool:"""Returns True iff the Mission-Stack bootstrap raised at startup."""- return bool(_OPENCLAW_BOOTSTRAP_FAILED[0])+ return bool(_WORKER_BOOTSTRAP_FAILED[0])def _phase2_full_brain(@@ -700,7 +700,7 @@ def _phase2_full_brain(harness_manager = HarnessManager(bus=bus)# Config honesty: warn (don't fail) if a [harness.openclaw] block is enabled# but the harness is unregistered — that block is inert (Welle-4 removal).- warn_if_phantom_openclaw(config, harness_manager)+ warn_if_phantom_worker_harness(config, harness_manager)# Phase A1: build the AwarenessManager (DI for the awareness-snapshot tool).# Do NOT start it here — start()/stop() is the responsibility of the app layerdiff --git a/jarvis/core/config.py b/jarvis/core/config.pyindex 117b5c37ee..e0e5da38dd 100644--- a/jarvis/core/config.py+++ b/jarvis/core/config.py@@ -957,7 +957,7 @@ class JarvisAgentHarnessConfig(BaseModel):setting ``enabled = true`` has NO effect — the harness cannot be dispatchedand "start a subagent" routes to ``spawn_worker`` regardless. The boot pathlogs a warning when ``enabled`` is true but the harness is unregistered- (see ``warn_if_phantom_openclaw`` in jarvis/brain/factory.py). Heavy+ (see ``warn_if_phantom_worker_harness`` in jarvis/brain/factory.py). Heavysub-agent work runs through the Mission-Manager (ClaudeDirectWorker), nothere, until Wave 3 actually wires the bridge.diff --git a/jarvis/friends/status_filter.py b/jarvis/friends/status_filter.pyindex e48d528388..34b7e62438 100644--- a/jarvis/friends/status_filter.py+++ b/jarvis/friends/status_filter.py@@ -56,8 +56,8 @@ PROFILES: dict[StatusProfile, dict[str, Any]] = {"VoiceSessionEnded","MissionStarted","MissionCompleted",- "OpenClawTaskStarted",- "OpenClawTaskCompleted",+ "JarvisAgentTaskStarted",+ "JarvisAgentTaskCompleted",}),"fields": {@@ -65,8 +65,8 @@ PROFILES: dict[StatusProfile, dict[str, Any]] = {"VoiceSessionEnded": frozenset({"timestamp_ns"}),"MissionStarted": frozenset({"timestamp_ns", "title"}),"MissionCompleted": frozenset({"timestamp_ns", "title", "success"}),- "OpenClawTaskStarted": frozenset({"timestamp_ns", "summary"}),- "OpenClawTaskCompleted": frozenset(+ "JarvisAgentTaskStarted": frozenset({"timestamp_ns", "summary"}),+ "JarvisAgentTaskCompleted": frozenset({"timestamp_ns", "summary", "success"}),},diff --git a/jarvis/missions/critic/runner.py b/jarvis/missions/critic/runner.pyindex 3863b0de61..dc3eb954ad 100644--- a/jarvis/missions/critic/runner.py+++ b/jarvis/missions/critic/runner.py@@ -394,16 +394,16 @@ def build_critic_cmd("""del model, use_bare- from jarvis.missions.worker_runtime.provider_map import to_provider_slug+ from jarvis.missions.worker_runtime.provider_map import to_worker_slugfrom jarvis.missions.workers.provider_chain import (- _build_openclaw_cmd,+ _build_worker_cmd,_resolve_provider_chain,_resolve_worker_argv_prefix,)chain = _resolve_provider_chain(requested_provider=provider)primary = chain[0]- openclaw_slug = to_provider_slug(primary.provider)+ worker_slug = to_worker_slug(primary.provider)augmented_prompt = (f"{prompt}\n\n""---\n"@@ -411,11 +411,11 @@ def build_critic_cmd("schema. No prose, markdown, or code fences before or after it.\n"f"{schema_json}\n")- return _build_openclaw_cmd(+ return _build_worker_cmd(augmented_prompt,binary=_resolve_worker_argv_prefix(),session_id="critic",- openclaw_slug=openclaw_slug,+ worker_slug=worker_slug,model=primary.model,timeout_s=DEFAULT_TIMEOUT_SECONDS,extra_args=("--agent", "critic"),@@ -1069,8 +1069,8 @@ class CriticRunner:# only fires when the resolved provider is actually claude-cli.try:from jarvis.missions.worker_runtime.provider_map import (- UnknownJarvisProviderError,- to_provider_slug,+ NoWorkerSlugMappingError,+ to_worker_slug,)from jarvis.missions.workers.provider_chain import (_resolve_provider_chain,@@ -1078,9 +1078,9 @@ class CriticRunner:_chain = _resolve_provider_chain()_primary = _chain[0] if _chain else None_slug = (- to_provider_slug(_primary.provider) if _primary else None+ to_worker_slug(_primary.provider) if _primary else None)- except (UnknownJarvisProviderError, Exception): # noqa: BLE001+ except (NoWorkerSlugMappingError, Exception): # noqa: BLE001_slug = Noneif _slug == "claude-cli":defaults_cfg = agents_cfg.setdefault("defaults", {})diff --git a/jarvis/plugins/tool/spawn_worker.py b/jarvis/plugins/tool/spawn_worker.pyindex 455f5ff149..7372b5783a 100644--- a/jarvis/plugins/tool/spawn_worker.py+++ b/jarvis/plugins/tool/spawn_worker.py@@ -38,7 +38,7 @@ from typing import Any, Finalfrom jarvis.brain.ack_brain.spawn_announcement import SpawnAnnouncementComposerfrom jarvis.core.bus import EventBus-from jarvis.core.events import OpenClawAnnouncement, OpenClawBackgroundCompleted+from jarvis.core.events import JarvisAgentAnnouncement, JarvisAgentBackgroundCompletedfrom jarvis.core.protocols import ExecutionContext, ToolResultfrom jarvis.missions.manager import MissionManagerfrom jarvis.missions.stream_evidence import strip_spawn_meta@@ -507,9 +507,9 @@ class SpawnWorkerTool:# honest "konnte nicht initialisiert werden — siehe Log" instead# of being told to wait for something that will never happen.try:- from jarvis.brain.factory import is_openclaw_bootstrap_failed+ from jarvis.brain.factory import is_worker_bootstrap_failed- if is_openclaw_bootstrap_failed():+ if is_worker_bootstrap_failed():log.warning("spawn_worker invoked but bootstrap was marked failed — ""returning permanent-failure ack"@@ -575,7 +575,7 @@ class SpawnWorkerTool:try:# 1. UI/Telemetry-Announce — kein Voice-ACK (Pipeline filtert Empty).await self._bus.publish(- OpenClawAnnouncement(+ JarvisAgentAnnouncement(trace_id=ctx.trace_id,action=action,target=target,@@ -678,13 +678,13 @@ class SpawnWorkerTool:# the Voice-Listener will then publish OpenClawBackgroundCompleted.await kontrollierer.run_mission(mission_id)except asyncio.CancelledError:- log.info("OpenClaw background dispatch cancelled (app shutdown)")+ log.info("Jarvis-Agent background dispatch cancelled (app shutdown)")raise # Propagieren, damit Loop sauber aufraeumt.except BaseException as exc: # noqa: BLE001- log.exception("Background openclaw dispatch crashed")+ log.exception("Background Jarvis-Agent dispatch crashed")try:await self._bus.publish(- OpenClawBackgroundCompleted(+ JarvisAgentBackgroundCompleted(success=False,utterance=utterance,summary="",@@ -698,7 +698,7 @@ class SpawnWorkerTool:# whole failure disappears with no record in either the# log or the voice path.log.exception(- "OpenClawBackgroundCompleted bus-publish crashed"+ "JarvisAgentBackgroundCompleted bus-publish crashed")finally:# Release the liveness gate on EVERY terminal state — success,diff --git a/jarvis/runs/analyzer.py b/jarvis/runs/analyzer.pyindex 9a8fa0a6ab..6e8aba2a8a 100644--- a/jarvis/runs/analyzer.py+++ b/jarvis/runs/analyzer.py@@ -118,7 +118,7 @@ def build_decision_path(events: list[VoiceEventRow]) -> list[DecisionStep]:label=f"brain: {provider or '?'}",detail=(f"model={model}" if model else None),))- elif e.kind == "OpenClawTaskStarted":+ elif e.kind == "JarvisAgentTaskStarted":steps.append(DecisionStep(kind=DECISION_MISSION,label="spawned sub-agent mission",@@ -432,7 +432,7 @@ def feature_tags_from_events(events: list[VoiceEventRow]) -> list[str]:agents.append(ag)elif name not in tools:tools.append(name)- if e.kind == "OpenClawTaskStarted" and "sub_agent" not in agents:+ if e.kind == "JarvisAgentTaskStarted" and "sub_agent" not in agents:agents.append("sub_agent")if (e.kind == "SpeechSpoken"and _is_cu_failure_detail(str(e.payload.get("detail", "")))diff --git a/jarvis/runs/runs_ws.py b/jarvis/runs/runs_ws.pyindex 5d2893b9a4..0ac15d2df3 100644--- a/jarvis/runs/runs_ws.py+++ b/jarvis/runs/runs_ws.py@@ -56,8 +56,8 @@ _LIVE_KINDS: frozenset[str] = frozenset({"LatencySpan","ErrorOccurred","SpeechSpoken",- "OpenClawTaskStarted",- "OpenClawTaskCompleted",+ "JarvisAgentTaskStarted",+ "JarvisAgentTaskCompleted",})diff --git a/jarvis/sessions/recorder.py b/jarvis/sessions/recorder.pyindex a3c81e60e8..0aa3fec2ea 100644--- a/jarvis/sessions/recorder.py+++ b/jarvis/sessions/recorder.py@@ -47,8 +47,8 @@ from jarvis.core.events import (Event,ListeningStarted,ResponseGenerated,- OpenClawTaskCompleted,- OpenClawTaskStarted,+ JarvisAgentTaskCompleted,+ JarvisAgentTaskStarted,SpeechSpoken,SystemStateChanged,ToolCallCompleted,@@ -80,8 +80,8 @@ _RAW_EVENT_KINDS: frozenset[str] = frozenset("ActionExecuted","ResponseGenerated","AudioOutFirst",- "OpenClawTaskStarted",- "OpenClawTaskCompleted",+ "JarvisAgentTaskStarted",+ "JarvisAgentTaskCompleted","SystemStateChanged","VoiceSessionStarted","VoiceSessionEnded",@@ -246,9 +246,9 @@ class SessionRecorder:self._on_response_generated(event)elif isinstance(event, AudioOutFirst):self._on_audio_out_first(event)- elif isinstance(event, OpenClawTaskStarted):- self._on_openclaw_task_started(event)- elif isinstance(event, OpenClawTaskCompleted):+ elif isinstance(event, JarvisAgentTaskStarted):+ self._on_worker_task_started(event)+ elif isinstance(event, JarvisAgentTaskCompleted):if self._state.current_turn:self._state.current_turn.cost_usd += event.cost_estimate_usdelif isinstance(event, SystemStateChanged):@@ -544,28 +544,27 @@ class SessionRecorder:if event.intent_level and not t.tier:t.tier = _normalize_intent_level_to_tier(event.intent_level)- def _on_openclaw_task_started(self, event: OpenClawTaskStarted) -> None:- """OpenClaw-Task-Spawn markieren — Tier + Provider/Model fuellen.+ def _on_worker_task_started(self, event: JarvisAgentTaskStarted) -> None:+ """Jarvis-Agent task spawn — set tier + provider/model for telemetry.- Welle-4-Migration: vorher hiess das ``_on_sub_jarvis_started`` mit- ``SubJarvisStarted``-Event. Sub-Jarvis-Tier wurde durch OpenClaw-- Bridge ersetzt (siehe docs/openclaw-bridge.md §11). Schema bleibt 1:1.+ Welle-4-Migration: formerly ``_on_sub_jarvis_started`` with+ ``SubJarvisStarted``-Event. Sub-Jarvis tier was replaced by the worker+ harness (see docs/openclaw-bridge.md §11). Schema preserved 1:1.- Wichtig fuer die Telemetrie: ohne diesen Setter blieb provider/model- in voice_turns leer, wenn der Worker seinen eigenen- BrainTurnStarted nicht (mehr) emittierte — z.B. wenn die- Provider-Chain wegen fehlendem API-Key continue'd. ``OpenClawTaskStarted``- traegt provider/model bereits, also nutzen wir das als Quelle.+ Important for telemetry: without this setter, provider/model stayed+ empty in voice_turns when the worker no longer emitted its own+ BrainTurnStarted — e.g. when the provider chain continued due to a+ missing API key. ``JarvisAgentTaskStarted`` already carries provider/+ model, so we use that as the source.- Tier wird hier IMMER auf ``"openclaw"`` gesetzt (nicht nur wenn- leer): Der OpenClaw-Spawn ist die ``tier``-bestimmende Aktion fuer- diesen Turn — auch wenn vorher bereits der Router seinen- BrainTurnStarted("router") emittiert hatte.+ Tier is ALWAYS set to ``"jarvis_agent"`` here (not only when empty):+ the worker spawn is the tier-determining action for this turn — even+ when the router had already emitted BrainTurnStarted("router")."""if self._state is None or self._state.current_turn is None:returnt = self._state.current_turn- t.tier = "openclaw"+ t.tier = "jarvis_agent"if event.provider:t.provider = event.providerif event.model:diff --git a/jarvis/speech/pipeline.py b/jarvis/speech/pipeline.pyindex bc612664a1..6e03d4fe3b 100644--- a/jarvis/speech/pipeline.py+++ b/jarvis/speech/pipeline.py@@ -49,8 +49,8 @@ from jarvis.core.events import (LatencyTurnComplete,ListeningStarted,ObservationCaptured,- OpenClawAnnouncement,- OpenClawBackgroundCompleted,+ JarvisAgentAnnouncement,+ JarvisAgentBackgroundCompleted,SpeechSpoken,TranscriptFinal,TranscriptionUpdate,@@ -1395,10 +1395,10 @@ class SpeechPipeline:# User auch dann Bescheid, wenn er zwischenzeitlich etwas anderes# gemacht hat.self._bus.subscribe(- OpenClawBackgroundCompleted, self._on_background_completed+ JarvisAgentBackgroundCompleted, self._on_background_completed)# Spawn-Ansage: dynamisch aus action/target geformt.- self._bus.subscribe(OpenClawAnnouncement, self._on_spawn_announcement)+ self._bus.subscribe(JarvisAgentAnnouncement, self._on_spawn_announcement)# Mute toggle from any trigger surface (mascot doubleClick,# future hotkey/REST). The handler flips ``self._muted`` and# republishes the authoritative state on the bus.@@ -2782,7 +2782,7 @@ class SpeechPipeline:log.warning("Flash-Brain ack publish failed: %s", exc)async def _on_background_completed(- self, event: OpenClawBackgroundCompleted+ self, event: JarvisAgentBackgroundCompleted) -> None:"""Proaktive Voice-Ansage wenn ein Background-OpenClaw-Task fertig wird.@@ -2915,7 +2915,7 @@ class SpeechPipeline:hungup = hangup is not None and hangup.is_set()await self._transition("IDLE" if hungup else "LISTENING")- async def _on_spawn_announcement(self, event: OpenClawAnnouncement) -> None:+ async def _on_spawn_announcement(self, event: JarvisAgentAnnouncement) -> None:"""Spawn-ACK ist auf User-Wunsch (2026-05-12) deaktiviert.History: