feat: introduce MCP server, cross-platform runtime, and Showcase UI reorganization
- Showcase UI Reorganization: * Move web UI dashboard from root directory into apps/showcase_ui/ for cleaner project structure * Add 'artemis ui' CLI command (artemis/interfaces/cli/commands/ui.py) and launcher scripts for the interactive showcase console - Standalone MCP Server & Notifiers (mcp_server/): * Implement dedicated MCP server package with mobile automation tools (device_state, inspect_trace, task_manager, task_runner) * Add multi-channel notifiers (AgentAPI, Desktop notifications, Webhooks, File output, and Composite routing) * Introduce background task runner and trace store for autonomous mobile execution monitoring - Cross-Platform Runtime & Toolchain Support: * Add artemis/platform/ with OS-specific implementations for Linux, macOS (Darwin), and Windows * Add artemis/runtime/supervisor.py for resilient process and agent runtime supervision * Add artemis/toolchain/ with dependency resolution and SDK descriptors * Add cross-platform launcher scripts (start.sh, start.bat) and installer scripts (scripts/install_deps.*) - Core Enhancements & Diagnostics: * Enhance coordinate normalization, OCR API fallback, and perception pipeline * Add credential validation (credentials_validator.py) and system diagnostics * Update bilingual documentation (README.md, README_CN.md) and architecture diagrams - Test Suite Expansion: * Add integration tests for cloud gateway, remote ADB, and Artemis login * Add unit tests covering core diagnostics, platform detection, toolchain, credentials validator, optional OCR, and MCP tools
This commit is contained in:
1 parent
78e478f502
commit
9a5aaf99b7
249 files changed
+37226
-9339
No files matched your search
@@ -50,7 +50,7 @@ async def test_explorer_run():
|
||||
mock_ctx.data_engine.base_dir = "/tmp/test_session"
|
||||
mock_ctx.llm_config = MagicMock()
|
||||
mock_ctx.llm_config.explorer = MagicMock()
|
||||
mock_ctx.llm_config.explorer.model = "gemini-3.6-flash"
|
||||
mock_ctx.llm_config.explorer.model = "gemini-3.7-flash"
|
||||
|
||||
mock_state = MagicMock(spec=State)
|
||||
mock_state.latest_screenshot = "/tmp/test_screenshot.jpg"
|
||||
@@ -138,7 +138,7 @@ async def test_explorer_submit_answer():
|
||||
mock_ctx.data_engine.base_dir = "/tmp/test_session"
|
||||
mock_ctx.llm_config = MagicMock()
|
||||
mock_ctx.llm_config.explorer = MagicMock()
|
||||
mock_ctx.llm_config.explorer.model = "gemini-3.6-flash"
|
||||
mock_ctx.llm_config.explorer.model = "gemini-3.7-flash"
|
||||
|
||||
mock_state = MagicMock(spec=State)
|
||||
mock_state.latest_screenshot = "/tmp/test_screenshot.jpg"
|
||||
@@ -226,7 +226,7 @@ async def test_explorer_submit_answer_self_correction():
|
||||
mock_ctx.data_engine.base_dir = "/tmp/test_session"
|
||||
mock_ctx.llm_config = MagicMock()
|
||||
mock_ctx.llm_config.explorer = MagicMock()
|
||||
mock_ctx.llm_config.explorer.model = "gemini-3.6-flash"
|
||||
mock_ctx.llm_config.explorer.model = "gemini-3.7-flash"
|
||||
|
||||
mock_state = MagicMock(spec=State)
|
||||
mock_state.latest_screenshot = "/tmp/test_screenshot.jpg"
|
||||
@@ -380,7 +380,7 @@ async def test_explorer_initial_visual_marking():
|
||||
mock_ctx.data_engine.base_dir = "/tmp/test_session"
|
||||
mock_ctx.llm_config = MagicMock()
|
||||
mock_ctx.llm_config.explorer = MagicMock()
|
||||
mock_ctx.llm_config.explorer.model = "gemini-3.6-flash"
|
||||
mock_ctx.llm_config.explorer.model = "gemini-3.7-flash"
|
||||
|
||||
mock_state = MagicMock(spec=State)
|
||||
mock_state.latest_screenshot = "/tmp/test_screenshot.jpg"
|
||||
@@ -466,7 +466,7 @@ async def test_explorer_initial_visual_marking_previous_screenshot():
|
||||
mock_ctx.data_engine.base_dir = "/tmp/test_session"
|
||||
mock_ctx.llm_config = MagicMock()
|
||||
mock_ctx.llm_config.explorer = MagicMock()
|
||||
mock_ctx.llm_config.explorer.model = "gemini-3.6-flash"
|
||||
mock_ctx.llm_config.explorer.model = "gemini-3.7-flash"
|
||||
|
||||
mock_state = MagicMock(spec=State)
|
||||
# current screenshot is different
|
||||
@@ -559,7 +559,7 @@ async def test_explorer_initial_visual_marking_previous_screenshot_no_ui_tree():
|
||||
mock_ctx.data_engine.base_dir = "/tmp/test_session"
|
||||
mock_ctx.llm_config = MagicMock()
|
||||
mock_ctx.llm_config.explorer = MagicMock()
|
||||
mock_ctx.llm_config.explorer.model = "gemini-3.6-flash"
|
||||
mock_ctx.llm_config.explorer.model = "gemini-3.7-flash"
|
||||
|
||||
mock_state = MagicMock(spec=State)
|
||||
mock_state.latest_screenshot = "/tmp/current_screenshot.jpg"
|
||||
@@ -641,7 +641,7 @@ async def test_explorer_initial_visual_marking_previous_screenshot_ocr_fusion():
|
||||
mock_ctx.data_engine.base_dir = "/tmp/test_session"
|
||||
mock_ctx.llm_config = MagicMock()
|
||||
mock_ctx.llm_config.explorer = MagicMock()
|
||||
mock_ctx.llm_config.explorer.model = "gemini-3.6-flash"
|
||||
mock_ctx.llm_config.explorer.model = "gemini-3.7-flash"
|
||||
|
||||
mock_state = MagicMock(spec=State)
|
||||
mock_state.latest_screenshot = "/tmp/current_screenshot.jpg"
|
||||
@@ -743,7 +743,7 @@ async def test_explorer_initial_visual_marking_previous_screenshot_on_the_fly_oc
|
||||
mock_ctx.data_engine.base_dir = "/tmp/test_session"
|
||||
mock_ctx.llm_config = MagicMock()
|
||||
mock_ctx.llm_config.explorer = MagicMock()
|
||||
mock_ctx.llm_config.explorer.model = "gemini-3.6-flash"
|
||||
mock_ctx.llm_config.explorer.model = "gemini-3.7-flash"
|
||||
|
||||
mock_state = MagicMock(spec=State)
|
||||
mock_state.latest_screenshot = "/tmp/current_screenshot.jpg"
|
||||
@@ -816,6 +816,10 @@ async def test_explorer_initial_visual_marking_previous_screenshot_on_the_fly_oc
|
||||
new_callable=AsyncMock,
|
||||
return_value=mock_ocr_result,
|
||||
) as mock_perform_ocr,
|
||||
patch(
|
||||
"artemis.agents.explorer.explorer.is_ocr_configured",
|
||||
return_value=True,
|
||||
),
|
||||
patch("artemis.agents.explorer.explorer.draw_dots") as mock_draw_dots,
|
||||
patch("pathlib.Path.exists", return_value=True),
|
||||
patch("pathlib.Path.read_text", return_value=mock_prompt),
|
||||
@@ -853,7 +857,7 @@ async def test_explorer_denylisted_tool():
|
||||
mock_ctx.data_engine.base_dir = "/tmp/test_session"
|
||||
mock_ctx.llm_config = MagicMock()
|
||||
mock_ctx.llm_config.explorer = MagicMock()
|
||||
mock_ctx.llm_config.explorer.model = "gemini-3.6-flash"
|
||||
mock_ctx.llm_config.explorer.model = "gemini-3.7-flash"
|
||||
mock_ctx.agent_config = MagicMock()
|
||||
mock_ctx.agent_config.denylisted_tools = {"explorer": ["search_xml_ocr"]}
|
||||
|
||||
@@ -1048,7 +1052,7 @@ async def test_explorer_final_turn_tool_stripping():
|
||||
|
||||
mock_ctx.llm_config = MagicMock()
|
||||
mock_ctx.llm_config.explorer = MagicMock()
|
||||
mock_ctx.llm_config.explorer.model = "gemini-3.6-flash"
|
||||
mock_ctx.llm_config.explorer.model = "gemini-3.7-flash"
|
||||
|
||||
mock_state = MagicMock(spec=State)
|
||||
mock_state.latest_screenshot = "/tmp/test_screenshot.jpg"
|
||||
@@ -1212,7 +1216,7 @@ async def test_explorer_ask_perception_tool():
|
||||
detect_queries=["profile icon"],
|
||||
)
|
||||
|
||||
assert "XML/OCR Text Search Results are:" in result["text"]
|
||||
assert "Text Search Results are:" in result["text"]
|
||||
assert "Coordinate Search Results are:" in result["text"]
|
||||
assert "Object Detection Results are:" in result["text"]
|
||||
|
||||
|
||||
Reference in new issue
Block a user