feat: add guided exploration and share user-started MCP backend

This commit is contained in:
chenmingxuan committed 2026-10-16 18:32:46 +08:00
1 parent f86db1ced6
commit ee256ad7ce
144 files changed
+8625 -2075

No files matched your search

+12 -12
View File
@@ -23,10 +23,7 @@ import threading
import tomllib
from typing import Annotated
from mcp_server.base import mcp as agent_mcp
import mcp_server.tools # noqa: F401
from mcp_server.utils import env_utils
from artemis.mcp.adb_server import mcp as adb_mcp
from artemis.runtime import shutdown_awake_service, start_awake_service
from artemis.utils.logger import get_logger
from rich.console import Console
@@ -46,6 +43,7 @@ ARTEMIS_MCP_TOOLS = (
"mobile_config",
"mobile_task_file",
"mobile_batch",
"mobile_exploration",
"mobile_search_history",
"mobile_export_report",
)
@@ -67,7 +65,7 @@ def _get_config_snippet(client: str, python_exe: str, project_root: str) -> dict
"ARTEMIS_DESKTOP_NOTIFY": "true",
},
"enabled": True,
"required": True,
"required": False,
"startup_timeout_sec": 120,
"enabled_tools": list(ARTEMIS_MCP_TOOLS),
}
@@ -310,16 +308,18 @@ def mcp_command(
console.print(syntax)
raise typer.Exit(0)
st = server_type.lower()
if st in ("agent", "mobile", "artemis", "default"):
from mcp_server.server import main as bridge_main
bridge_main(transport=transport, host=host, port=port)
return
threading.Thread(target=start_awake_service, daemon=True, name="artemis-awake-init").start()
try:
st = server_type.lower()
if st in ("agent", "mobile", "artemis", "default"):
logger.info(f"Starting Artemis Mobile Agent MCP Server over {transport}...")
if transport.lower() == "sse":
agent_mcp.run(transport="sse", host=host, port=port)
else:
agent_mcp.run(transport="stdio")
elif st == "adb":
if st == "adb":
from artemis.mcp.adb_server import mcp as adb_mcp
if transport.lower() == "sse":
logger.info(f"Starting Artemis ADB MCP Server over {transport}...")
adb_mcp.run(transport="sse", host=host, port=port)