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

+4 -28
View File
@@ -15,12 +15,10 @@
import os
from pathlib import Path
from setuptools import Extension, find_namespace_packages, setup
from setuptools.command.build_py import build_py
USE_CYTHON = os.environ.get("USE_CYTHON", "0") == "1"
ext_modules = []
cmdclass = {}
if USE_CYTHON:
from Cython.Build import cythonize
@@ -30,58 +28,37 @@ if USE_CYTHON:
extensions = []
src_dir = Path("artemis")
# 1. Recursively find all .py files inside the src/ directory
# Recursively find all .py files inside the artemis/ directory for optional acceleration
for py_file in src_dir.rglob("*.py"):
# Get the path relative to src/ (e.g., mypackage/subfolder/module.py)
rel_path = py_file.relative_to(src_dir)
# Convert path into a Python module name (e.g., artemis.subfolder.module)
mod_parts = ("artemis",) + rel_path.with_suffix("").parts
module_name = ".".join(mod_parts)
# PREVENT CYTHON CRASH: Skip rogue __init__.py files at the root of src/
if module_name in (
"artemis.__init__",
"artemis.main",
"artemis.mcp.adb_server",
"artemis.mcp.xml_search_server",
):
print(f"Skipping init/main file from Cython: {py_file}")
continue
# 2. Create an Extension for this specific file
extensions.append(Extension(module_name, [str(py_file)]))
# Compile all found extensions
ext_modules = cythonize(
extensions,
compiler_directives={"language_level": "3"},
build_dir="build/cythonized",
)
# 3. Prevent packaging original .py source files (except main and __init__) and intermediate .c files
class BuildPyExcludeSource(build_py):
def find_package_modules(self, package, package_dir):
modules = super().find_package_modules(package, package_dir)
return [
m
for m in modules
if m[1] in ("main", "__init__", "adb_server", "xml_search_server")
]
def find_data_files(self, package, package_dir):
data_files = super().find_data_files(package, package_dir)
return [f for f in data_files if not f.endswith(".c")]
cmdclass["build_py"] = BuildPyExcludeSource
setup(
name="artemis",
version="3.6.3",
version="1.0",
packages=find_namespace_packages(
include=[
"artemis",
"artemis.*",
"mcp_server",
"mcp_server.*",
"apps",
"apps.*",
"admin_console",
@@ -99,6 +76,5 @@ setup(
},
include_package_data=True,
ext_modules=ext_modules,
cmdclass=cmdclass,
exclude_package_data={"": ["*.c", "*.pyx", "*.pxd", "*.cpp"]},
)