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(automations): the first run died on a missing keyword; template names no longer read as the assistant's name

rubenluetke10-beep75b3178e3f3b
diff --git a/jarvis/brain/manager.py b/jarvis/brain/manager.py
index 9de65f8416..0ce93f2988 100644
--- a/jarvis/brain/manager.py
+++ b/jarvis/brain/manager.py
@@ -3438,6 +3438,7 @@ class BrainManager:
deadline_s: float | None = None,
reasoning_effort: Literal["none"] | None = None,
delegated_voice: bool = False,
+ tool_context: dict[str, Any] | None = None,
) -> BrainDispatcher:
"""Builds the dispatcher with an optional tool override.
@@ -3455,6 +3456,11 @@ class BrainManager:
thinking-by-default model never burns seconds of internal reasoning
per tool-loop round — see ``_DELEGATE_REASONING_EFFORT``.
+ ``tool_context`` (2026-08-24): extra keys merged into every tool's
+ ``ExecutionContext.config`` for this dispatcher's turns — scheduled
+ task turns pass ``{"delivery": "written"}`` so search results stop
+ asking for a spoken two-liner. ``None`` = no extra keys.
+
``delegated_voice`` (2026-07-17): appends the static speed contract
(``_DELEGATE_VOICE_DIRECTIVE``) — batch lookups, no repeats, answer
as soon as evidence suffices — to the system prompt of delegated
@@ -3481,6 +3487,7 @@ class BrainManager:
max_tokens=self._config.brain.max_tokens,
deadline_s=deadline_s,
reasoning_effort=reasoning_effort,
+ tool_context=tool_context,
**kwargs,
)
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.json
index 1e7125e13c..5c02957699 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json
@@ -889,9 +889,9 @@
"show_installed": "Deine Automatisierung anzeigen",
"needs": "Braucht {tools}",
"needs_warning": "Diese Automatisierung braucht {tools} — das ist nicht verbunden. Du kannst sie trotzdem hinzufügen; sie läuft, sobald das Plugin verbunden ist.",
- "add_dialog_title": "Hinzufügen: {name}",
+ "add_dialog_title": "Hinzufügen: {title}",
"add_error": "Automatisierung konnte nicht hinzugefügt werden.",
- "added_notice": "„{name}“ hinzugefügt.",
+ "added_notice": "„{title}“ hinzugefügt.",
"required": "Pflichtfeld",
"kind": {
"hourly": "Stündlich",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.json
index 09c661effa..38291cb479 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json
@@ -889,9 +889,9 @@
"show_installed": "Show your automation",
"needs": "Needs {tools}",
"needs_warning": "This automation needs {tools}, which is not connected. You can add it anyway — it will run once the plugin is connected.",
- "add_dialog_title": "Add: {name}",
+ "add_dialog_title": "Add: {title}",
"add_error": "Could not add the automation.",
- "added_notice": "\"{name}\" added.",
+ "added_notice": "\"{title}\" added.",
"required": "Required",
"kind": {
"hourly": "Hourly",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.json
index abebd38ddb..0cf6aa0d1b 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json
@@ -887,9 +887,9 @@
"show_installed": "Mostrar tu automatización",
"needs": "Necesita {tools}",
"needs_warning": "Esta automatización necesita {tools}, que no está conectado. Puedes añadirla igualmente; se ejecutará cuando el plugin esté conectado.",
- "add_dialog_title": "Añadir: {name}",
+ "add_dialog_title": "Añadir: {title}",
"add_error": "No se pudo añadir la automatización.",
- "added_notice": "«{name}» añadida.",
+ "added_notice": "«{title}» añadida.",
"required": "Obligatorio",
"kind": {
"hourly": "Cada hora",
diff --git a/jarvis/ui/web/frontend/src/views/AutomationsView.test.tsx b/jarvis/ui/web/frontend/src/views/AutomationsView.test.tsx
index d58ea5a3ef..8a5e03b1a9 100644
--- a/jarvis/ui/web/frontend/src/views/AutomationsView.test.tsx
+++ b/jarvis/ui/web/frontend/src/views/AutomationsView.test.tsx
@@ -7,7 +7,7 @@ import { afterEach, describe, expect, it, vi } from "vitest";
// (the humanized tool list, the added-notice name) is exercised.
const TEMPLATED: Record<string, string> = {
"automations_view.needs": "Needs {tools}",
- "automations_view.added_notice": '"{name}" added.',
+ "automations_view.added_notice": '"{title}" added.',
};
vi.mock("@/i18n", () => ({
diff --git a/jarvis/ui/web/frontend/src/views/AutomationsView.tsx b/jarvis/ui/web/frontend/src/views/AutomationsView.tsx
index 6ac03b87e9..3991e14790 100644
--- a/jarvis/ui/web/frontend/src/views/AutomationsView.tsx
+++ b/jarvis/ui/web/frontend/src/views/AutomationsView.tsx
@@ -144,7 +144,7 @@ export function AutomationsView() {
const handleAdded = useCallback(
(taskId: string, template: AutomationTemplate) => {
setAdding(null);
- showNotice(fill(t("automations_view.added_notice"), { name: template.name }));
+ showNotice(fill(t("automations_view.added_notice"), { title: template.name }));
// The list refetches on invalidation; scroll once it has rendered.
setTimeout(() => scrollToTask(taskId), 400);
},
diff --git a/jarvis/ui/web/frontend/src/views/automations/TemplateAddDialog.tsx b/jarvis/ui/web/frontend/src/views/automations/TemplateAddDialog.tsx
index 76783587d2..06e15bcf1b 100644
--- a/jarvis/ui/web/frontend/src/views/automations/TemplateAddDialog.tsx
+++ b/jarvis/ui/web/frontend/src/views/automations/TemplateAddDialog.tsx
@@ -87,7 +87,7 @@ export function TemplateAddDialog({ template, onClose, onAdded }: TemplateAddDia
>
<div
role="dialog"
- aria-label={fill(t("automations_view.add_dialog_title"), { name: template.name })}
+ aria-label={fill(t("automations_view.add_dialog_title"), { title: template.name })}
className="flex max-h-[90vh] w-full max-w-lg flex-col overflow-hidden rounded-2xl border border-border bg-card shadow-2xl"
onClick={(e) => e.stopPropagation()}
>
@@ -98,7 +98,7 @@ export function TemplateAddDialog({ template, onClose, onAdded }: TemplateAddDia
</div>
<div className="min-w-0">
<h2 className="truncate text-sm font-semibold">
- {fill(t("automations_view.add_dialog_title"), { name: template.name })}
+ {fill(t("automations_view.add_dialog_title"), { title: template.name })}
</h2>
<p className="truncate text-[11px] text-muted-foreground">{template.description}</p>
</div>
diff --git a/tests/unit/brain/test_run_task_fallback.py b/tests/unit/brain/test_run_task_fallback.py
index c54f65f7db..c39b284253 100644
--- a/tests/unit/brain/test_run_task_fallback.py
+++ b/tests/unit/brain/test_run_task_fallback.py
@@ -184,3 +184,18 @@ def test_unknown_task_only_grant_is_skipped(monkeypatch: pytest.MonkeyPatch) ->
def test_spawn_tools_never_task_only() -> None:
assert not any("spawn" in name for name in manager_mod._TASK_ONLY_TOOLS)
+
+
+def test_build_dispatcher_accepts_tool_context() -> None:
+ """Regression guard (live 2026-08-24): ``run_task`` passes
+ ``tool_context`` to the REAL ``_build_dispatcher``; the fallback tests
+ above monkeypatch that method, so only a signature check catches a
+ missing keyword — the first automation ever run died on exactly that
+ TypeError."""
+ import inspect
+
+ from jarvis.brain.manager import BrainManager
+
+ params = inspect.signature(BrainManager._build_dispatcher).parameters
+ assert "tool_context" in params
+ assert params["tool_context"].kind is inspect.Parameter.KEYWORD_ONLY