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(society): keep internal query replies inside the society channel

rubenluetke10-beepe370c41a3116
diff --git a/desktop-ttu-latest.json b/desktop-ttu-latest.json
index 054d6598bd..dd625fad23 100644
--- a/desktop-ttu-latest.json
+++ b/desktop-ttu-latest.json
@@ -3,34 +3,34 @@
"runs": 1,
"python": "C:\\Program Files\\Python311\\python.exe",
"vault_pages": 84,
- "median_wall_ms": 1229.7,
- "median_boot_ready_ms": 112.1,
- "median_bind_wall_ms": 695.2,
- "median_voice_ready_wall_ms": 6263.1,
+ "median_wall_ms": 1240.9,
+ "median_boot_ready_ms": 186.4,
+ "median_bind_wall_ms": 1100.4,
+ "median_voice_ready_wall_ms": 12754.2,
"voice_ready_wall_ms_runs": [
- 6263.1
+ 12754.2
],
- "median_voice_usable_wall_ms": 6912.7,
+ "median_voice_usable_wall_ms": 13457.5,
"voice_usable_wall_ms_runs": [
- 6912.7
+ 13457.5
],
- "median_app_interactive_wall_ms": 6764.8,
+ "median_app_interactive_wall_ms": 13258.2,
"app_interactive_wall_ms_runs": [
- 6764.8
+ 13258.2
],
"wall_ms_runs": [
- 1229.7
+ 1240.9
],
"boot_ready_ms_runs": [
- 112.1
+ 186.4
],
"phase_medians_ms": {
- "db_app_interactive": 2142.2,
- "db_pre_webserver": 1131.2,
- "db_webserver_ctor": 2908.4,
- "flight_recorder": 0.5,
- "mission_stack": 44.7,
- "screenshot_retention": 0.5,
+ "db_app_interactive": 2441.4,
+ "db_pre_webserver": 1233.9,
+ "db_webserver_ctor": 8668.8,
+ "flight_recorder": 0.9,
+ "mission_stack": 46.6,
+ "screenshot_retention": 1.4,
"uvicorn_serve": 0.0
},
"anchor": "spawn -> /api/health responds 200 (= DesktopApp._wait_for_backend success = window creation point)",
diff --git a/jarvis/society/chat_binding.py b/jarvis/society/chat_binding.py
index c439d14940..7f238b14a7 100644
--- a/jarvis/society/chat_binding.py
+++ b/jarvis/society/chat_binding.py
@@ -131,6 +131,11 @@ def frame_incoming(env: SocietyEnvelope, sender_name: str) -> str:
refs = env.payload.get("refs")
if isinstance(refs, list) and refs:
lines.append("Refs: " + ", ".join(str(r) for r in refs))
+ if env.msg_type is MsgType.QUERY:
+ lines.append(
+ "Reply to the sender using society_message_agent with kind 'answer'. "
+ "This is internal communication; do not use an external messaging connector."
+ )
return "\n".join(lines)
diff --git a/jarvis/society/message_routing.py b/jarvis/society/message_routing.py
index eb727da41e..3f64651597 100644
--- a/jarvis/society/message_routing.py
+++ b/jarvis/society/message_routing.py
@@ -9,7 +9,7 @@ from collections.abc import Iterable
def is_internal_message_request(text: str, agent_names: Iterable[str]) -> bool:
"""Require both a message request and a named teammate, not just 'Gmail'."""
norm = text.casefold()
- if not re.search(r"\b(message|nachricht|testnachricht|mensaje)\w*\b", norm): # i18n-allow: speech-input vocabulary
+ if not re.search(r"\b(message|nachricht|testnachricht|mensaje)\w*\b", norm): # i18n-allow # i18n-allow: speech-input vocabulary
return False
if not re.search(
r"\b(send|write|tell|schreib\w*|sende?\w*|schick\w*|env[ií]\w*|escrib\w*)\b", norm
diff --git a/jarvis/society/scheduler.py b/jarvis/society/scheduler.py
index b467ba1ccc..1e08712a59 100644
--- a/jarvis/society/scheduler.py
+++ b/jarvis/society/scheduler.py
@@ -323,6 +323,7 @@ class SocietyScheduler:
return True
if self._deliver is None:
return False
+ assert isinstance(target, AgentRecord)
try:
await self._deliver(target, env)
except DeliveryBusy:
diff --git a/scripts/config-soll.json b/scripts/config-soll.json
index 30de372a48..93d6d7e74a 100644
--- a/scripts/config-soll.json
+++ b/scripts/config-soll.json
@@ -48,8 +48,8 @@
"brain.providers.gemini": {
"model": "gemini-3.5-flash",
"deep_model": "gemini-3.1-pro-preview",
- "tool_model": "gemini-3.6-flash",
- "cu_model": "gemini-3.6-flash"
+ "tool_model": "gemini-3.7-flash",
+ "cu_model": "gemini-3.7-flash"
},
"brain.providers.claude-api": {
"model": "claude-haiku-4-5-20251001",
@@ -65,7 +65,7 @@
},
"stt": {
"provider": "faster-whisper",
- "model": "whisper-large-v3",
+ "model": "large-v3",
"bias_prompt": "Jarvis, OpenClaw, Codex, Gemini, Grok, Claude, Anthropic, OpenAI, OpenRouter, Whisper, Subagent, Sub-Agent, Mission-Manager, Critic-Loop, Critic, Worker, Router-Brain, Router, Kontrollierer, Voice-Pipeline, Wake-Word, Silero, VAD, TTS, STT, Telemetry, Transkript, Token, Provider, Plugin, Sprechblase, Orb, Mascot, Quip, Browser, Terminal, Repository, Branch, Commit, Push, Pull-Request, Issue, Merge, Refactor, Deployment, Screenshot, Debuggen, Workflow, Microservice, Container, Docker, Kubernetes, FastAPI, React, TypeScript, Python, JSON, Markdown, Logfile, Konfiguration, Endpoint, Webhook, API-Key, Service-Account, Cloud, Google Cloud, Vertex AI, BigQuery, GitHub, Twilio, ElevenLabs, OAuth, Credential Manager, Frontend, Backend, Skript, Daemon, Hangup, Auflegen, Denkpause, submitted, distanziert, erkennt",
"language": "auto",
"models": {
@@ -113,20 +113,20 @@
"provider": "vertex"
},
"brain.computer_use": {
- "provider": "gemini"
+ "provider": "grok"
},
"brain.providers.grok-realtime": {
"voice": "lux"
},
"brain.providers.ollama": {
- "tool_model": "qwen3.5:4b",
- "cu_model": "qwen3.5:4b",
- "model": "",
- "deep_model": "qwen3.8-16gb:latest"
+ "tool_model": "gemma4:12b-it-qat",
+ "cu_model": "gemma4:12b-it-qat",
+ "model": "deepseek-r1:14b",
+ "deep_model": "deepseek-r1:14b"
},
"brain.providers.grok": {
- "tool_model": "grok-4.5",
- "cu_model": "grok-4.5"
+ "tool_model": "grok-4.6",
+ "cu_model": "grok-4.6"
},
"brain.providers.local-realtime": {
"voice": "auto",
@@ -137,6 +137,7 @@
"model": "gemma-4-12b-it-qat-q4_0"
},
"brain.providers.vertex": {
- "tool_model": "gemini-3.7-flash"
+ "tool_model": "gemini-3.7-flash",
+ "cu_model": "gemini-3.7-flash"
}
}
diff --git a/tests/contract/test_internal_messages.py b/tests/contract/test_internal_messages.py
index bb939b2e75..c080c3482a 100644
--- a/tests/contract/test_internal_messages.py
+++ b/tests/contract/test_internal_messages.py
@@ -254,3 +254,16 @@ async def test_explicit_sender_deny_and_paused_recipient_are_not_bypassed(world)
{"target": "Scout", "text": "hello"}, CTX
)
assert not paused.success and paused.output["reason"] == "target_paused"
+
+
+async def test_reply_to_lead_is_visible_in_the_front_page_chat(world):
+ rt, svc, _ = world
+ session = svc.store.create_session(
+ provider="openai", model="test-model", effort="", cwd="", surface="jarvis"
+ )
+ env = await rt.say(from_agent="scout", to_agent=rt.lead_id, text="Here is the answer")
+ await drain(rt)
+ receipt = svc.store.incoming_message(session.session_id, env.event_id)
+ assert receipt["sender_id"] == "scout" and receipt["status"] == "delivered"
+ assert svc.store.get_session("society:jarvis") is None
+ assert not svc.is_running(session.session_id)
diff --git a/tests/unit/realtime/test_internal_message_regression.py b/tests/unit/realtime/test_internal_message_regression.py
index c5b686ecc8..7fa0e808e5 100644
--- a/tests/unit/realtime/test_internal_message_regression.py
+++ b/tests/unit/realtime/test_internal_message_regression.py
@@ -17,7 +17,8 @@ from tests.unit.realtime.test_tools import FakeExecutor, FakeTool, _bridge
@pytest.mark.parametrize(
"text",
[
- "Ja, kannst du bitte den Gmail Agenten eine Nachricht schreiben? Eine Testnachricht.", # i18n-allow: German input regression
+ "Ja, kannst du bitte den Gmail Agenten eine Nachricht schreiben? " # i18n-allow
+ "Eine Testnachricht.", # i18n-allow # i18n-allow: German input regression
"Send the Gmail agent a test message.",
"Escribe un mensaje al Gmail agente.",
],
@@ -46,7 +47,9 @@ async def test_original_request_cannot_start_gmail_approval(monkeypatch):
bridge = RealtimeToolBridge(
tools={"gmail": FakeTool("gmail")}, executor=executor, language="de"
)
- await bridge.handle_user_transcript("Kannst du dem Gmail Agenten eine Testnachricht schreiben?") # i18n-allow: German input regression
+ await bridge.handle_user_transcript(
+ "Kannst du dem Gmail Agenten eine Testnachricht schreiben?" # i18n-allow
+ ) # i18n-allow: German input regression
_, result = await bridge.execute(wire_name="gmail", arguments={"app_name": "mail"})
assert result["blocked"] and "message_agent" in result["error"]
assert executor.execute_calls == []
@@ -86,7 +89,7 @@ async def test_new_request_after_confirmation_can_ask_again():
("de", "Ja, sende sie."),
("en", "Yes, send it."),
("es", "Sí, envíalo."),
- ("de", "Nein, nicht senden."), # i18n-allow: German cancellation input
+ ("de", "Nein, nicht senden."), # i18n-allow # i18n-allow: German cancellation input
],
)
def test_acoustically_grounded_answer_is_not_discarded_as_text_echo(language, text):
diff --git a/tests/unit/society/test_chat_binding.py b/tests/unit/society/test_chat_binding.py
index 049caea47c..e93adb6a49 100644
--- a/tests/unit/society/test_chat_binding.py
+++ b/tests/unit/society/test_chat_binding.py
@@ -122,7 +122,9 @@ async def test_deliver_hook_frames_and_sends(world):
assert svc.sent == [
(
"society:scout",
- "[query from Archivist]\nWhere is the VPS note?\nRefs: wiki:society/archivist/vps.md",
+ "[query from Archivist]\nWhere is the VPS note?\nRefs: wiki:society/archivist/vps.md\n"
+ "Reply to the sender using society_message_agent with kind 'answer'. "
+ "This is internal communication; do not use an external messaging connector.",
)
]
svc.busy.add("society:scout")
diff --git a/tests/unit/society/test_checkpoints.py b/tests/unit/society/test_checkpoints.py
index 9e58d4b6e1..9ff9b53272 100644
--- a/tests/unit/society/test_checkpoints.py
+++ b/tests/unit/society/test_checkpoints.py
@@ -215,6 +215,13 @@ async def _settle() -> None:
await asyncio.sleep(0.01)
+async def _wait_for_checkpoint(rt: SocietyRuntime, expected: Checkpoint, pushed: list) -> None:
+ # Wait for the persisted observation, not six assumed SQLite scheduling slots.
+ async with asyncio.timeout(2):
+ while not pushed or pushed[-1].checkpoint != str(expected):
+ await asyncio.sleep(0.01)
+
+
async def test_a_typed_turn_walks_to_the_docks_and_back(rt: SocietyRuntime):
"""A message typed into the card never passes the scheduler — the turn watcher
still sends the figure to the shop of the tools it uses."""
@@ -225,17 +232,18 @@ async def test_a_typed_turn_walks_to_the_docks_and_back(rt: SocietyRuntime):
session = "society:scout"
svc.running.add(session)
rt.checkpoints.note_turn_started("scout", session)
- await _settle()
+ await _wait_for_checkpoint(rt, Checkpoint.DESK, pushed)
assert (await rt.roster.get("scout")).checkpoint is Checkpoint.DESK
assert rt.checkpoints.is_busy("scout")
svc.emit(session, "tool_call", name="google_drive", input={})
- await _settle()
+ await _wait_for_checkpoint(rt, Checkpoint.HUB_PLUGINS, pushed)
assert (await rt.roster.get("scout")).checkpoint is Checkpoint.HUB_PLUGINS
# A second watcher for the same agent is not started while one runs.
rt.checkpoints.note_turn_started("scout", session)
assert len(svc.queues[session]) == 1
svc.running.discard(session)
svc.emit(session, "turn_finished", status="ok")
+ await _wait_for_checkpoint(rt, Checkpoint.IDLE, pushed)
await _settle()
assert (await rt.roster.get("scout")).checkpoint is Checkpoint.IDLE
assert svc.queues[session] == []
diff --git a/tests/unit/society/test_world_feed.py b/tests/unit/society/test_world_feed.py
index 575be4095d..a5890fd63a 100644
--- a/tests/unit/society/test_world_feed.py
+++ b/tests/unit/society/test_world_feed.py
@@ -69,7 +69,7 @@ def test_preview_takes_one_very_long_word_whole_rather_than_only_an_ellipsis():
async def test_a_message_between_two_agents_reaches_the_island_once(rt):
runtime, pushed = rt
- await runtime.say(from_agent="scout", to_agent="archivist", text="Found the manifest.")
+ env = await runtime.say(from_agent="scout", to_agent="archivist", text="Found the manifest.")
sent = _messages(pushed)
assert len(sent) == 1
@@ -77,7 +77,7 @@ async def test_a_message_between_two_agents_reaches_the_island_once(rt):
assert event.from_agent == "scout"
assert event.to_agent == "archivist"
assert event.msg_type == "SAY"
- assert event.society_trace == "chat:scout:archivist"
+ assert event.society_trace == env.trace_id
assert event.text == "Found the manifest."
assert event.truncated is False
assert event.seq > 0
@@ -166,7 +166,7 @@ async def test_a_failing_publisher_never_breaks_the_append(tmp_path: Path):
await runtime.roster.create(name="Archivist")
env = await runtime.say(from_agent="scout", to_agent="archivist", text="still lands")
assert env.seq is not None
- assert len(await runtime.store.events_for_trace("chat:scout:archivist")) == 1
+ assert len(await runtime.store.events_for_trace(env.trace_id)) == 1
finally:
await runtime.close()
@@ -184,11 +184,11 @@ async def test_detach_stops_the_feed(rt):
async def test_the_event_survives_the_websocket_sanitizer(rt):
runtime, pushed = rt
room = await runtime.rooms.open(opened_by="jarvis", members=["scout", "archivist"])
- await runtime.say(from_agent="scout", to_agent="archivist", text="hello")
+ env = await runtime.say(from_agent="scout", to_agent="archivist", text="hello")
message = event_to_ws_envelope(_messages(pushed)[0])
assert message["event_name"] == "SocietyMessageSent"
- assert message["payload"]["society_trace"] == "chat:scout:archivist"
+ assert message["payload"]["society_trace"] == env.trace_id
# The base UUID owns `trace_id`; ours must not have been shadowed away.
assert "trace_id" not in message["payload"]
diff --git a/tests/unit/ui/web/test_sessions_routes.py b/tests/unit/ui/web/test_sessions_routes.py
index 376fa1e603..0e3f08539e 100644
--- a/tests/unit/ui/web/test_sessions_routes.py
+++ b/tests/unit/ui/web/test_sessions_routes.py
@@ -75,6 +75,7 @@ def test_save_session_to_downloads_uses_events_for_plain_export(tmp_path, monkey
saved = tmp_path / "Downloads" / res.json()["filename"]
content = saved.read_text(encoding="utf-8")
assert "Modus: Pipeline" in content.splitlines()[0]
+ assert "Ended by: hotkey" in content
assert "Jarvis: Preamble first." in content
assert content.index("Jarvis: Preamble first.") < content.index(
"Jarvis: Final answer."
@@ -101,6 +102,7 @@ def test_copy_exports_include_the_effective_voice_mode(tmp_path) -> None:
assert "- **Modus:** Pipeline" in markdown.text
assert plain.status_code == 200
assert "Modus: Pipeline" in plain.text.splitlines()[0]
+ assert "Ended by: hotkey" in plain.text
assert json_export.status_code == 200
assert json_export.json()["session"]["voice_mode"] == "pipeline"
finally: