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:
1 parent
611d1a0947
commit
a45daf23f8
120 files changed
+6301
-1710
No files matched your search
@@ -39,6 +39,7 @@ from uuid import uuid4
|
||||
|
||||
from langchain_core.messages import BaseMessage, HumanMessage, SystemMessage
|
||||
|
||||
from artemis.llm.google import is_google_provider
|
||||
from artemis.memory.step_memory import JobKey, StepLens, StepMemoryService
|
||||
from artemis.memory.transcript import format_session_offset
|
||||
from artemis.utils.logger import get_logger
|
||||
@@ -80,9 +81,7 @@ def _result_phrase(result: Any) -> str:
|
||||
if detail:
|
||||
return detail
|
||||
status = result.get("status")
|
||||
if status == "success":
|
||||
return "executed"
|
||||
return str(status) if status else "executed"
|
||||
return str(status) if status else "dispatched"
|
||||
|
||||
|
||||
def _action_phrase(step: dict) -> str:
|
||||
@@ -963,7 +962,7 @@ class HistoryChunkManager:
|
||||
fallback = getattr(getattr(llm_cfg, "summarizer", None), "fallback", None)
|
||||
provider = str(getattr(fallback, "provider", "") or "")
|
||||
model = getattr(fallback, "model", None)
|
||||
if model and provider in ("google", "gemini") and model != self._model_name:
|
||||
if model and is_google_provider(provider) and model != self._model_name:
|
||||
return str(model)
|
||||
except Exception as exc:
|
||||
logger.debug(f"Capsule fallback model resolution skipped: {exc}", exc_info=True)
|
||||
|
||||
@@ -367,8 +367,8 @@ class TranscriptLedger:
|
||||
try:
|
||||
from artemis.utils.task_tree import format_result_clean
|
||||
|
||||
# format_result_clean reports only errors/repairs; success
|
||||
# renders as the bare status line.
|
||||
# format_result_clean reports only errors/repairs; a dispatched
|
||||
# action renders as the bare status line.
|
||||
detail = format_result_clean(result)
|
||||
except Exception:
|
||||
detail = None
|
||||
|
||||
Reference in new issue
Block a user