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(artifacts): name the two quiet handlers and the background-marker typing

rubenluetke10-beep008ffc2f8dfc
diff --git a/jarvis/artifacts/locate.py b/jarvis/artifacts/locate.py
index d36b9db3f2..8fad0e8851 100644
--- a/jarvis/artifacts/locate.py
+++ b/jarvis/artifacts/locate.py
@@ -62,7 +62,10 @@ def _page_title(file: Path) -> str:
try:
with file.open("r", encoding="utf-8", errors="replace") as handle:
head = handle.read(_TITLE_PROBE_BYTES)
- except OSError:
+ except OSError as exc:
+ # An unreadable page keeps its filename as the label — the listing
+ # must not fail over one locked file; the read is retried on open.
+ log.debug("artifact title probe failed %s: %s", file, exc)
return file.stem
match = _TITLE_RE.search(head)
if match is None:
@@ -75,7 +78,10 @@ def _candidate_pages(root: Path) -> list[tuple[float, Path, Path]]:
"""``(mtime, run_dir, page)`` for every HTML deliverable of the newest runs."""
try:
run_dirs = [entry for entry in root.iterdir() if entry.is_dir()]
- except OSError:
+ except OSError as exc:
+ # A root that vanished or is unreadable contributes nothing; the other
+ # roots are still scanned and the miss is reported as "no match".
+ log.debug("artifact scan cannot list %s: %s", root, exc)
return []
# Newest first by directory mtime — the same order the Outputs rail uses.
run_dirs.sort(key=lambda d: d.stat().st_mtime if d.exists() else 0.0, reverse=True)
diff --git a/jarvis/plugins/tool/create_artifact.py b/jarvis/plugins/tool/create_artifact.py
index c32f9f0242..4b67db057f 100644
--- a/jarvis/plugins/tool/create_artifact.py
+++ b/jarvis/plugins/tool/create_artifact.py
@@ -282,10 +282,12 @@ class CreateArtifactTool:
language,
title=brief.title,
)
+ # The protocol types ``artifacts`` as paths; the brain's tool loop reads
+ # this background marker as a dict (the spawn_worker precedent).
return ToolResult(
success=True,
output=ack,
- artifacts=(
+ artifacts=( # type: ignore[arg-type]
{
"background_task": True,
"utterance": utterance,