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: grant Jarvis-Agents brokered Wiki access
Ruben Lütke050a81b0b131
diff --git a/docs/adr/0011-router-pure-dispatcher.md b/docs/adr/0011-router-pure-dispatcher.mdindex 3e3b0adf2e..699b114f5b 100644--- a/docs/adr/0011-router-pure-dispatcher.md+++ b/docs/adr/0011-router-pure-dispatcher.md@@ -967,8 +967,11 @@ instead of a probe-and-guess loop. Complementarily, `wiki-page-read`prepends a deterministic provenance warning when serving a `type: meta`page.-The router remains a pure dispatcher: the tool is a direct safe-gated-read, never a spawn, and never enters a worker tool set (AP-5/AP-14).+The router remains a pure dispatcher: the tool is a direct safe-gated read,+never a spawn. Jarvis-Agents may access it only through ADR-0025's+mission-scoped supervisor broker; the live object and vault path remain in the+supervisor, and it never enters a legacy worker tier or direct worker tool set+(AP-5/AP-14).### Regression guardsdiff --git a/docs/adr/0025-mission-scoped-worker-tool-broker.md b/docs/adr/0025-mission-scoped-worker-tool-broker.mdindex 9493e64d6f..805a038df2 100644--- a/docs/adr/0025-mission-scoped-worker-tool-broker.md+++ b/docs/adr/0025-mission-scoped-worker-tool-broker.md@@ -36,8 +36,9 @@ mission receives a short-lived authenticated grant containing onlytask-relevant MCP tools, connected native connector tools, and the restrictedapp commands carrying an explicit `worker_allowed` Command Registry marker.The initial action surface covers operational reads, provider health tests,-mission/task inspection, and guarded wiki ingest through the same REST-backed-tools used by voice and chat. CLI workers reach the grant+mission/task inspection, and the complete guarded Wiki workflow: deterministic+listing, recall search, vault-confined page reads, and curator-backed ingest.+CLI workers reach the grantthrough a stdio MCP companion connected to a loopback-only HTTP endpoint; APIworkers call the same binding directly.@@ -58,8 +59,11 @@ existing worker-error mission path. A worker model therefore cannot ignore atool error and claim successful completion.The grant fails closed. Recursive mission tools, skill execution, credential-surfaces, secret-reading names, dangerous commands, and config mutation are-never exported. Both inventory construction and broker issuance validate the+surfaces, secret-reading names, dangerous commands, config mutation, live+desktop/Computer-Use tools, host-shell tools, and Jarvis control-CLI adapters+are never exported. Workers retain their own sandboxed worktree tools, but may+control the running Jarvis only through the explicit broker grant. Both+inventory construction and broker issuance validate thelive Command Registry marker, so a forged inventory cannot promote a deniedcommand. Amissing supervisor reference, empty relevant tool set, expired token, ordiff --git a/jarvis/brain/factory.py b/jarvis/brain/factory.pyindex 54833f330b..3550256fa2 100644--- a/jarvis/brain/factory.py+++ b/jarvis/brain/factory.py@@ -110,8 +110,9 @@ ROUTER_TOOLS = frozenset({# Grounded vault listing (2026-07-14): deterministic ground-truth answer# for "what is in my wiki" in ONE round. Without it the brain probed# blindly (index.md/SOUL.md → not found, ~14 rounds, 66 s) and recited- # schema.md's example layout as actual content. Read-only, safe — never- # in a worker set (AP-5/AP-14). See ADR-0011 amendment "wiki-list tool".+ # schema.md's example layout as actual content. Read-only and safe;+ # Jarvis-Agents may call it only through the ADR-0025 supervisor broker,+ # never through a legacy worker tier (AP-5/AP-14). See ADR-0011."wiki-list",# Phase B5 follow-up: deterministic ingest path. Lets the brain# explicitly store a fact ("merk dir: …") rather than relying on thediff --git a/jarvis/missions/init.py b/jarvis/missions/init.pyindex d87c909683..e2d3fbd8ce 100644--- a/jarvis/missions/init.py+++ b/jarvis/missions/init.py@@ -54,6 +54,7 @@ from .workers.api_agent_worker import ApiAgentWorkerfrom .workers.capabilities import (WorkerCapabilityInventory,restricted_worker_app_commands,+ restricted_worker_knowledge_tools,)from .workers.claude_direct_worker import ClaudeDirectWorkerfrom .workers.codex_direct_worker import CodexDirectWorker@@ -316,7 +317,10 @@ def _assemble_worker_capability_inventory(task_text: str) -> WorkerCapabilityInvreturn WorkerCapabilityInventory.build(mcp_servers=_assemble_worker_mcp_servers(task_text=task_text),app_commands=restricted_worker_app_commands(),- native_tool_names=_connected_native_worker_tools(task_text),+ native_tool_names=(+ *restricted_worker_knowledge_tools(),+ *_connected_native_worker_tools(task_text),+ ),task_text=task_text,)diff --git a/jarvis/missions/kontrollierer/worker_prompt.py b/jarvis/missions/kontrollierer/worker_prompt.pyindex e55336ac4f..b971889adf 100644--- a/jarvis/missions/kontrollierer/worker_prompt.py+++ b/jarvis/missions/kontrollierer/worker_prompt.py@@ -73,6 +73,17 @@ OUTPUT_SHAPE_DIRECTIVE: Final[str] = ()+SUPERVISOR_BOUNDARY_DIRECTIVE: Final[str] = (+ "SUPERVISOR BOUNDARY - USE ONLY EXPLICITLY GRANTED JARVIS TOOLS. You may "+ "use the worker's own sandboxed shell and file tools inside the assigned "+ "worktree. Never invoke jarvis, jarvisctl, or jctl to control the running "+ "app; never operate the live desktop or Computer Use; never read control "+ "credentials; and never change live configuration. For Wiki work, use only "+ "the supervisor-granted wiki-list, wiki-recall, wiki-page-read, and "+ "wiki-ingest tools."+)++def compose_worker_prompt(prior_block: str, step_prompt: str) -> str:"""Build the full worker prompt: framing directives first.@@ -83,7 +94,10 @@ def compose_worker_prompt(prior_block: str, step_prompt: str) -> str:``step_prompt`` is the task instruction for this step (verbatim userutterance or a decomposed sub-task)."""- head = f"{ARTIFACT_LANGUAGE_DIRECTIVE}\n\n{OUTPUT_SHAPE_DIRECTIVE}"+ head = (+ f"{ARTIFACT_LANGUAGE_DIRECTIVE}\n\n{OUTPUT_SHAPE_DIRECTIVE}\n\n"+ f"{SUPERVISOR_BOUNDARY_DIRECTIVE}"+ )if prior_block and prior_block.strip():return f"{head}\n\n{prior_block}\n\n{step_prompt}"return f"{head}\n\n{step_prompt}"@@ -92,5 +106,6 @@ def compose_worker_prompt(prior_block: str, step_prompt: str) -> str:__all__ = ["ARTIFACT_LANGUAGE_DIRECTIVE","OUTPUT_SHAPE_DIRECTIVE",+ "SUPERVISOR_BOUNDARY_DIRECTIVE","compose_worker_prompt",]diff --git a/jarvis/missions/workers/capabilities.py b/jarvis/missions/workers/capabilities.pyindex e4ed6cc57f..792435b57b 100644--- a/jarvis/missions/workers/capabilities.py+++ b/jarvis/missions/workers/capabilities.py@@ -14,6 +14,12 @@ from __future__ import annotationsfrom dataclasses import dataclass, fieldfrom typing import Any+RESTRICTED_WORKER_KNOWLEDGE_TOOLS: tuple[str, ...] = (+ "wiki-list",+ "wiki-recall",+ "wiki-page-read",+)+_FORBIDDEN_RECURSIVE_NAMES = frozenset({"dispatch-with-review",@@ -189,6 +195,11 @@ def restricted_worker_app_commands() -> tuple[str, ...]:return ()+def restricted_worker_knowledge_tools() -> tuple[str, ...]:+ """Return the read-only native Wiki surface granted to Jarvis-Agents."""+ return RESTRICTED_WORKER_KNOWLEDGE_TOOLS++def worker_app_command_allowed(command_id: str) -> bool:"""Fail closed unless a live registry command explicitly allows workers."""try:@@ -211,7 +222,9 @@ RESTRICTED_WORKER_APP_COMMANDS: tuple[str, ...] = restricted_worker_app_commands__all__ = ["RESTRICTED_WORKER_APP_COMMANDS",+ "RESTRICTED_WORKER_KNOWLEDGE_TOOLS","WorkerCapabilityInventory","restricted_worker_app_commands",+ "restricted_worker_knowledge_tools","worker_app_command_allowed",]diff --git a/jarvis/missions/workers/worker_tool_broker.py b/jarvis/missions/workers/worker_tool_broker.pyindex c71d3f4b5e..c08a34c205 100644--- a/jarvis/missions/workers/worker_tool_broker.py+++ b/jarvis/missions/workers/worker_tool_broker.py@@ -42,14 +42,47 @@ _MAX_REQUEST_BYTES = 1024 * 1024_FORBIDDEN_EXACT = frozenset({+ "app-command",+ "app_command",+ "cli-jarvis",+ "cli-jarvisctl",+ "cli-jctl",+ "computer-use",+ "computer_use",+ "click",+ "click-element",+ "click_element","dispatch-with-review","dispatch_with_review",+ "drag",+ "hotkey",+ "jarvisctl",+ "jctl",+ "manage-mcp-server",+ "manage_mcp_server",+ "move-mouse",+ "move_mouse","multi-spawn","multi_spawn",+ "navigate",+ "open-app",+ "open_app",+ "run-shell",+ "run_shell","run-skill","run_skill",+ "screen-snapshot",+ "screen_snapshot",+ "screenshot",+ "scroll","spawn-worker","spawn_worker",+ "switch-provider",+ "switch-window",+ "switch_provider",+ "switch_window",+ "type-text",+ "type_text",})_FORBIDDEN_NAME_FRAGMENTS = (diff --git a/jarvis/plugins/tool/wiki_list.py b/jarvis/plugins/tool/wiki_list.pyindex 8140dd16c2..81025616b0 100644--- a/jarvis/plugins/tool/wiki_list.py+++ b/jarvis/plugins/tool/wiki_list.py@@ -15,8 +15,9 @@ heading — so the model neither probes nor guesses.Placement rule---------------Router-tier only, read-only, risk ``safe``. Never in any worker tool set-(AP-5/AP-14).+Router-visible, read-only, risk ``safe``. Jarvis-Agents may reach the live tool+only through ADR-0025's mission-scoped supervisor broker; it never enters a+legacy worker tier or direct worker tool set (AP-5/AP-14).Privacy rule (matches ``wiki-recall`` / ``wiki-page-read``):Only paths, sizes, and first headings are returned/logged — neverdiff --git a/jarvis/plugins/tool/wiki_page_read.py b/jarvis/plugins/tool/wiki_page_read.pyindex ed9bfa6530..9e5310d41e 100644--- a/jarvis/plugins/tool/wiki_page_read.py+++ b/jarvis/plugins/tool/wiki_page_read.py@@ -12,10 +12,10 @@ markdown content, not a snippet. This tool fills that gap.Placement rule---------------Router-tier only. Never include in any ``SUB_TOOLS`` frozenset — that-constraint is enforced structurally by Welle 4 (only ``"router"`` exists-as a tier) and re-stated here so future maintainers do not re-introduce-a second tier without re-evaluating this placement.+Router-visible. Jarvis-Agents may reach the live tool only through ADR-0025's+mission-scoped supervisor broker. Never include it in any ``SUB_TOOLS``+frozenset or direct worker tool set; the live vault object stays in the+supervisor.Path-traversal safety---------------------diff --git a/jarvis/plugins/tool/wiki_recall.py b/jarvis/plugins/tool/wiki_recall.pyindex 5250ca0ac9..1fb4ac4879 100644--- a/jarvis/plugins/tool/wiki_recall.py+++ b/jarvis/plugins/tool/wiki_recall.py@@ -14,9 +14,9 @@ Usage pattern:prompt.Placement rule:- This tool is in ``ROUTER_TOOLS`` only. It must **never** appear in- any ``SUB_TOOLS`` frozenset (AP-D9 recursion-protection; the router- tier is the correct consumer).+ This tool is router-visible. Jarvis-Agents may reach the live tool only+ through ADR-0025's mission-scoped supervisor broker. It must **never**+ appear in any ``SUB_TOOLS`` frozenset or direct worker tool set (AP-D9).Privacy rule (AP-7 / §5 overview):Query text is logged only at DEBUG level. Hit count summary isdiff --git a/tests/missions/kontrollierer/test_worker_prompt.py b/tests/missions/kontrollierer/test_worker_prompt.pyindex aaebb94c19..9109f78eff 100644--- a/tests/missions/kontrollierer/test_worker_prompt.py+++ b/tests/missions/kontrollierer/test_worker_prompt.py@@ -16,6 +16,7 @@ from __future__ import annotationsfrom jarvis.missions.kontrollierer.worker_prompt import (ARTIFACT_LANGUAGE_DIRECTIVE,OUTPUT_SHAPE_DIRECTIVE,+ SUPERVISOR_BOUNDARY_DIRECTIVE,compose_worker_prompt,)@@ -95,6 +96,21 @@ def test_compose_includes_output_shape_directive() -> None:assert OUTPUT_SHAPE_DIRECTIVE in out+def test_supervisor_boundary_excludes_live_control_surfaces() -> None:+ text = SUPERVISOR_BOUNDARY_DIRECTIVE.lower()+ assert "jarvisctl" in text+ assert "computer use" in text+ assert "live configuration" in text+ assert "wiki-list" in text+ assert "wiki-ingest" in text+++def test_compose_places_supervisor_boundary_before_the_step() -> None:+ step = "Research this topic and update the Wiki."+ out = compose_worker_prompt("", step)+ assert out.index(SUPERVISOR_BOUNDARY_DIRECTIVE) < out.index(step)++def test_compose_orders_both_directives_before_the_step() -> None:step = "Make me a single, self-contained HTML file."out = compose_worker_prompt("", step)diff --git a/tests/missions/test_worker_capability_parity.py b/tests/missions/test_worker_capability_parity.pyindex 6da6f2fdd6..3612e749d5 100644--- a/tests/missions/test_worker_capability_parity.py+++ b/tests/missions/test_worker_capability_parity.py@@ -11,6 +11,7 @@ from jarvis.missions.workers.api_agent_worker import ApiAgentWorkerfrom jarvis.missions.workers.capabilities import (WorkerCapabilityInventory,restricted_worker_app_commands,+ restricted_worker_knowledge_tools,)from jarvis.missions.workers.claude_direct_worker import ClaudeDirectWorkerfrom jarvis.missions.workers.codex_direct_worker import (@@ -102,6 +103,43 @@ def test_config_command_is_rejected_from_worker_inventory() -> None:WorkerCapabilityInventory.build(app_commands=("brain-switch",))+def test_worker_knowledge_surface_is_wiki_only() -> None:+ tools = set(restricted_worker_knowledge_tools())++ assert tools == {"wiki-list", "wiki-recall", "wiki-page-read"}+ assert "computer_use" not in tools+ assert "run_shell" not in tools+ assert not any(name.startswith("cli_") for name in tools)+++def test_mission_inventory_combines_wiki_reads_with_relevant_connectors(+ monkeypatch: pytest.MonkeyPatch,+) -> None:+ from jarvis.missions import init as missions_init++ monkeypatch.setattr(+ missions_init,+ "_assemble_worker_mcp_servers",+ lambda **_kwargs: {},+ )+ monkeypatch.setattr(+ missions_init,+ "_connected_native_worker_tools",+ lambda _task_text: ("gmail",),+ )++ inventory = missions_init._assemble_worker_capability_inventory(+ "Review the Wiki and my relevant email."+ )++ assert set(inventory.native_tool_names) == {+ "wiki-list",+ "wiki-recall",+ "wiki-page-read",+ "gmail",+ }++def test_codex_worker_ignores_machine_global_config(tmp_path: Path) -> None:cmd = _build_codex_direct_cmd(worktree=tmp_path / "worktree", model=None)assert "--ignore-user-config" in cmddiff --git a/tests/missions/test_worker_tool_broker.py b/tests/missions/test_worker_tool_broker.pyindex c853571df3..0fc453d643 100644--- a/tests/missions/test_worker_tool_broker.py+++ b/tests/missions/test_worker_tool_broker.py@@ -29,6 +29,7 @@ from jarvis.missions.workers.worker_tool_broker import (BROKER_EXECUTION_TIMEOUT_S,BROKER_TOKEN_ENV,BROKER_URL_ENV,+ worker_tool_name_allowed,)from jarvis.safety import ApprovalWorkflow, RiskTierEvaluator, ToolExecutor@@ -94,6 +95,9 @@ def _wire_manager(executor: _Executor) -> None:"github/list_issues": _Tool("github/list_issues"),"github/read_secret": _Tool("github/read_secret"),"wiki-ingest": _Tool("wiki-ingest"),+ "wiki-list": _Tool("wiki-list", risk_tier="safe"),+ "wiki-recall": _Tool("wiki-recall", risk_tier="safe"),+ "wiki-page-read": _Tool("wiki-page-read", risk_tier="safe"),"brain-switch": _Tool("brain-switch"),"gmail": _Tool("gmail", risk_tier="ask"),"spawn-worker": _Tool("spawn-worker"),@@ -114,7 +118,12 @@ def _inventory() -> WorkerCapabilityInventory:}},app_commands=("wiki-ingest",),- native_tool_names=("gmail",),+ native_tool_names=(+ "wiki-list",+ "wiki-recall",+ "wiki-page-read",+ "gmail",+ ),task_text="List the open GitHub issues and read my Gmail inbox.",)@@ -131,7 +140,14 @@ async def test_binding_is_filtered_and_executes_only_through_supervisor() -> Non)assert binding is not None- assert set(binding.tool_names) == {"github/list_issues", "wiki-ingest", "gmail"}+ assert set(binding.tool_names) == {+ "github/list_issues",+ "wiki-ingest",+ "wiki-list",+ "wiki-recall",+ "wiki-page-read",+ "gmail",+ }result = await binding.execute("github/list_issues", {"value": "open"})assert result["success"] is Trueassert binding.execution_summary.clean is True@@ -145,6 +161,30 @@ async def test_binding_is_filtered_and_executes_only_through_supervisor() -> Nonassert len(executor.calls) == 1+ "name",+ (+ "computer_use",+ "open_app",+ "type_text",+ "run_shell",+ "jarvisctl",+ "cli_jarvis",+ "github/click",+ ),+)+def test_live_control_tools_are_forbidden_to_workers(name: str) -> None:+ assert worker_tool_name_allowed(name) is False+++ "name",+ ("wiki-list", "wiki-recall", "wiki-page-read", "wiki-ingest"),+)+def test_wiki_tools_are_allowed_to_workers(name: str) -> None:+ assert worker_tool_name_allowed(name) is True++@pytest.mark.asyncioasync def test_broker_rejects_forged_config_command_grant() -> None:executor = _Executor()diff --git a/tests/unit/plugins/tool/test_wiki_list.py b/tests/unit/plugins/tool/test_wiki_list.pyindex 8cf5718cf3..8351fa8883 100644--- a/tests/unit/plugins/tool/test_wiki_list.py+++ b/tests/unit/plugins/tool/test_wiki_list.py@@ -9,7 +9,8 @@ content — pure hallucination. A deterministic listing answers thequestion in ONE round and is ground truth by construction.Hard-negatives:- 1. ``wiki-list`` MUST be in ROUTER_TOOLS (and never in any worker set).+ 1. ``wiki-list`` MUST be in ROUTER_TOOLS; workers may reach it only through+ the mission-scoped supervisor broker.2. The listing MUST reflect the real filesystem — files that exist arepresent, files that do not exist are absent.3. Meta/contract pages (``type: meta`` frontmatter) MUST be flagged so