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:
somew1nd committed 2026-08-18 13:59:27 -07:00
1 parent 78e478f502
commit 9a5aaf99b7
249 files changed
+37226 -9339

No files matched your search

+22 -3
View File
@@ -78,6 +78,7 @@ class DataEngine:
self._pending_threads = []
self._accumulated_logs = {}
self._bg_task_to_trace_id = {}
self._trace_name_cache = {}
# Background tasks are written directly to SQLite storage
self.ipc_socket = None
@@ -429,8 +430,15 @@ class DataEngine:
traces = self.storage.get_step_traces(step_id)
generic_tools = []
for t in traces:
if t.type == "tool":
generic_tools.append(t.model_dump())
if t.type in ("tool", "action") or (t.type == "llm_call" and t.status == "failed"):
t_dict = t.model_dump()
if t.parent_trace_id and "agent_name" not in t_dict:
parent_name = getattr(self, "_trace_name_cache", {}).get(
t.parent_trace_id
) or getattr(self, "_trace_name_cache", {}).get(str(t.parent_trace_id))
if parent_name:
t_dict["agent_name"] = parent_name
generic_tools.append(t_dict)
step_dict["generic_tools"] = generic_tools
except Exception as e:
logger.error(f"Failed to fetch step traces for SSE: {e}")
@@ -486,6 +494,10 @@ class DataEngine:
with self.lock:
self._trace_counter = getattr(self, "_trace_counter", 0) + 1
trace_ts = time.time() + (self._trace_counter * 1e-7)
if not hasattr(self, "_trace_name_cache"):
self._trace_name_cache = {}
self._trace_name_cache[trace_id] = name
self._trace_name_cache[str(trace_id)] = name
trace = TraceRecord(
trace_id=trace_id,
@@ -519,7 +531,14 @@ class DataEngine:
thread.start()
# Publish event
self._publish("trace_recorded", trace.model_dump())
trace_dict = trace.model_dump()
if parent_trace_id:
parent_name = getattr(self, "_trace_name_cache", {}).get(parent_trace_id) or getattr(
self, "_trace_name_cache", {}
).get(str(parent_trace_id))
if parent_name:
trace_dict["agent_name"] = parent_name
self._publish("trace_recorded", trace_dict)
return trace_id