feat: add agentic video analysis and clarify action results

Report device actions as dispatched and preserve full failure details. Route
Flash through McpActionExecutor and use ToolFailure across helper tools and
agent loops instead of inferring failure from response text.

Require model-provided descriptions for coordinate targets. Keep observed
element metadata separate from those descriptions in safety checks, visual
summaries, history, and frontend labels.

Add Gemini Interactions API video analysis with configurable processing mode,
chunk size, and timeouts. Centralize Google provider capabilities and token
usage normalization, and update google-genai to 2.22.0.

Preserve system instructions on follow-up interactions, replan pending chunks
when falling back to static processing, and reject unanswered native video
and audio segments instead of caching placeholder results. Keep helper-tool
failure status intact through history tools and committee calls.

Validation: 1,762 Python unit tests passed (3 skipped), 40 frontend formatter
tests passed, and the production UI build completed. Ruff lint, formatting,
the quality ratchet, and git diff checks passed.
This commit is contained in:
somew1nd committed 2026-09-08 17:05:54 -07:00
1 parent 611d1a0947
commit a45daf23f8
120 files changed
+6301 -1710

No files matched your search

+4 -3
View File
@@ -18,6 +18,7 @@ import os
from pathlib import Path
import re
from artemis.core.tool_failure import ToolFailure
from artemis.data_engine.engine import _CURRENT_DATA_ENGINE
from artemis.utils.logger import get_logger
from artemis.utils.plan_grammar import parse_plan
@@ -385,8 +386,8 @@ def format_read_note_success(
def format_read_note_failure(key: str, error: str) -> str:
"""Formats the failure message for reading a note."""
if "not found" in error.lower():
return f"Note '{key}' not found in scratchpad."
return f"Failed to read note '{key}': {error}"
return ToolFailure(f"Note '{key}' not found in scratchpad.")
return ToolFailure(f"Failed to read note '{key}': {error}")
def format_list_notes_success(notes_info: dict[str, int]) -> str:
@@ -399,7 +400,7 @@ def format_list_notes_success(notes_info: dict[str, int]) -> str:
def format_list_notes_failure(error: str) -> str:
"""Formats the failure message for listing notes."""
return f"Failed to list notes: {error}"
return ToolFailure(f"Failed to list notes: {error}")
def record_subgoal_hash_chain(